WEB层和APP层区别是什么,如下两段代码
2,881次浏览
编辑于2015年11月29日 13:22:34
第一段代码:using Kingdee.BOS.Core.DynamicForm.PlugIn;using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;using Kingdee.BOS.ServiceHelper;using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace MyDynamicFormPlugIn{ public class Class5 : AbstractDynamicFormPlugIn { public override void ButtonClick(ButtonClickEventArgs e) { //禁用物料id为10001和10002的数据 BusinessDataServiceHelper.SetState( this.Context, "T_BD_Material", "FForbidStatus", "B", "FMaterialdId", new object[] { 10001, 10002 }); } }}第二段代码:using Kingdee.BOS.Contracts;using Kingdee.BOS.Core.DynamicForm.PlugIn;using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace MyOperaionServicePlugIn{ public class Class4 : AbstractOperationServicePlugIn { public override void BeforeExecuteOperationTransaction(BeforeExecuteOperationTransaction e) { //获取数据服务 IBusinessDataService businessDataService = Kingdee.BOS.App.ServiceHelper.GetService(); businessDataService.SetState( this.Context, "T_BD_Material", "FForbidStatus", "B", "FMaterialId", new object[] { 10001, 10002 }); } }}
推荐阅读