• Using X++ code to Running Obeject


    Using x++ code running some of Common object.

    remark by Jimmy Dec. 21th 2010

    void clicked()
    {
    UtilIdElements _UtilIdElements;
    MenuFunction MF;
    treeNode treeNode;
    xInfo xInfo
    = new xInfo();
    sysTableBrowser sysTableBrowser;
    #AOT
    ;
    // winAPI::shellExecute(UtilIdElements.name);
    // select firstonly _UtilIdElements
    // where _UtilIdElements.name == UtilIdElements.name
    // && _UtilIdElements.recordType == UtilElementType::Menu;
    // if(_UtilIdElements)

    switch(UtilIdElements.recordType)
    {
    case UtilElementType::DisplayTool :
    smmUtility::openMenuItemForm(UtilIdElements.name,UtilIdElements,
    null,false);

    break;
    case UtilElementType::ActionTool :
    MF
    = New MenuFunction(UtilIdElements.name,MenuItemType::Action);
    MF.run();
    break;
    case UtilElementType::OutputTool :
    MF
    = New MenuFunction(UtilIdElements.name,MenuItemType::Output);
    MF.run();
    break;
    case UtilElementType::Job :
    if(!Box::yesNo('Are you sure running this Job? may be affect some data.please know!',DialogButton::No,'Running job'))
    return ;

    treeNode
    = xInfo.rootNode();
    treeNode
    = treeNode::findNode("Jobs").AOTfindChild(UtilIdElements.name);
    treeNode.AOTrun();
    break;
    case UtilElementType::Table :
    /*
    treeNode = treeNode::findNode(#tablespath);
    treeNode = treeNode.AOTfindChild(UtilIdElements.name);
    treeNode.AOTrun();
    */
    sysTableBrowser
    = new sysTableBrowser();
    sysTableBrowser.setAllowEdit(
    true);
    SysTableBrowser.setAllowDelete(
    true);
    sysTableBrowser.Run(tableName2Id(UtilIdElements.name));
    break;
    case UtilElementType::Form :
    treeNode
    = treeNode::findNode(#FormsPath);
    treeNode
    = treeNode.AOTfindChild(UtilIdElements.name);
    treeNode.AOTrun();
    break;
    default :

    break;
    }

    }
  • 相关阅读:
    camp训练day2
    LCA板子题
    牛客多校第一场
    P1063 能量项链 区间DP
    64. Minimum Path Sum
    46. Permutations
    216. Combination Sum III
    62. Unique Paths
    53. Maximum Subarray
    22. Generate Parentheses
  • 原文地址:https://www.cnblogs.com/Fandyx/p/1912733.html
Copyright © 2020-2023  润新知