private void InitOnPostBack()
        {
            this.buttonHelper = new ButtonHelper(this);
            this.buttonHelper.SetEditObjectHandle         = new SetEditObjectDelegate(this.SetEditObject);
            this.buttonHelper.AfterPageStatusChangeHandle = new PageStatusChangeDelegate(this.buttonHelper_AfterPageStatusChangeHandle);

            this.gridHelper = new GridHelperNew(this.gridWebGrid, this.DtSource);
            this.gridHelper.LoadDataSourceHandle = new LoadDataSourceDelegateNew(this.LoadDataSource);
            this.gridHelper.BuildGridRowhandle   = new BuildGridRowDelegateNew(this.GetGridRow);

            this.pagerToolBar.OnPagerToolBarClick += new EventHandler(this.PagerToolBar_OnPagerToolBarClick);
        }
示例#2
0
        private void InitOnPostBack()
        {
            this.buttonHelper = new ButtonHelper(this);

            this.gridHelper = new GridHelperNew(this.gridWebGrid, this.DtSource);
            this.gridHelper.LoadDataSourceHandle = new LoadDataSourceDelegateNew(this.LoadDataSource);
            this.gridHelper.BuildGridRowhandle   = new BuildGridRowDelegateNew(this.GetGridRow);

            this.pagerToolBar.OnPagerToolBarClick       += new EventHandler(this.PagerToolBar_OnPagerToolBarClick);
            this.excelExporter.LoadExportDataHandle      = new LoadExportDataDelegate(LoadDataSource);
            this.excelExporter.FormatExportRecordHandle  = new FormatExportRecordDelegate(FormatExportRecord);
            this.excelExporter.GetColumnHeaderTextHandle = new GetColumnHeaderTextDelegate(GetColumnHeaderText);
        }
示例#3
0
        private void InitOnPostBack()
        {
            this.buttonHelper = new ButtonHelper(this);
            this.buttonHelper.SetEditObjectHandle         = new SetEditObjectDelegate(this.SetEditObject);
            this.buttonHelper.AfterPageStatusChangeHandle = new PageStatusChangeDelegate(this.buttonHelper_AfterPageStatusChangeHandle);

            this.gridHelper = new GridHelperNew(this.gridWebGrid, this.DtSource);
            this.gridHelper.LoadDataSourceHandle = new LoadDataSourceDelegateNew(this.LoadDataSource);
            this.gridHelper.BuildGridRowhandle   = new BuildGridRowDelegateNew(this.GetGridRow);

            this.pagerToolBar.OnPagerToolBarClick       += new EventHandler(this.PagerToolBar_OnPagerToolBarClick);
            this.excelExporter.LanguageComponent         = this.languageComponent1;
            this.excelExporter.LoadExportDataHandle      = new LoadExportDataDelegate(LoadDataSource);
            this.excelExporter.FormatExportRecordHandle  = new FormatExportRecordDelegate(FormatExportRecord);
            this.excelExporter.GetColumnHeaderTextHandle = new GetColumnHeaderTextDelegate(GetColumnHeaderText);
        }
示例#4
0
        private void InitOnPostBack()
        {
            #region ButtonHelper
            this.buttonHelper = new ButtonHelper(this);
            this.buttonHelper.SetEditObjectHandle         = new SetEditObjectDelegate(this.SetEditObject);
            this.buttonHelper.AfterPageStatusChangeHandle = new PageStatusChangeDelegate(this.buttonHelper_AfterPageStatusChangeHandle);

            if (this.buttonHelper.CmdAdd != null)
            {
                this.buttonHelper.CmdAdd.ServerClick += new EventHandler(cmdAdd_Click);
            }

            if (this.buttonHelper.CmdSelect != null)
            {
                this.buttonHelper.CmdSelect.ServerClick += new EventHandler(cmdSelect_Click);
            }

            if (this.buttonHelper.CmdDelete != null)
            {
                this.buttonHelper.CmdDelete.ServerClick += new EventHandler(cmdDelete_Click);
            }

            if (this.buttonHelper.CmdSave != null)
            {
                this.buttonHelper.CmdSave.ServerClick += new EventHandler(cmdSave_Click);
            }

            if (this.buttonHelper.CmdCancel != null)
            {
                this.buttonHelper.CmdCancel.ServerClick += new EventHandler(cmdCancel_Click);
            }

            if (this.buttonHelper.CmdQuery != null)
            {
                this.buttonHelper.CmdQuery.ServerClick += new EventHandler(cmdQuery_Click);
            }

            if (this.buttonHelper.CmdExport != null)
            {
                this.buttonHelper.CmdExport.ServerClick += new EventHandler(cmdExport_Click);
            }
            #endregion

            #region GridHelper
            this.gridHelper = new GridHelper(this.gridWebGrid);
            this.gridHelper.LoadDataSourceHandle = new LoadDataSourceDelegate(this.LoadDataSource);
            this.gridHelper.GetRowCountHandle    = new GetRowCountDelegate(this.GetRowCount);
            this.gridHelper.BuildGridRowhandle   = new BuildGridRowDelegate(this.GetGridRow);

            if (this.gridHelper.Grid != null)
            {
                //this.gridHelper.Grid.DblClick += new ClickEventHandler(Grid_DblClick);
                this.gridHelper.Grid.ClickCellButton += new ClickCellButtonEventHandler(Grid_ClickCellButton);
            }
            #endregion

            #region Exporter
            this.excelExporter.LoadExportDataHandle      = new LoadExportDataDelegate(LoadDataSource);
            this.excelExporter.FormatExportRecordHandle  = new FormatExportRecordDelegate(FormatExportRecord);
            this.excelExporter.GetColumnHeaderTextHandle = new GetColumnHeaderTextDelegate(GetColumnHeaderText);
            #endregion
        }
