K3Cloud 根据单据ID 获取单据视图和数据包
Posted jlz-s
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了K3Cloud 根据单据ID 获取单据视图和数据包相关的知识,希望对你有一定的参考价值。
//根据ID获取单据,然后正常修改单据。
1 private object GetSalDeliveryNotictView(long billFid) 2 { 3 if (this.formMetaData == null) 4 { 5 this.formMetaData = (FormMetadata)MetaDataServiceHelper.Load(base.Context, "SAL_DELIVERYNOTICE", true); 6 } 7 BusinessInfo businessInfo = this.formMetaData.BusinessInfo; 8 Form form = businessInfo.GetForm(); 9 IResourceServiceProvider formServiceProvider = form.GetFormServiceProvider(false); 10 BillOpenParameter billOpenParameter = new BillOpenParameter("SAL_DELIVERYNOTICE", null); 11 billOpenParameter.SetCustomParameter("formID", "SAL_DELIVERYNOTICE"); 12 billOpenParameter.SetCustomParameter("pk", billFid); 13 billOpenParameter.SetCustomParameter("status", "EDIT"); 14 billOpenParameter.SetCustomParameter("PlugIns", businessInfo.GetForm().CreateFormPlugIns()); 15 billOpenParameter.Context = base.Context; 16 billOpenParameter.FormMetaData = this.formMetaData; 17 billOpenParameter.LayoutId = billOpenParameter.FormMetaData.GetLayoutInfo().Id; 18 billOpenParameter.PkValue = billFid; 19 billOpenParameter.Status = OperationStatus.EDIT; 20 object service = formServiceProvider.GetService(typeof(IDynamicFormView)); 21 (service as IBillViewService).Initialize(billOpenParameter, formServiceProvider); 22 (service as IBillView).OpenParameter.Status = OperationStatus.EDIT; 23 (service as IBillViewService).LoadData(); 24 (service as IBillView).CommitNetworkCtrl(); 25 return service; 26 }
以上是关于K3Cloud 根据单据ID 获取单据视图和数据包的主要内容,如果未能解决你的问题,请参考以下文章