电脑桌面
添加蚂蚁七词文库到电脑桌面
安装后可以在桌面快捷访问

单据转换.二开案例.针对行做插入选单

来源:金蝶云社区作者:金蝶2024-09-237

单据转换.二开案例.针对行做插入选单

【场景】做插入行选单处理 【案例】二开实现,针对采购订单选单采购申请单,针对选中行位置插入关联关系行 ![image.webp](/download/0100131625c2ab4e4324beaa23773f21f470.webp) ![image.webp](/download/01008fe5497db8e9496e9e213067617e6f95.webp) ```csharp using Kingdee.BOS.Core.Bill.PlugIn; using Kingdee.BOS.Core.DynamicForm.PlugIn.Args; using Kingdee.BOS.Core.Metadata.ConvertElement.PlugIn; using Kingdee.BOS.Core.Metadata.ConvertElement.PlugIn.Args; using Kingdee.BOS.Core.Metadata.EntityElement; using Kingdee.BOS.Orm.DataEntity; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace DynamicFormPlugIn.BillConvert { public class ConstKey { public static readonly string Entity = "FPOOrderEntry"; public static readonly string OpParam = "DrawInsertPos"; } [Kingdee.BOS.Util.HotUpdate] [System.ComponentModel.Description("记录选中操作时的选中行")] public class DrawToInsertPos : AbstractBillPlugIn { public override void BeforeDoOperation(BeforeDoOperationEventArgs e) { if (e.Operation == null) return; if (e.Operation.FormOperation == null) return; if (!string.Equals(e.Operation.FormOperation.Operation, "Draw", StringComparison.OrdinalIgnoreCase)) return; int rowIdx = this.View.Model.GetEntryCurrentRowIndex(ConstKey.Entity); e.Option.SetVariableValue(ConstKey.OpParam, rowIdx); } } [Kingdee.BOS.Util.HotUpdate] [System.ComponentModel.Description("根据选中位置调整单据体数据包顺序")] public class ConvertServicePlugIn_DrawToInsertPos : AbstractConvertPlugIn { public override void AfterConvert(AfterConvertEventArgs e) { int rowIdx = 0; if (!this.Option.TryGetVariableValue(ConstKey.OpParam, out rowIdx)) return; if (rowIdx <= 0) return; Entity entity = e.TargetBusinessInfo.GetEntity(ConstKey.Entity); if (entity == null || entity.SeqDynamicProperty == null) return; var drawEntityResults = e.Result.FindByEntityKey(ConstKey.Entity); if (drawEntityResults == null || drawEntityResults.Length <= 0) return; int insertLinkSeq = rowIdx+1; H

单据转换.二开案例.针对行做插入选单

【场景】做插入行选单处理【案例】二开实现,针对采购订单选单采购申请单,针对选中行位置插入关联关系行![image.webp](/download/01001316...
点击下载文档文档为doc格式

声明:除非特别标注,否则均为本站原创文章,转载时请以链接形式注明文章出处。如若本站内容侵犯了原著者的合法权益,可联系本站删除。

已经是第一篇
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息
QQ群
  • 答案:my7c点击这里加入QQ群
支持邮箱
微信
  • 微信