示例#5
0
        protected virtual void InitOnPostBack()
        {
            #region ButtonHelper
            this.buttonHelper = new ButtonHelper(this);
            this.buttonHelper.SetEditObjectHandle         = new SetEditObjectDelegate(this.SetEditObject);
            this.buttonHelper.AfterPageStatusChangeHandle = new PageStatusChangeDelegate(this.buttonHelper_AfterPageStatusChangeHandle);

            //没有绑定事件的才需要新增点击事件
            if (this.buttonHelper.CmdAdd != null && buttonHelper.CmdAdd.Attributes["bindclick"] == null)
            {
                this.buttonHelper.CmdAdd.ServerClick += new EventHandler(cmdAdd_Click);
            }

            if (this.buttonHelper.CmdSelect != null && buttonHelper.CmdSelect.Attributes["bindclick"] == null)
            {
                this.buttonHelper.CmdSelect.ServerClick += new EventHandler(cmdSelect_Click);
            }

            if (this.buttonHelper.CmdDelete != null && buttonHelper.CmdDelete.Attributes["bindclick"] == null)
            {
                this.buttonHelper.CmdDelete.ServerClick += new EventHandler(cmdDelete_Click);
            }

            if (this.buttonHelper.CmdSave != null && buttonHelper.CmdSave.Attributes["bindclick"] == null)
            {
                this.buttonHelper.CmdSave.ServerClick += new EventHandler(cmdSave_Click);
            }

            if (this.buttonHelper.CmdCancel != null && buttonHelper.CmdCancel.Attributes["bindclick"] == null)
            {
                this.buttonHelper.CmdCancel.ServerClick += new EventHandler(cmdCancel_Click);
            }

            if (this.buttonHelper.CmdQuery != null && buttonHelper.CmdQuery.Attributes["bindclick"] == null)
            {
                this.buttonHelper.CmdQuery.ServerClick += new EventHandler(cmdQuery_Click);
            }

            if (this.buttonHelper.CmdExport != null && buttonHelper.CmdExport.Attributes["bindclick"] == null)
            {
                this.buttonHelper.CmdExport.ServerClick += new EventHandler(cmdExport_Click);
            }
            #endregion

            #region GridHelper
            this.gridHelper = new GridHelperNew(this.gridWebGrid, this.DtSource);
            this.gridHelper.LoadDataSourceHandle = new LoadDataSourceDelegateNew(this.LoadDataSource);
            this.gridHelper.GetRowCountHandle    = new GetRowCountDelegateNew(this.GetRowCount);
            this.gridHelper.BuildGridRowhandle   = new BuildGridRowDelegateNew(this.GetGridRow);


            if (this.gridWebGrid2 != null)
            {
                this.gridHelper2 = new GridHelperNew(this.gridWebGrid2, this.DtSource2);
                this.gridHelper2.LoadDataSourceHandle = new LoadDataSourceDelegateNew(this.LoadDataSource2);
                this.gridHelper2.GetRowCountHandle    = new GetRowCountDelegateNew(this.GetRowCount2);
                this.gridHelper2.BuildGridRowhandle   = new BuildGridRowDelegateNew(this.GetGridRow2);
            }
            if (this.gridWebGrid3 != null)
            {
                this.gridHelper3 = new GridHelperNew(this.gridWebGrid3, this.DtSource3);
                this.gridHelper3.LoadDataSourceHandle = new LoadDataSourceDelegateNew(this.LoadDataSource3);
                this.gridHelper3.GetRowCountHandle    = new GetRowCountDelegateNew(this.GetRowCount3);
                this.gridHelper3.BuildGridRowhandle   = new BuildGridRowDelegateNew(this.GetGridRow3);
            }

            #endregion

            #region Exporter
            this.excelExporter      = new BenQGuru.eMES.Web.Helper.ExcelExporter(this.components);
            this.excelExporter.Page = this;
            this.excelExporter.LanguageComponent         = this.languageComponent1;
            this.excelExporter.LoadExportDataHandle      = new LoadExportDataDelegate(LoadDataSource);
            this.excelExporter.FormatExportRecordHandle  = new FormatExportRecordDelegate(FormatExportRecord);
            this.excelExporter.GetColumnHeaderTextHandle = new GetColumnHeaderTextDelegate(GetColumnHeaderText);
            #endregion
        }
