Пример #1
0
        public JQGridState GetState(bool currentPageOnly)
        {
            JQGridState state = new JQGridState();

            state.QueryString     = HttpContext.Current.Request.QueryString;
            state.CurrentPageOnly = currentPageOnly;
            return(state);
        }
Пример #2
0
        private IQueryable GetFilteredDataSource(object dataSource, JQGridState gridState)
        {
            if (this.ExportSettings.ExportDataRange != ExportDataRange.FilteredAndPaged)
            {
                gridState.QueryString["page"] = "1";
                gridState.QueryString["rows"] = "1000000";
            }
            IQueryable result;

            this.FilterDataSource(dataSource, gridState.QueryString, out result);
            return(result);
        }
Пример #3
0
        private void DoExportToExcelWithState(object dataSource, string fileName, JQGridState gridState)
        {
            IQueryable queryable;

            if (!gridState.CurrentPageOnly)
            {
                //gridState.QueryString["page"] = "0";
                //gridState.QueryString["rows"] = "1000000";
                this.ExcelFilterDataSource(dataSource, gridState.QueryString, out queryable);
            }
            else
            {
                this.FilterDataSource(dataSource, gridState.QueryString, out queryable);
            }
            this.ExportToExcel(queryable, fileName);
        }
Пример #4
0
 public void ExportToExcel(object dataSource, string fileName, JQGridState gridState)
 {
     this.DoExportToExcelWithState(dataSource, fileName, gridState);
 }
Пример #5
0
 public void ExportToExcel(object dataSource, JQGridState gridState)
 {
     this.DoExportToExcelWithState(dataSource, "GridExcelExport.xls", gridState);
 }
Пример #6
0
 private IQueryable GetFilteredDataSource(object dataSource, JQGridState gridState)
 {
     IQueryable queryable;
     if (this.ExportSettings.ExportDataRange != ExportDataRange.FilteredAndPaged)
     {
         gridState.QueryString["page"] = "1";
         gridState.QueryString["rows"] = "1000000";
     }
     this.FilterDataSource(dataSource, gridState.QueryString, out queryable);
     return queryable;
 }
Пример #7
0
 public DataTable GetExportData(object dataSource, JQGridState gridState)
 {
     IQueryable filteredDataSource = this.GetFilteredDataSource(dataSource, gridState);
     return this.GetExportData(filteredDataSource);
 }
Пример #8
0
 public void ExportToExcel(object dataSource, string fileName, JQGridState gridState)
 {
     IQueryable filteredDataSource = this.GetFilteredDataSource(dataSource, gridState);
     this.ExportToExcel(filteredDataSource, fileName);
 }
Пример #9
0
        public DataTable GetExportData(object dataSource, JQGridState gridState)
        {
            IQueryable filteredDataSource = this.GetFilteredDataSource(dataSource, gridState);

            return(this.GetExportData(filteredDataSource));
        }
Пример #10
0
        public void ExportToExcel(object dataSource, string fileName, JQGridState gridState)
        {
            IQueryable filteredDataSource = this.GetFilteredDataSource(dataSource, gridState);

            this.ExportToExcel(filteredDataSource, fileName);
        }
Пример #11
0
 public void ExportToExcel(IQueryable dataSource, JQGridState gridState)
 {
     this.DoExportToExcelWithState(dataSource, "GridExcelExport.xls", gridState);
 }