this.Model.SetValue提高单据体数据插入速度

栏目:云星空知识作者:金蝶来源:金蝶云社区发布:2024-09-16浏览:1

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提高单据体数据插入速度

if (e.BarItemKey.EqualsIgnoreCase("BEC_tbButton")) { Int64 orgId = this.Context.CurrentOrganizationInfo...
点击下载文档
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息