using Kingdee.BOS.BusinessEntity.BusinessFlow; using Kingdee.BOS.Core.DynamicForm.PlugIn; using Kingdee.BOS.Core.DynamicForm.PlugIn.Args; using Kingdee.BOS.Util; using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; namespace GZ_LTHPilot_ORDER.SUB_PPBOM { [Description("服务插件:委外用料清单审核触发,根据生产车间||生产组织,修改委外用料清单明细行"), HotUpdate] public class AuditPOM : AbstractOperationServicePlugIn { public override void BeforeExecuteOperationTransaction(BeforeExecuteOperationTransaction e) { base.BeforeExecuteOperationTransaction(e); foreach (var Row in e.SelectedRows) { //获取单据信息 var Billobj = Row.DataEntity; //获取委外用料清单的委外组织 var SUB_PPBOMFSubOrgFname = SqlManage.SqlManage.GetSUB_PPBOMFSubOrgId(this.Context, Billobj["ID"].ToString()); if (SUB_PPBOMFSubOrgFname[0]["FNAME"].ToString() == "珠海派诺") { SqlManage.SqlManage.UpdateSUB_PPBOMFIsKeyComponent(this.Context, SUB_PPBOMFSubOrgFname[0]["FID"].ToString()); } } } } }