|
![]() |
#1 |
Участник
|
Еще бы оформить это как функцию класса global и можно переносить в прокты
![]() PS Вещь реально нужная, поскольку buf2buf работает как раз по id что не всегда удобно |
|
![]() |
#2 |
Участник
|
вот доработанный код метода, можно ставить в Global :
X++: container table2table(str _fromTable, str _toTable, Common _fromCommon, Common _toCommon) { DictTable dictTable1 = new DictTable(tablename2Id(_toTable)); DictTable dictTable2 = new DictTable(tablename2Id(_fromTable)); int i, ret; int t2FieldId; str t1FieldId; ; ret = 0; for (i = 1;i <= dictTable2.fieldCnt();i++) { t1FieldId = dictTable2.fieldName(dictTable2.fieldCnt2Id(i)); t2FieldId = dictTable2.fieldCnt2Id(i); if (!dictTable1.fieldName2Id(t1FieldId)) continue; else if (isSysId(t2FieldId)) continue; _toCommon. (dictTable1.fieldName2Id(t1FieldId)) = _fromCommon. (t2FieldId); ret++; } if (ret) return [_toCommon,ret]; else return [null,ret]; } |
|
![]() |
#3 |
Участник
|
Хотя можно возвращать не контейнер, а Common, кому как нравится :-)
|
|