Пример #1
0
        private void InitOnPostBack()
        {
            this.buttonHelper = new ButtonHelper(this);
            this.buttonHelper.SetEditObjectHandle = new SetEditObjectDelegate(this.SetEditObject);

            this.gridHelper = new GridHelper(this.gridWebGrid);
            this.gridHelper.LoadDataSourceHandle = new LoadDataSourceDelegate(this.LoadDataSource);
//			this.gridHelper.BuildGridRowhandle = new BuildGridRowDelegate(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);
        }
Пример #2
0
 private void InitOnPostBack()
 {
     this.gridHelper = new GridHelper(this.gridWebGrid);
     this.gridHelper.LoadDataSourceHandle = new LoadDataSourceDelegate(this.LoadDataSource);
     this.gridHelper.BuildGridRowhandle   = new BuildGridRowDelegate(this.GetGridRow);
 }
Пример #3
0
 public GridHelperForRPT(UltraWebGrid grid, System.Web.UI.WebControls.CheckBox chbSelectAll)
 {
     GridHelper = new GridHelper(grid, chbSelectAll);
     ApplyDefaultStyle();
 }
Пример #4
0
 public GridHelperForRPT(UltraWebGrid grid)
 {
     GridHelper = new GridHelper(grid);
     ApplyDefaultStyle();
 }
Пример #5
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
        }
Пример #6
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            Control control;

            control = this.FindControl("cmdUnSelect");
            if (control != null)
            {
                ((System.Web.UI.WebControls.Button)control).Click += new System.EventHandler(this.cmdUnSelect_Click);
            }
            control = this.FindControl("cmdSelect");
            if (control != null)
            {
                ((System.Web.UI.WebControls.Button)control).Click += new System.EventHandler(this.cmdSelect_Click);
            }
            control = this.FindControl("cmdQuery");
            if (control != null)
            {
                ((System.Web.UI.HtmlControls.HtmlInputButton)control).ServerClick += new System.EventHandler(this.cmdQuery_ServerClick);
            }

            control = this.FindControl("chbSelected");
            if (control == null)
            {
                this.gridSelectedHelper = new GridHelper(this.GetGridSelected());
            }
            else
            {
                this.gridSelectedHelper = new GridHelper(this.GetGridSelected(), (System.Web.UI.WebControls.CheckBox)control);
            }

            control = this.FindControl("chbUnSelected");
            if (control == null)
            {
                this.gridUnSelectedHelper = new GridHelper(this.GetGridUnSelected());
            }
            else
            {
                this.gridUnSelectedHelper = new GridHelper(this.GetGridUnSelected(), (System.Web.UI.WebControls.CheckBox)control);
            }


            this.gridSelectedHelper.BuildGridRowhandle   = new BuildGridRowDelegate(this.GetSelectedGridRow);
            this.gridSelectedHelper.LoadDataSourceHandle = new LoadDataSourceDelegate(this.LoadSelectedDataSource);

            this.gridUnSelectedHelper.BuildGridRowhandle   = new BuildGridRowDelegate(this.GetUnSelectedGridRow);
            this.gridUnSelectedHelper.GetRowCountHandle    = new GetRowCountDelegate(this.GetUnSelectedRowCount);
            this.gridUnSelectedHelper.LoadDataSourceHandle = new LoadDataSourceDelegate(this.LoadUnSelectedDataSource);

            control = this.FindControl("cmdSave");
            if (control != null)
            {
                ((System.Web.UI.HtmlControls.HtmlInputButton)control).Attributes.Add("OnClick", "try{window.returnValue=document.getElementById('txtSelected').innerText;window.close();return false ;}catch(e){}");
            }
            control = this.FindControl("cmdCancel");
            if (control != null)
            {
                ((System.Web.UI.HtmlControls.HtmlInputButton)control).Attributes.Add("OnClick", "window.close();return false ;");
            }

            control = this.FindControl("cmdInit");
            if (control != null)
            {
                ((System.Web.UI.HtmlControls.HtmlInputButton)control).ServerClick += new System.EventHandler(this.cmdInit_ServerClick);
            }

            if (!this.IsPostBack)
            {
                this.InitWebGrid();
                this.cmdQuery_ServerClick(null, null);
            }

            SelectableTextBox_Load(null, null);
        }