|
|
#1 |
|
Участник
|
получить label display - метода
имею id таблицы InventTable
название метода inventLowestQty 175 "inventLowestQty" вопрос как можно получить label метода на форме? ("Мин. количеству по заказу") axpata 4.0 4.0.2501.116 4.0.2501.347 |
|
|
|
|
#2 |
|
Banned
|
.
X++: {
SysLabel label;
DictMethod dictMethod;
SysDictType dictType;
;
dictMethod = new DictMethod(UtilElementType::TableInstanceMethod, xxx.TableId, xxx.DataMethod);
if (dictMethod.returnType() == Types::UserType)
{
dictType = new SysDictType(dictMethod.returnId());
if (languageId)
{
label = new SysLabel(languageId);
valLabel = label.extractString(dictType.labelLabel());
}
else
{
valLabel = dictType.label();
}
}
else
{
valLabel = dictMethod.name();
}
} |
|
|
|
| За это сообщение автора поблагодарили: NetBus (1), Gustav (2), alex55 (1). | |
|
|
#3 |
|
MCTS
|
display-метод в Lookup-е
интересен код (автор PMS): X++: class AdvWebTableLookup { static dictType methodReturnDictType(TableId _tableId, identifiername _methodName) { DictTable dictTable; DictMethod dictMethod; DictType dictType; int i; ; dictTable = new DictTable(_tableId); for(i=1; i <= dictTable.objectMethodCnt(); i++) { dictMethod = dictTable.objectMethodObject(i); if(dictMethod.name() == _methodName) { if(dictMethod && (dictMethod.displayType() == DisplayFunctionType::Get || dictMethod.displayType() == DisplayFunctionType::Set) && dictMethod.returnType() != Types::CONTAINER) { dictType = new DictType(dictMethod.returnId()); if(dictType) { break; } else { warning(strFmt('Display/Editmethod do not use an extendedtype as return type: %1',fieldId2pName(dictTable.id(),-i))); } } } } return dictType; } // используем: // AdvWebTableLookup::methodReturnDictType(_tableId, _method).label(); } |
|
|