29.03.2016, 12:12 | #9 |
Участник
|
Цитата:
В диалоговом окне есть 4 поля, из них для 2 делается лукап. одно из них работает правильно. А вот в другом лукап не отрабатывает. Подскажите пожалуйста что я сделал не так. весь день сижу, не могу понять Вот сам код класса UIbilder CodePublicLookup отрабатывает ResponsibilityLookup нет. Ставил в нем брекпоинт, даже не заходит X++: class CustTransOpenRptUIBuilder extends SrsReportDataContractUIBuilder { DialogField dialogReportDate; DialogField dialogOrderNumber; DialogField dialogResponsibility; DialogField dialogCodePublic; } public void build() { CustTransOpenRptContract rdpContract = this.dataContractObject() as CustTransOpenRptContract; dialogReportDate = this.addDialogField(methodStr(CustTransOpenRptContract, parmReportDate), rdpContract); dialogOrderNumber = this.addDialogField(methodStr(CustTransOpenRptContract, parmOrderNumber), rdpContract); dialogResponsibility = this.addDialogField(methodStr(CustTransOpenRptContract, parmResponsibility), rdpContract); dialogCodePublic = this.addDialogField(methodStr(CustTransOpenRptContract, parmCodePublic), rdpContract); } public void CodePublicLookup(FormStringControl _ctrl) { Query query = new Query(); QueryBuildDataSource queryBuildDataSource; QueryBuildRange queryBuildRange; SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(TaxAuthorityAddress), _ctrl); sysTableLookup.addLookupField(fieldNum(TaxAuthorityAddress, GniCode_RU)); //sysTableLookup.addLookupField(fieldNum(TaxAuthorityAddress, Name)); queryBuildDataSource = query.addDataSource(tableNum(TaxAuthorityAddress)); //queryBuildRange = queryBuildDataSource.addRange(fieldNum(TaxAuthorityAddress, AccountNum)); //queryBuildRange.value("Zhed-000006"); sysTableLookup.parmQuery(query); sysTableLookup.performFormLookup(); } public void ResponsibilityLookup(FormStringControl _ctrl) { Query query = new Query(); QueryBuildDataSource queryBuildDataSource; QueryBuildRange queryBuildRange; SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(OfficialsTable_RU), _ctrl); sysTableLookup.addLookupField(fieldNum(OfficialsTable_RU, ReportType)); //sysTableLookup.addLookupField(fieldNum(TaxAuthorityAddress, Name)); queryBuildDataSource = query.addDataSource(tableNum(OfficialsTable_RU)); queryBuildRange = queryBuildDataSource.addRange(fieldNum(OfficialsTable_RU, Position)); queryBuildRange.value(enum2str(OffPosition_RU::Responsible)); sysTableLookup.parmQuery(query); sysTableLookup.performFormLookup(); } public void postRun() { //Dialog dialogLocal = this.dialog(); DialogField dialogResponsibilityPR; DialogField dialogCodePublicPR; super(); //dialogLocal.dialogForm().formRun().controlMethodOverload(false); //dialogLocal.dialogForm().formRun().design().caption("Customer open transactions"); //Use a label dialogResponsibilityPR = this.bindInfo().getDialogField(this.dataContractObject(), methodStr(CustTransOpenRptContract, parmResponsibility)); dialogResponsibilityPR.registerOverrideMethod(methodStr(FormStringControl, lookup), methodStr(CustTransOpenRptUIBuilder, ResponsibilityLookup), this); dialogCodePublicPR = this.bindInfo().getDialogField(this.dataContractObject(), methodStr(CustTransOpenRptContract, parmCodePublic)); dialogCodePublicPR.registerOverrideMethod(methodStr(FormStringControl, lookup), methodStr(CustTransOpenRptUIBuilder, CodePublicLookup), this); } X++: [ DataContractAttribute, SysOperationContractProcessingAttribute(classStr(CustTransOpenRptUIBuilder)) ] class CustTransOpenRptContract { TransDate reportDate; OrderNum_KZ orderNumber; OffReportType_RU responsibility; GniCode_RU codePublic; } [ DataMemberAttribute('codePublic') ] public GniCode_RU parmCodePublic(GniCode_RU _value= codePublic) { codePublic = _value; return codePublic; } [ DataMemberAttribute('responsibility') ] public OffReportType_RU parmResponsibility(OffReportType_RU _value = responsibility) { responsibility = _value; return responsibility; } //функции даты и ордер нам не привожу. Они аналогичные. |
|