//根据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 }
原文地址:https://www.cnblogs.com/jlz-s/p/9705436.html
时间: 2024-11-16 05:21:10