金蝶二次开发C#

1 建立C#类库项目

引用EBOS组建Kingdee.K3.BOS.PlugInModel

示例代码

 

usingSystem;
usingSystem.Collections.Generic;
usingSystem.Text;
usingKingdee.K3.BOS.PlugInModel.Bill;
usingKingdee.K3.BOS.PlugInModel.Bill.Events;
namespaceKingdee.K3.BOS.Plugint
{
    public class BillPlugin : IBillPlugIn
    {
        private BillInterface m_oBillInterface
        public void Show(BillInterface oBillInterface)
        {
            m_oBillInterface = oBillInterface;
            m_oBillInterface.CommandClick += new CommandClickHandler(m_oBillInterface_CommandClick);
        }
        void m_oBillInterface_CommandClick(object sender, CommandClickEventArgs e)
        {
            switch (e.CommandName)
            {
                case "FBUTTON":
                    m_oBillInterface.Alert(m_oBillInterface.GetFieldValue("FBillNo").ToString());
                    break;
                default:
                    break;
            }}}}

4 DLL文件部署路径//K3ERP/KDHR/SITEFILE/WEBUI/BIN

插件中输入命名空间名+类名

可设置程序属性中的生成目录为//K3ERP/KDHR/SITEFILE/WEBUI/BIN方便测试和部署

调试附加到进程 w3wp.exewinSer系统)/aspnet_wp.exexp系统)

原文地址:https://www.cnblogs.com/qiu18359243869/p/10943371.html