zoukankan      html  css  js  c++  java
  • Lookup Values with RenameKey

    static void Jimmy_RenameKeyLookupValues(Args _args)
    {
        InventTable             IT,ITupdate;
        Dialog                  dlg     = new Dialog("updated to comoany Items infomation");
        DialogField             dlgItem = dlg.addField(types::String,'after rename Items:',"Format such as :Items + ',' + Items + ','  + items");
        SysDataBaseLog          SysDataBaseLog;
        Container               Con;
        fieldId                 fieldId;
        List                    List,ListKey;
        ListEnumerator          le,LeKey;
    ;
        dlgItem.displayHeight(20);
        dlgItem.displayLength(50);
        dlg.doInit();
        if(!dlg.run())
            return ;
    
        le = global::strSplit(dlgItem.value(),',').getEnumerator();
        while (le.moveNext())
        {
            //ttsbegin;
            IT = InventTable::find(le.current(),true);
            if(IT)
            {
                select firstonly SysDataBaseLog
                        where SysDataBaseLog.table == tablenum(InventTable)
                        && SysDataBaseLog.LogType == DatabaseLogType::RenameKey
                        && SysDataBaseLog.Description like IT.ItemId + '*';
                if(SysDataBaseLog)
                {
                    ListKey = SysDataBaseLog.getDataAslist();
                    LeKey = ListKey.getEnumerator();
                    while (LeKey.moveNext())
                    {
                        Con          = LeKey.current();
                        fieldId      = conpeek(Con, 1);
                        info(strfmt("%1,%2,%3",fieldId,conpeek(Con, 2),conpeek(Con, 3)));
                        IT.OrgItemId = sysdatabaselog.contents2Str(conpeek(Con, 3), fieldId);
                        info(strfmt("%1 - %2",IT.ItemId,IT.OrgItemId));
                        break;
                    }
                }
                if(!IT.OrgItemId)
                    IT.OrgItemId = IT.ItemId;
                //ITUpdateOrg.doUpdate();
            }
           // ttscommit;
        }
    }
    
    
  • 相关阅读:
    spring boot指定外部配置的坑
    beego 批量删除问题
    spark 安装
    HttpServletRequest 获取cookie
    k8s 代码生成
    k8s 各种示例
    mysql-operator
    k8s Docker私有仓库认证
    Failed to introspect annotated methods on class 异常
    P6272 没有人的算术
  • 原文地址:https://www.cnblogs.com/Fandyx/p/1836650.html
Copyright © 2011-2022 走看看