Ejemplo n.º 1
0
        private void _helper_LoadGridDataSource(object sender, EventArgs e)
        {
            //			this._initialWebGrid();

            string beginDate = String.Empty;
            string endDate   = String.Empty;

            if (chbFrmDate.Checked == true)
            {
                beginDate = FormatHelper.CleanString(FormatHelper.TODateInt(this.txtDateFrom.Text).ToString()).ToUpper();
                endDate   = FormatHelper.CleanString(FormatHelper.TODateInt(this.txtDateTo.Text).ToString()).ToUpper();

                if (!this._checkRequireFields())
                {
                    return;
                }
            }

            FacadeFactory facadeFactory = new FacadeFactory(base.DataProvider);

            object[] dataSource = facadeFactory.CreateQuerySolderPasteFacade().QuerySolderPastePro(
                FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtMOQuery.Text)),
                FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtSSQuery.Text)),
                FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtSPIDQuery.Text)),
                drpSPStatusQuery.SelectedValue,
                beginDate,
                endDate,
                (e as WebQueryEventArgsNew).StartRow,
                (e as WebQueryEventArgsNew).EndRow);

            (e as WebQueryEventArgsNew).GridDataSource = dataSource;

            (e as WebQueryEventArgsNew).RowCount = facadeFactory.CreateQuerySolderPasteFacade().QuerySolderPasteProCount(
                FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtMOQuery.Text)),
                FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtSSQuery.Text)),
                FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtSPIDQuery.Text)),
                drpSPStatusQuery.SelectedValue,
                beginDate,
                endDate);
        }