金蝶二次开发之C#编写EBOS插件

1 建立C#类库项目

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

3 示例代码

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

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

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

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

posted @ 2013-01-19 16:35  M守护神  阅读(1243)  评论(0编辑  收藏  举报