生产齐套分析单保存后自动调用分析操作原创
6人赞赏了该文章
202次浏览
未经作者许可,禁止转载编辑于2024年04月12日 13:18:11
新建表单插件:
代码示例:该部分代码从标准插件中搬运而来 ... 适用于表单操作,在webapi接口调用不生效 ..
public override void AfterDoOperation(AfterDoOperationEventArgs e) { base.AfterDoOperation(e); if ("SAVE".Equals(e.Operation.Operation.ToUpper())) { IOperationResult opResult = new OperationResult(); PrepareAnalysisOption prepareAnalysisOption = new PrepareAnalysisOption { PrepareMtrlData = this.View.Model.DataObject, ClassName = "Kingdee.K3.MFG.PRD.App.Core.PrepareMtrlService,Kingdee.K3.MFG.PRD.App.Core", MethodName = "AsyncMatchAnalyse", Title = ResManager.LoadKDString("齐套分析", "015078000039584", (SubSystemType)7, new object[0]), Result = opResult, ExtendOption = OperateOption.Create(), CallBack = delegate (IOperationResult x) { if (this.View != null) { if (!opResult.IsSuccess) { this.View.ShowOperateResult(opResult.OperateResult, delegate (FormResult formresult) { this.View.Refresh(); }, "BOS_BatchTips"); } else { this.View.ShowMessage(ResManager.LoadKDString("分析成功", "015078000018914", (SubSystemType)7, new object[0]), MessageBoxType.Notice); this.View.Refresh(); } this.View.OpenParameter.SetCustomParameter("AnalyseResult", opResult); ((IDynamicFormViewService)this.View).CustomEvents("Analyse", "Analyse", "AnalyseResult"); } } }; PrepareMtrlAsyncAnalysiser.MatchAnalyse(this.View, prepareAnalysisOption); return; } }
赞 6
6人点赞
还没有人点赞,快来当第一个点赞的人吧!
打赏
0人打赏
还没有人打赏,快来当第一个打赏的人吧!
推荐阅读