随笔 - 95,  文章 - 0,  评论 - 0,  阅读 - 14224
复制代码
 //供应商的构建schema
        H3.DataModel.BizObjectSchema schemaVendor = this.Request.Engine.BizObjectManager.GetPublishedSchema("D150516vendor");
        //new供应商一个对象
        H3.DataModel.BizObject targetBoVendor = new H3.DataModel.BizObject(this.Engine, schemaVendor, this.Request.UserContext.UserId);
        //获取到物资目录新增供应商子表的对象
        H3.DataModel.BizObject[] childBoAddthemerchants = (H3.DataModel.BizObject[]) this.Request.BizObject["D150516eca54f54343545b6ab03433fdaec7d60"];
        //获取到物资目录的对象
        // H3.DataModel.BizObject targetBoCategory = H3.DataModel.BizObject.Load(this.Request.UserContext.UserId, this.Engine, "D150516category3", this.Request.BizObjectId, false);
        //提交后新增供应商
        if(actionName == "Submit" && this.Request.ActivityCode == "Activity3")
        {
            if(childBoAddthemerchants != null && childBoAddthemerchants.Length > 0)
            {
                foreach(H3.DataModel.BizObject child in childBoAddthemerchants)
                {
                    //供应商名称
                    targetBoVendor["names"] = child["names"] + string.Empty;
                    //供应商类别
                    targetBoVendor["SupplierCategory"] = child["SupplierCategory"] + string.Empty;
                    //供应商类别负责人
                    targetBoVendor["Principal2"] = child["Principal2"] + string.Empty;
                    //电话号码
                    targetBoVendor["iphone"] = child["iphone"] + string.Empty;
                    //开户行
                    targetBoVendor["bankofdeposit"] = child["bankofdeposits"] + string.Empty;
                    //银行账户
                    targetBoVendor["bankcard"] = child["bankcards"] + string.Empty;
                    //区域
                    targetBoVendor["address"] = child["address"] + string.Empty;
                    //地址
                    targetBoVendor["site"] = child["site"] + string.Empty;
                }
                //设置业务对象数据为生效状态
                targetBoVendor.Status = H3.DataModel.BizObjectStatus.Effective;
                //目标表单创建
                targetBoVendor.Create();
            }
        }
        //将新增的供应商加载到物资目录的供应商上面
        this.Request.BizObject["joinPersonnel"] = targetBoVendor.ObjectId;
复制代码

 

posted on   天涯何  阅读(45)  评论(0编辑  收藏  举报
(评论功能已被禁用)
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 【杭电多校比赛记录】2025“钉耙编程”中国大学生算法设计春季联赛(1)
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
历史上的今天:
2021-04-27 流程控制图
2021-04-27 数组
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示