二开案例.表单插件.全事件演示

栏目:云星空知识作者:金蝶来源:金蝶云社区发布:2024-09-23浏览:1

二开案例.表单插件.全事件演示

【案例演示】

演示表单插件所包含的全部事件及其触发顺序。

温馨提示:此贴为演示插件执行顺序的二开示例贴,不是插件事件的说明文档,需要看事件注释的,请移步至:https://vip.kingdee.com/article/22386

或者使用协同开发平台下载指定版本的星空的开发环境,通过VS工具查看。



【实现步骤】

<1>编写表单插件,代码如下。

using Kingdee.BOS.Util;
using System;
using System.ComponentModel;
namespace Jac.XkDemo.BOS.Business.PlugIn
{
    /// <summary>
    /// 【表单插件】全事件
    /// </summary>
    [Description("【表单插件】全事件"), HotUpdate]
    public class AllEventDynamicFormPlugIn : Kingdee.BOS.Core.DynamicForm.PlugIn.AbstractDynamicFormPlugIn
    {
        #region event
        public override void BeforeExportDataNew(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.BeforeExportDataNewArgs e)
        {
            PrintEventInfo("BeforeExportDataNew", e);
            base.BeforeExportDataNew(e);
        }
        public override void CreateNewData(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.BizDataEventArgs e)
        {
            PrintEventInfo("CreateNewData", e);
            base.CreateNewData(e);
        }
        public override void AfterCreateNewData(System.EventArgs e)
        {
            PrintEventInfo("AfterCreateNewData", e);
            base.AfterCreateNewData(e);
        }
        public override void OnChangeConvertRuleEnumList(Kingdee.BOS.Core.List.PlugIn.Args.ChangeConvertRuleEnumListEventArgs e)
        {
            PrintEventInfo("OnChangeConvertRuleEnumList", e);
            base.OnChangeConvertRuleEnumList(e);
        }
        public override void AfterCreateModelData(System.EventArgs e)
        {
            PrintEventInfo("AfterCreateModelData", e);
            base.AfterCreateModelData(e);
        }
        public override void BeforeControlDataBinder(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.BeforeControlDataBinder e)
        {
            PrintEventInfo("BeforeControlDataBinder", e);
            base.BeforeControlDataBinder(e);
        }
        public override void BeforeEntryRowDataBinder(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.BeforeEntryRowDataBinderArgs e)
        {
            PrintEventInfo("BeforeEntryRowDataBinder", e);
            base.BeforeEntryRowDataBinder(e);
        }
        public override void BeforeEntryBatchFill(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.BeforeBatchFillEventArgs e)
        {
            PrintEventInfo("BeforeEntryBatchFill", e);
            base.BeforeEntryBatchFill(e);
        }
        public override void AfterEntryBatchFill(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.AfterBatchFillEventArgs e)
        {
            PrintEventInfo("AfterEntryBatchFill", e);
            base.AfterEntryBatchFill(e);
        }
        public override void BeforeCreateNewEntryRow(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.BeforeCreateNewEntryEventArgs e)
        {
            PrintEventInfo("BeforeCreateNewEntryRow", e);
            base.BeforeCreateNewEntryRow(e);
        }
        public override void AfterCreateNewEntryRow(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.CreateNewEntryEventArgs e)
        {
            PrintEventInfo("AfterCreateNewEntryRow", e);
            base.AfterCreateNewEntryRow(e);
        }
        public override void BeforeDeleteRow(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.BeforeDeleteRowEventArgs e)
        {
            PrintEventInfo("BeforeDeleteRow", e);
            base.BeforeDeleteRow(e);
        }
        public override void AfterDeleteRow(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.AfterDeleteRowEventArgs e)
        {
            PrintEventInfo("AfterDeleteRow", e);
            base.AfterDeleteRow(e);
        }
        public override void BeforeUpdateValue(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.BeforeUpdateValueEventArgs e)
        {
            PrintEventInfo("BeforeUpdateValue", e);
            base.BeforeUpdateValue(e);
        }
        public override void DataChanged(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.DataChangedEventArgs e)
        {
            PrintEventInfo("DataChanged", e);
            base.DataChanged(e);
        }
        public override void AfterCopyRow(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.AfterCopyRowEventArgs e)
        {
            PrintEventInfo("AfterCopyRow", e);
            base.AfterCopyRow(e);
        }
        public override void BeforeDeleteEntry(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.BeforeDeleteEntryEventArgs e)
        {
            PrintEventInfo("BeforeDeleteEntry", e);
            base.BeforeDeleteEntry(e);
        }
        public override void AfterDeleteEntry(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.AfterDeleteEntryEventArgs e)
        {
            PrintEventInfo("AfterDeleteEntry", e);
            base.AfterDeleteEntry(e);
        }
        public override System.Collections.Generic.List<Kingdee.BOS.Core.Metadata.TreeNode> GetTreeViewData(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.TreeNodeArgs e)
        {
            PrintEventInfo("GetTreeViewData", e);
            return base.GetTreeViewData(e);
        }
        public override void BeforeSetItemValueByNumber(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.BeforeSetItemValueByNumberArgs e)
        {
            PrintEventInfo("BeforeSetItemValueByNumber", e);
            base.BeforeSetItemValueByNumber(e);
        }
        public override void GroupSearchMenuPanelAction(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.GroupSearchMenuPanelEventArgs e)
        {
            PrintEventInfo("GroupSearchMenuPanelAction", e);
            base.GroupSearchMenuPanelAction(e);
        }
        public override void ProductsPanelAction(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.ProductsPanelEventArgs e)
        {
            PrintEventInfo("ProductsPanelAction", e);
            base.ProductsPanelAction(e);
        }
        public override void PreOpenForm(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.PreOpenFormEventArgs e)
        {
            PrintEventInfo("PreOpenForm", e);
            base.PreOpenForm(e);
        }
        public override void OnInitialize(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.InitializeEventArgs e)
        {
            PrintEventInfo("OnInitialize", e);
            base.OnInitialize(e);
        }
        public override void OnInitializeService(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.InitializeServiceEventArgs e)
        {
            PrintEventInfo("OnInitializeService", e);
            base.OnInitializeService(e);
        }
        public override void OnSetBusinessInfo(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.SetBusinessInfoArgs e)
        {
            PrintEventInfo("OnSetBusinessInfo", e);
            base.OnSetBusinessInfo(e);
        }
        public override void OnSetLayoutInfo(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.SetLayoutInfoArgs e)
        {
            PrintEventInfo("OnSetLayoutInfo", e);
            base.OnSetLayoutInfo(e);
        }
        public override void OnCreateDataBinder(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.CreateDataBinderArgs e)
        {
            PrintEventInfo("OnCreateDataBinder", e);
            base.OnCreateDataBinder(e);
        }
        public override void OnLoad(System.EventArgs e)
        {
            PrintEventInfo("OnLoad", e);
            base.OnLoad(e);
        }
        public override void BeforeClosed(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.BeforeClosedEventArgs e)
        {
            PrintEventInfo("BeforeClosed", e);
            base.BeforeClosed(e);
        }
        public override void BeforeFlexClosed(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.BeforeClosedEventArgs e)
        {
            PrintEventInfo("BeforeFlexClosed", e);
            base.BeforeFlexClosed(e);
        }
        public override void AfterShowFlexForm(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.AfterShowFlexFormEventArgs e)
        {
            PrintEventInfo("AfterShowFlexForm", e);
            base.AfterShowFlexForm(e);
        }
        public override void Dispose()
        {
            PrintEventInfo("Dispose");
            base.Dispose();
        }
        public override void BeforeBindData(System.EventArgs e)
        {
            PrintEventInfo("BeforeBindData", e);
            base.BeforeBindData(e);
        }
        public override void AfterBindData(System.EventArgs e)
        {
            PrintEventInfo("AfterBindData", e);
            base.AfterBindData(e);
        }
        public override void AfterUpdateViewState(System.EventArgs e)
        {
            PrintEventInfo("AfterUpdateViewState", e);
            base.AfterUpdateViewState(e);
        }
        public override void OnTimerElapsed(System.EventArgs e)
        {
            PrintEventInfo("OnTimerElapsed", e);
            base.OnTimerElapsed(e);
        }
        public override void OnQueryProgressValue(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.QueryProgressValueEventArgs e)
        {
            PrintEventInfo("OnQueryProgressValue", e);
            base.OnQueryProgressValue(e);
        }
        public override void BarItemClick(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.BarItemClickEventArgs e)
        {
            PrintEventInfo("BarItemClick", e);
            base.BarItemClick(e);
        }
        public override void ContextMenuItemClick(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.ContextMenuItemClickEventArgs e)
        {
            PrintEventInfo("ContextMenuItemClick", e);
            base.ContextMenuItemClick(e);
        }
        public override void EntryBarItemClick(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.BarItemClickEventArgs e)
        {
            PrintEventInfo("EntryBarItemClick", e);
            base.EntryBarItemClick(e);
        }
        public override void ToolBarItemClick(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.BarItemClickEventArgs e)
        {
            PrintEventInfo("ToolBarItemClick", e);
            base.ToolBarItemClick(e);
        }
        public override void AfterBarItemClick(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.AfterBarItemClickEventArgs e)
        {
            PrintEventInfo("AfterBarItemClick", e);
            base.AfterBarItemClick(e);
        }
        public override void AfterEntryBarItemClick(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.AfterBarItemClickEventArgs e)
        {
            PrintEventInfo("AfterEntryBarItemClick", e);
            base.AfterEntryBarItemClick(e);
        }
        public override void AfterToolBarItemClick(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.AfterBarItemClickEventArgs e)
        {
            PrintEventInfo("AfterToolBarItemClick", e);
            base.AfterToolBarItemClick(e);
        }
        public override void ButtonClick(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.ButtonClickEventArgs e)
        {
            PrintEventInfo("ButtonClick", e);
            base.ButtonClick(e);
        }
        public override void ChangeHTmlTheme(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.HtmlThemeEventArgs e)
        {
            PrintEventInfo("ChangeHTmlTheme", e);
            base.ChangeHTmlTheme(e);
        }
        public override void EntryButtonCellClick(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.EntryButtonCellClickEventArgs e)
        {
            PrintEventInfo("EntryButtonCellClick", e);
            base.EntryButtonCellClick(e);
        }
        public override void AfterButtonClick(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.AfterButtonClickEventArgs e)
        {
            PrintEventInfo("AfterButtonClick", e);
            base.AfterButtonClick(e);
        }
        public override void TreeNodeClick(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.TreeNodeArgs e)
        {
            PrintEventInfo("TreeNodeClick", e);
            base.TreeNodeClick(e);
        }
        public override void TreeNodeDoubleClick(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.TreeNodeArgs e)
        {
            PrintEventInfo("TreeNodeDoubleClick", e);
            base.TreeNodeDoubleClick(e);
        }
        public override void TreeLoadData(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.TreeLoadDataArgs e)
        {
            PrintEventInfo("TreeLoadData", e);
            base.TreeLoadData(e);
        }
        public override void BeforeDoAction(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.BeforeDoActionEventArgs e)
        {
            PrintEventInfo("BeforeDoAction", e);
            base.BeforeDoAction(e);
        }
        public override void AfterDoAction(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.AfterDoActionEventArgs e)
        {
            PrintEventInfo("AfterDoAction", e);
            base.AfterDoAction(e);
        }
        public override void AuthPermissionBeforeF7Select(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.AuthPermissionBeforeF7SelectEventArgs e)
        {
            PrintEventInfo("AuthPermissionBeforeF7Select", e);
            base.AuthPermissionBeforeF7Select(e);
        }
        public override void BeforeF7Select(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.BeforeF7SelectEventArgs e)
        {
            PrintEventInfo("BeforeF7Select", e);
            base.BeforeF7Select(e);
        }
        public override void AfterF7Select(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.AfterF7SelectEventArgs e)
        {
            PrintEventInfo("AfterF7Select", e);
            base.AfterF7Select(e);
        }
        public override void AfterQuickGetData(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.AfterQuickGetDataEventArgs e)
        {
            PrintEventInfo("AfterQuickGetData", e);
            base.AfterQuickGetData(e);
        }
        public override void AfterQuickSelect(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.AfterQuickSelectEventArgs e)
        {
            PrintEventInfo("AfterQuickSelect", e);
            base.AfterQuickSelect(e);
        }
        public override void BeforeFlexSelect(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.BeforeFlexSelectEventArgs e)
        {
            PrintEventInfo("BeforeFlexSelect", e);
            base.BeforeFlexSelect(e);
        }
        public override void BeforeFilterGridF7Select(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.BeforeFilterGridF7SelectEventArgs e)
        {
            PrintEventInfo("BeforeFilterGridF7Select", e);
            base.BeforeFilterGridF7Select(e);
        }
        public override void AfterShowCustomerPage(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.AfterShowCustomerPageEventArgs e)
        {
            PrintEventInfo("AfterShowCustomerPage", e);
            base.AfterShowCustomerPage(e);
        }
        public override void AfterShowForm(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.AfterShowFormEventArgs e)
        {
            PrintEventInfo("AfterShowForm", e);
            base.AfterShowForm(e);
        }
        public override void BeforeDoOperation(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.BeforeDoOperationEventArgs e)
        {
            PrintEventInfo("BeforeDoOperation", e);
            base.BeforeDoOperation(e);
        }
        public override void BeforeOperAfterSelOrg(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.BeforeOperAfterSelOrgArgs e)
        {
            PrintEventInfo("BeforeOperAfterSelOrg", e);
            base.BeforeOperAfterSelOrg(e);
        }
        public override void AfterDoOperation(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.AfterDoOperationEventArgs e)
        {
            PrintEventInfo("AfterDoOperation", e);
            base.AfterDoOperation(e);
        }
        public override void AfterConfirmOperation(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.AfterConfirmOperationEventArgs e)
        {
            PrintEventInfo("AfterConfirmOperation", e);
            base.AfterConfirmOperation(e);
        }
        public override void ListViewClick(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.ListViewClickArgs e)
        {
            PrintEventInfo("ListViewClick", e);
            base.ListViewClick(e);
        }
        public override void ListViewAddFavorClick(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.ListViewClickArgs e)
        {
            PrintEventInfo("ListViewAddFavorClick", e);
            base.ListViewAddFavorClick(e);
        }
        public override void ListViewClearClick(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.ListViewClickArgs e)
        {
            PrintEventInfo("ListViewClearClick", e);
            base.ListViewClearClick(e);
        }
        public override void TreeDragDrop(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.TreeDragDropEventArgs e)
        {
            PrintEventInfo("TreeDragDrop", e);
            base.TreeDragDrop(e);
        }
        public override void LanguageChanged(System.EventArgs e)
        {
            PrintEventInfo("LanguageChanged", e);
            base.LanguageChanged(e);
        }
        public override void EntityRowClick(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.EntityRowClickEventArgs e)
        {
            PrintEventInfo("EntityRowClick", e);
            base.EntityRowClick(e);
        }
        public override void EntryCellFocued(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.EntryCellFocuedEventArgs e)
        {
            PrintEventInfo("EntryCellFocued", e);
            base.EntryCellFocued(e);
        }
        public override void EntityRowDoubleClick(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.EntityRowClickEventArgs e)
        {
            PrintEventInfo("EntityRowDoubleClick", e);
            base.EntityRowDoubleClick(e);
        }
        public override void TabItemSelectedChange(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.TabItemSelectedChangeEventArgs e)
        {
            PrintEventInfo("TabItemSelectedChange", e);
            base.TabItemSelectedChange(e);
        }
        public override void CustomEvents(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.CustomEventsArgs e)
        {
            PrintEventInfo("CustomEvents", e);
            base.CustomEvents(e);
        }
        public override void RowExpanding(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.EntityRowClickEventArgs e)
        {
            PrintEventInfo("RowExpanding", e);
            base.RowExpanding(e);
        }
        public override void HeaderCellClick(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.EntityRowClickEventArgs e)
        {
            PrintEventInfo("HeaderCellClick", e);
            base.HeaderCellClick(e);
        }
        public override void DataUpdateBeginning()
        {
            PrintEventInfo("DataUpdateBeginning");
            base.DataUpdateBeginning();
        }
        public override void DataUpdateEnd()
        {
            PrintEventInfo("DataUpdateEnd");
            base.DataUpdateEnd();
        }
        public override void NaviOperAction(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.NaviOperActionArgs e)
        {
            PrintEventInfo("NaviOperAction", e);
            base.NaviOperAction(e);
        }
        public override void FieldLabelClick(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.FieldLabelClickArgs e)
        {
            PrintEventInfo("FieldLabelClick", e);
            base.FieldLabelClick(e);
        }
        public override void FireEntityBlockPasting(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.EntityBlockPastingEventArgs e)
        {
            PrintEventInfo("FireEntityBlockPasting", e);
            base.FireEntityBlockPasting(e);
        }
        public override void BeforeF1Click(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.F1ClickArgs e)
        {
            PrintEventInfo("BeforeF1Click", e);
            base.BeforeF1Click(e);
        }
        public override void BeforeImportData(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.BeforeImportDataArgs e)
        {
            PrintEventInfo("BeforeImportData", e);
            base.BeforeImportData(e);
        }
        public override void ImportDataCollectFailInfo(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.ImportDataBeforeCollectFailInfoArgs e)
        {
            PrintEventInfo("ImportDataCollectFailInfo", e);
            base.ImportDataCollectFailInfo(e);
        }
        public override void BeforeExportData(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.BeforeExportDataArgs e)
        {
            PrintEventInfo("BeforeExportData", e);
            base.BeforeExportData(e);
        }
        public override void BeforeEntityExport(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.BeforeEntityExportArgs e)
        {
            PrintEventInfo("BeforeEntityExport", e);
            base.BeforeEntityExport(e);
        }
        public override void FireEntryCheck(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.FEntryCheckArgs e)
        {
            PrintEventInfo("FireEntryCheck", e);
            base.FireEntryCheck(e);
        }
        public override void FireMicroBlogClick(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.FMicroBlogClickArgs e)
        {
            PrintEventInfo("FireMicroBlogClick", e);
            base.FireMicroBlogClick(e);
        }
        public override void PortDataReceived(Kingdee.BOS.DataEntity.KDSerialPortEventArgs e)
        {
            PrintEventInfo("PortDataReceived", e);
            base.PortDataReceived(e);
        }
        public override void MsgInnerControlEvent(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.MsgInnerControlEventArgs e)
        {
            PrintEventInfo("MsgInnerControlEvent", e);
            base.MsgInnerControlEvent(e);
        }
        public override void GetFormTitle(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.GetFormTitleEventArgs e)
        {
            PrintEventInfo("GetFormTitle", e);
            base.GetFormTitle(e);
        }
        public override void OnEntrySum(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.EntrySumEventArgs e)
        {
            PrintEventInfo("OnEntrySum", e);
            base.OnEntrySum(e);
        }
        public override void OnQueryFlexFieldState(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.OnQueryFlexFieldStateEventArgs e)
        {
            PrintEventInfo("OnQueryFlexFieldState", e);
            base.OnQueryFlexFieldState(e);
        }
        public override void OnPrepareDevPrintData(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.PreparePrintDevDataEventArgs e)
        {
            PrintEventInfo("OnPrepareDevPrintData", e);
            base.OnPrepareDevPrintData(e);
        }
        public override void OnPrepareNotePrintData(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.PreparePrintDataEventArgs e)
        {
            PrintEventInfo("OnPrepareNotePrintData", e);
            base.OnPrepareNotePrintData(e);
        }
        public override void OnPrepareNotePrintQueryParam(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.PrepareNotePrintQueryParamEventArgs e)
        {
            PrintEventInfo("OnPrepareNotePrintQueryParam", e);
            base.OnPrepareNotePrintQueryParam(e);
        }
        public override void OnQueryDynamicColumns(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.QueryDynamicColumnsEventArgs e)
        {
            PrintEventInfo("OnQueryDynamicColumns", e);
            base.OnQueryDynamicColumns(e);
        }
        public override void OnAfterPrint(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.AfterPrintEventArgs e)
        {
            PrintEventInfo("OnAfterPrint", e);
            base.OnAfterPrint(e);
        }
        public override System.Collections.Generic.List<Kingdee.BOS.Core.Metadata.EnumItem> GetValidNoteTemplates(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.ValidNoteTemplatesEventArgs e)
        {
            PrintEventInfo("GetValidNoteTemplates", e);
            return base.GetValidNoteTemplates(e);
        }
        public override void OnAfterWebApiOperation(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.AfterWebApiOperationArgs e)
        {
            PrintEventInfo("OnAfterWebApiOperation", e);
            base.OnAfterWebApiOperation(e);
        }
        public override void OnBeforeWebApiOperation(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.AfterWebApiOperationArgs e)
        {
            PrintEventInfo("OnBeforeWebApiOperation", e);
            base.OnBeforeWebApiOperation(e);
        }
        #endregion
        #region private method
        /// <summary>
        /// 事件执行次数计数器
        /// </summary>
        private int counter;
        /// <summary>
        /// 事件执行次数计数器
        /// </summary>
        private int Counter
        {
            get { return ++counter; }
        }
        /// <summary>
        /// 输出事件执行日志
        /// </summary>
        /// <param name="eventName">事件名称</param>
        /// <param name="args">事件参数</param>
        private void PrintEventInfo(string eventName, params object[] args)
        {
            var formId = GetFormId();
            var parameters = string.Empty;
            try
            {
                //parameters = Newtonsoft.Json.JsonConvert.SerializeObject(args);// 性能较差,可能会导致页面假死
            }
            catch
            {
            }
            var log = string.Format("序号:{0},执行时间:{1},表单Id:{2},事件名称:{3},事件参数:{4}", Counter, DateTime.Now.ToString("yyyy -MM-dd HH:mm:ss.fff"), formId, eventName, parameters);
            System.Diagnostics.Debug.Print(log);
            Kingdee.BOS.Log.Logger.Error("EVENT", log, null);
        }
        /// <summary>
        /// 获取业务对象标识
        /// </summary>
        /// <returns></returns>
        private string GetFormId()
        {
            var formId = string.Empty;
            if (this.View != null && this.View.BillBusinessInfo != null)
            {
                formId = this.View.BillBusinessInfo.GetForm().Id;
            }
            return formId;
        }
        #endregion
    }
}

<2>拷贝插件组件到应用站点的WebSite\Bin目录下,重启IIS。


<3>BOSIDE扩展采购订单,注册表单插件,保存元数据,开发完毕。


现在可以登录业务站点,打开采购订单编辑界面,观察表单插件的事件的触发顺序啦。

---------------------------------------------------------------------------------------------------------












【金蝶云星空BOS二次开发案例演示】https://vip.kingdee.com/article/94751030918525696


二开案例.表单插件.全事件演示

【案例演示】演示表单插件所包含的全部事件及其触发顺序。温馨提示:此贴为演示插件执行顺序的二开示例贴,不是插件事件的说明文档,需要看...
点击下载文档
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息