this.Model.SetValue提高单据体数据插入速度
if (e.BarItemKey.EqualsIgnoreCase("BEC_tbButton")) { Int64 orgId = this.Context.CurrentOrganizationInfo.ID; this.View.Model.DeleteEntryData("FEntity"); string sql = string.Format("/*dialect*/EXEC CPZ_QT @orgId={0}", orgId); var entity = this.View.BillBusinessInfo.GetEntity("FEntity"); var rows = this.View.Model.GetEntityDataObject(entity); DynamicObjectCollection doc = DBUtils.ExecuteDynamicObject(this.Context, sql); for (int i = 0; i < doc.Count; i++) { var row = new DynamicObject(rows.DynamicCollectionItemPropertyType); row["Seq"] = rows.Count + 1; BaseDataField Material = this.View.BusinessInfo.GetField("FPRODUCTID") as BaseDataField; var materialObj = Kingdee.BOS.ServiceHelper.BusinessDataServiceHelper.LoadSingle(this.Context, doc[i]["FMATERIALID"], fldMaterial.RefFormDynamicObjectType); Material.RefIDDynamicProperty.SetValue(row, doc[i]["FMATERIALID"]); Material.DynamicProperty.SetValue(row, materialObj); rows.Add(row); } this.View.UpdateView("FEntity"); }
this.Model.SetValue提高单据体数据插入速度
本文2024-09-16 17:43:37发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-17562.html