EmplTable-->Method
public client static void lookupActiveEmpId(FormStringControl _ctrl)
{
SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(EmplTable),_ctrl);
Query query = new Query();
QueryBuildDataSource queryBuildDataSource = query.addDataSource(tableNum(EmplTable));
queryBuildDataSource.addRange(fieldNum(EmplTable,Active)).value(enum2str(NoYes::Yes));
sysTableLookup.addLookupfield(fieldNum(EmplTable,EmplId));
sysTableLookup.addLookupfield(fieldNum(EmplTable, EmplName));
sysTableLookup.addLookupfield(fieldNum(EmplTable,Active));
sysTableLookup.addSelectionField(fieldNum(EmplTable,EmplId));
sysTableLookup.parmQuery(query);
sysTableLookup.performFormLookup();
}
Form-->Design String Control-->method
public void lookup()
{
EmplTable::lookupActiveEmpId(this);
}
public client static void lookupActiveEmpId(FormStringControl _ctrl)
{
SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(EmplTable),_ctrl);
Query query = new Query();
QueryBuildDataSource queryBuildDataSource = query.addDataSource(tableNum(EmplTable));
queryBuildDataSource.addRange(fieldNum(EmplTable,Active)).value(enum2str(NoYes::Yes));
sysTableLookup.addLookupfield(fieldNum(EmplTable,EmplId));
sysTableLookup.addLookupfield(fieldNum(EmplTable, EmplName));
sysTableLookup.addLookupfield(fieldNum(EmplTable,Active));
sysTableLookup.addSelectionField(fieldNum(EmplTable,EmplId));
sysTableLookup.parmQuery(query);
sysTableLookup.performFormLookup();
}
Form-->Design String Control-->method
public void lookup()
{
EmplTable::lookupActiveEmpId(this);
}
No comments:
Post a Comment