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);
}
查看全文
相关阅读:
__weak
c++界面设计皮肤工具
执行游戏时出现0xc000007b错误的解决方法
2.4.1-Java语言基础(常量)
句法模式识别(一)-串文法
一步一步写算法(之hash表)
LaTeX新人教程,30分钟从全然陌生到基本入门
初次当面试官的经历和感触
Android入门第八篇之GridView(九宫图)
Android-Cannot merge new index 66195 into a non-jumbo instruction的解决的方法
原文地址:https://www.cnblogs.com/Farseer1215/p/981148.html
最新文章
第一个JavaWeb程序
表达式树 Expression
C# mongodb 1
虚拟WiFi
程序员的Scala
统计大文件里单词
Vim1
Android高级编程笔记(四)深入探讨Activity(转)
HTTP 请求报文 响应报文(转)
RMI
热门文章
Android Studio Debug
移动web点5像素的秘密(转)
AsyncTask使用须知
obj-c编程04:类的继承
openldap---ldapsearch使用
中国人被“清朝GDP世界第一”忽悠了!
MySQL 通配符学习小结
easyUI的combobox实现级联
怎样取消shutdown关机命令?-shutdown命令的使用解析
Nutch 二次开发之parse正文内容
Copyright © 2011-2022 走看看