zoukankan
html css js c++ java
获取AX数据字典
AX提供了很多反射类可以获取元数据信息,刚刚一个同事需要一个AX数据字典的列表,顺手写了一个,没啥技术含量,在这里做个备份,以便以后复制粘贴.
static
void
DataDictionary(Args _args)
{
#AOT
#define
.FileName(@"d:\DataDictionary.txt")
TextBuffer tb
=
new
TextBuffer();
TreeNode treeNode
=
TreeNode::findNode(#TablesPath);
DictTable dictTable;
DictField dictField;
int
i;
;
treeNode
=
treeNode.AOTfirstChild();
while
(treeNode)
{
dictTable
=
new
DictTable(tableName2Id(treeNode.AOTname()));
tb.appendText(dictTable.name()
+
'
'
+
dictTable.label());
tb.appendText(
'
\n
'
);
for
(i
=
1
;i
<=
dictTable.fieldCnt();i
++
)
{
dictField
=
new
DictField(dictTable.id(),dictTable.fieldCnt2Id(i));
tb.appendText(
'
'
+
dictField.name()
+
'
'
+
dictField.label());
tb.appendText(
'
\n
'
);
}
print treeNode.AOTname();
treeNode
=
treeNode.AOTnextSibling();
}
tb.toFile(#FileName);
}
当然也可以不用TreeNode,而用Dictionary得到表.
static
void
DataDictionary2(Args _args)
{
#AOT
#define
.FileName(@"d:\DataDictionary.txt")
TextBuffer tb
=
new
TextBuffer();
Dictionary dictionary
=
new
Dictionary();
DictTable dictTable;
DictField dictField;
int
i;
int
j;
;
for
( i
=
1
;i
<=
dictionary.tableCnt();i
++
)
{
dictTable
=
new
DictTable(dictionary.tableCnt2Id(i));
tb.appendText(dictTable.name()
+
'
'
+
dictTable.label());
tb.appendText(
'
\n
'
);
for
(j
=
1
;j
<=
dictTable.fieldCnt();j
++
)
{
dictField
=
new
DictField(dictTable.id(),dictTable.fieldCnt2Id(j));
tb.appendText(
'
'
+
dictField.name()
+
'
'
+
dictField.label());
tb.appendText(
'
\n
'
);
}
print dictTable.name();
//
treeNode = treeNode.AOTnextSibling();
}
tb.toFile(#FileName);
}
查看全文
相关阅读:
JSChart_页面图形报表
hdu 2602(dp)
hdu 1518(dfs)
hdu 1716(dfs)
hdu 1002大数(Java)
SPOJ 375. Query on a tree (树链剖分)
poj 1091 跳蚤
HDU 4048 Zhuge Liang's Stone Sentinel Maze
HDU Coprime
HDU Machine scheduling
原文地址:https://www.cnblogs.com/Farseer1215/p/981148.html
最新文章
数据结构—堆
数据结构—二叉树的三种遍历方式
PHP-curl
php二维数组排序
searchdir
php7新特性
phpDOC
mysql批量导出表(限制100条数据)
mysql获取600000条数据,存入excel
thinkphp笔记
热门文章
pgsql操作
第三讲:WCF介绍(3)
第二讲:WCF介绍(2)
第一讲:WCF介绍
职责链模式(chain of responsibility)
C#索引器
Jquery验证插件 JqueryValidation 动态验证用户名等
SqlServer常用语句参考
所有我所收集或者工作中积累的代码以及程序等资源
ASP.NET或WinFrom中获取汉子的拼音首字母
Copyright © 2011-2022 走看看