zoukankan      html  css  js  c++  java
  • 用X++代码来动态的改变表的属性

    static void ChangeTableProperties(Args _args)

    {

        xInfo xInfo = new xInfo();

        treeNode node = xInfo.rootNode().AOTfindChild("Data Dictionary");

        treeNode childNode;

        treenodeIterator nodeIterator;

        str properties;

        str tables;

        str newLable = "Change label";

        ;

     

        node = node.AOTfindChild("Tables");

        nodeIterator = node.AOTiterator();

        childNode = nodeIterator.next();

        while (childNode)

        {

          tables = childNode.treeNodeName();

          if(tables == "AssetBook")

          {

            properties = setProperty(childNode.AOTgetProperties(), "Label", newLable);

            info(properties);

            childNode.AOTsetProperties(properties);

            childNode.AOTsave();

            childNode.AOTrefresh();

          }

          childNode = nodeIterator.next();

        }

    }

    虽然这种用X++代码改变表属性的方法不值得提倡,但是这种方法可以用于一些特殊的场合。

  • 相关阅读:
    27. 移除元素
    LeetCode---9.回文数
    PAT 1098 Insertion or Heap Sort (25)
    PAT 1146 Topological Order
    PAT 1147 Heaps(30 分)
    数据结构 二分查找1
    数据结构 树
    PAT 1126 Eulerian Path
    PAT 1111 Online Map (30)
    PAT 1072 Gas Station (30)
  • 原文地址:https://www.cnblogs.com/Fandyx/p/2761527.html
Copyright © 2011-2022 走看看