|
![]() |
#1 |
Участник
|
Самое простое что пришло в голову :
класс SysRecordTemplateStorageUser метод set : X++: public Common set() { ListEnumerator enumerator = list.getEnumerator(); ; // добавим if (enumerator.moveNext()) common = enumerator.current(); enumerator.reset(); if (!description) // передадим common [description,details] = this.promptOnCreate(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) { SysRecordTemplatePromptOnCreate dialog1 = new SysRecordTemplatePromptOnCreate(); ; // добавим // передадим ItemName if (_common && _common.TableId == tableNum(InventTable)) { dialog1.setDescription(common.(fieldNum(InventTable, ItemName))); } if (dialog1.prompt()) { dialog1.getFromDialog(); return [dialog1.getDescription(), dialog1.getDetails()]; } return ['','']; } метод ClassDeclaration: X++: // This is a framework class. Customizing this class may cause problems with future upgrades to the software. class SysRecordTemplatePromptOnCreate extends RunBase { // здесь сделаем так //FormRun dialogForm; Object dialogForm; SysRecordTemplateDescription description; SysRecordTemplateDetails details; #define.CurrentVersion(1) #localmacro.CurrentList description, details #endmacro } X++: public Object dialog() { Args args = new Args(formstr(SysRecordTemplatePromptOnCreate)); ; dialogForm = classfactory.formRunClass(args); dialogForm.init(); // передадим в форму ItemName dialogForm.setDescription(description); return dialogForm; } X++: void setDescription(SysRecordTemplateDescription _description)
{
;
description = _description;
} создать метод X++: void setDescription(SysRecordTemplateDescription _description)
{
;
Description.text(_description);
}
__________________
-Ты в гномиков веришь? -Нет. -А они в тебя верят, смотри, не подведи их. Последний раз редактировалось Pustik; 16.08.2013 в 11:30. |
|
|
Опции темы | Поиск в этой теме |
Опции просмотра | |
|