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...
点击下载文档
上一篇:客户对账单二开添加字段下一篇:未来期间数最大值修改
本文2024-09-16 18:27:49发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-22308.html
您需要登录后才可以发表评论, 登录登录 或者 注册
最新文档
热门文章