利用金蝶原生插件实现列表中某个字段的批量修改原创
金蝶云社区-老男孩2020
老男孩2020
11人赞赏了该文章 1750次浏览 未经作者许可,禁止转载编辑于2021年07月16日 11:29:54

简单几步操作:1.在列表里增加一个按钮,按钮id为代码中的“tbBatchUpdate”。

                        2.在表单的字段里,选择功能控制,把需要的字段添加为可批量修改。

                        3.编写按钮动作代码,"BD_BulkEdit" 为金蝶自带的批量修改动态表单

就是这么简单!

image.png

按钮动作代码代码如下:

using Kingdee.BOS.Core.DynamicForm;

using System.ComponentModel;

using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;

using Kingdee.BOS.Core.List.PlugIn;


namespace XWX.bos.Batchupdate.PlugIn

{

    [Description("批量更新")]

    [Kingdee.BOS.Util.HotUpdate]

    public class UpdateDataFace : AbstractListPlugIn

    {

        public override void BarItemClick(BarItemClickEventArgs e)

        {

            base.BarItemClick(e);

            if (e.BarItemKey.Equals("tbBatchUpdate"))

            {

           

                    DynamicFormShowParameter formParameter = new DynamicFormShowParameter();

                    formParameter.FormId = "BD_BulkEdit";

                    this.View.ShowForm(formParameter);

            


            }

        }

    }

}

            

赞 11