class Dialoglookup
{
Dialog dialog;
DialogField dlgworkerid,dlgpurchase,dlgdate;
}
Public dialog dialog()
{
FormStringControl control,controlname;
;
dialog = new Dialog();
dlgworkerid = dialog.addField(extendedTypeStr(HcmPersonnelNumberId));
dlgpurchase = dialog.addfield(extendedTypeStr(UserId));
dlgpurchase.value(curUserId());
control =
dlgworkerid.control();
dlgdate = dialog.addField(extendedTypeStr(TransDate));
//controlname =dlgpurchase.control();
control.registerOverrideMethod(methodStr(FormStringControl,lookup),methodStr(Dialoglookup,Worker_LookUp),this);
//controlname.registerOverrideMethod(methodStr(FormStringControl,lookup),methodStr(Dialoglookup,name_lookup),this);
return dialog;
}
public void
Worker_LookUp(FormStringControl _control)
{
Query query;
QueryBuildDataSource qbds;
SysTableLookup sysTableLookup;
;
query = new Query();
query.addDataSource(tableNum(HcmWorker));
sysTableLookup = SysTableLookup::newParameters(tablenum(HcmWorker),_control);
sysTableLookup.addLookupfield(fieldNum(HcmWorker,PersonnelNumber),true);
sysTableLookup.addLookupMethod(tableMethodStr(HcmWorker,name));
sysTableLookup.parmQuery();
sysTableLookup.performFormLookup();
No comments:
Post a Comment