![]() |
#3 |
Участник
|
Можно как-то так:
Класс SysRecordTemplateStorageUser: X++: public Common set() { ListEnumerator enumerator = list.getEnumerator(); ; // Добавить { if (enumerator.moveNext()) common = enumerator.current(); else common = null; enumerator.reset(); // } if (!description) [description,details] = this.promptOnCreate(common); // добавить common if (description) { enumerator.moveNext(); common = enumerator.current(); xSysLastValue::getLast(this); this.validateDescription(description, value); value += [[description, false, this.packList(),details]]; xSysLastValue::saveLast(this); } return null; } X++: protected container promptOnCreate(common _common = null) // Добавить (common _common = null) { SysRecordTemplatePromptOnCreate dialog1 = new SysRecordTemplatePromptOnCreate(); ; // Добавить { if (_common && _common.TableId == tableNum(InventTable)) dialog1.setDescription(_common.(fieldNum(InventTable, ItemName))); // } if (dialog1.prompt()) { dialog1.getFromDialog(); return [dialog1.getDescription(), dialog1.getDetails()]; } return ['','']; } X++: public Object dialog() { Args args = new Args(formstr(SysRecordTemplatePromptOnCreate)); Object objForm; ; dialogForm = classfactory.formRunClass(args); dialogForm.init(); // Добавить { if (description) { objForm = dialogForm; objForm.setDescription(description); } // } return dialogForm; } X++: // Добавить { public void setDescription(SysRecordTemplateDescription _description) { ; description = _description; } // } X++: // Добавить { public void setDescription(SysRecordTemplateDetails _details) { ; description.text(_details); } // } Последний раз редактировалось ansoft; 16.08.2013 в 10:44. |
|
|
|