//供应商的构建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;