示例#6
0
        private void InitOnPostBack()
        {
            #region ButtonHelper
            this.buttonHelper = new ButtonHelper(this);
            this.buttonHelper.SetEditObjectHandle         = new SetEditObjectDelegate(this.SetEditObject);
            this.buttonHelper.AfterPageStatusChangeHandle = new PageStatusChangeDelegate(this.buttonHelper_AfterPageStatusChangeHandle);

            //没有绑定事件的才需要新增点击事件
            if (this.buttonHelper.CmdAdd != null && buttonHelper.CmdAdd.Attributes["bindclick"] == null)
            {
                this.buttonHelper.CmdAdd.ServerClick += new EventHandler(cmdAdd_Click);
            }

            if (this.buttonHelper.CmdSelect != null && buttonHelper.CmdSelect.Attributes["bindclick"] == null)
            {
                this.buttonHelper.CmdSelect.ServerClick += new EventHandler(cmdSelect_Click);
            }

            if (this.buttonHelper.CmdDelete != null && buttonHelper.CmdDelete.Attributes["bindclick"] == null)
            {
                this.buttonHelper.CmdDelete.ServerClick += new EventHandler(cmdDelete_Click);
            }

            if (this.buttonHelper.CmdSave != null && buttonHelper.CmdSave.Attributes["bindclick"] == null)
            {
                this.buttonHelper.CmdSave.ServerClick += new EventHandler(cmdSave_Click);
            }

            if (this.buttonHelper.CmdCancel != null && buttonHelper.CmdCancel.Attributes["bindclick"] == null)
            {
                this.buttonHelper.CmdCancel.ServerClick += new EventHandler(cmdCancel_Click);
            }

            if (this.buttonHelper.CmdQuery != null && buttonHelper.CmdQuery.Attributes["bindclick"] == null)
            {
                this.buttonHelper.CmdQuery.ServerClick += new EventHandler(cmdQuery_Click);
            }

            if (this.buttonHelper.CmdExport != null && buttonHelper.CmdExport.Attributes["bindclick"] == null)
            {
                this.buttonHelper.CmdExport.ServerClick += new EventHandler(cmdExport_Click);
            }
            #endregion

            #region GridHelper
            foreach (WebDataGrid item in listGrid)
            {
                if (item.ID == "gridWebGrid")
                {
                    this.gridHelper = new GridHelperNew(this.gridWebGrid, this.DtSource);
                    this.gridHelper.LoadDataSourceHandle = new LoadDataSourceDelegateNew(this.LoadDataSource);
                    this.gridHelper.GetRowCountHandle    = new GetRowCountDelegateNew(this.GetRowCount);
                    this.gridHelper.BuildGridRowhandle   = new BuildGridRowDelegateNew(this.GetGridRow);
                }
                else if (item.ID == "gridWebGrid2")
                {
                    this.gridHelper2 = new GridHelperNew(this.gridWebGrid2, this.DtSource2);
                    this.gridHelper2.LoadDataSourceHandle = new LoadDataSourceDelegateNew(this.LoadDataSource2);
                    this.gridHelper2.GetRowCountHandle    = new GetRowCountDelegateNew(this.GetRowCount2);
                    this.gridHelper2.BuildGridRowhandle   = new BuildGridRowDelegateNew(this.GetGridRow2);
                }
                else if (item.ID == "gridWebGrid3")
                {
                    this.gridHelper3 = new GridHelperNew(this.gridWebGrid3, this.DtSource3);
                    this.gridHelper3.LoadDataSourceHandle = new LoadDataSourceDelegateNew(this.LoadDataSource3);
                    this.gridHelper3.GetRowCountHandle    = new GetRowCountDelegateNew(this.GetRowCount3);
                    this.gridHelper3.BuildGridRowhandle   = new BuildGridRowDelegateNew(this.GetGridRow3);
                }
            }
            #endregion

            #region Exporter
            this.excelExporter.LoadExportDataHandle      = new LoadExportDataDelegate(LoadDataSource);
            this.excelExporter.FormatExportRecordHandle  = new FormatExportRecordDelegate(FormatExportRecord);
            this.excelExporter.GetColumnHeaderTextHandle = new GetColumnHeaderTextDelegate(GetColumnHeaderText);
            #endregion
        }