Exemplo n.º 1
0
        public JQGridState GetState(bool currentPageOnly)
        {
            JQGridState state = new JQGridState();

            state.QueryString     = HttpContext.Current.Request.QueryString;
            state.CurrentPageOnly = currentPageOnly;
            return(state);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 4
0
 public void ExportToExcel(object dataSource, string fileName, JQGridState gridState)
 {
     this.DoExportToExcelWithState(dataSource, fileName, gridState);
 }
Exemplo n.º 5
0
 public void ExportToExcel(object dataSource, JQGridState gridState)
 {
     this.DoExportToExcelWithState(dataSource, "GridExcelExport.xls", gridState);
 }
Exemplo n.º 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;
 }
Exemplo n.º 7
0
 public DataTable GetExportData(object dataSource, JQGridState gridState)
 {
     IQueryable filteredDataSource = this.GetFilteredDataSource(dataSource, gridState);
     return this.GetExportData(filteredDataSource);
 }
Exemplo n.º 8
0
 public void ExportToExcel(object dataSource, string fileName, JQGridState gridState)
 {
     IQueryable filteredDataSource = this.GetFilteredDataSource(dataSource, gridState);
     this.ExportToExcel(filteredDataSource, fileName);
 }
Exemplo n.º 9
0
        public DataTable GetExportData(object dataSource, JQGridState gridState)
        {
            IQueryable filteredDataSource = this.GetFilteredDataSource(dataSource, gridState);

            return(this.GetExportData(filteredDataSource));
        }
Exemplo n.º 10
0
        public void ExportToExcel(object dataSource, string fileName, JQGridState gridState)
        {
            IQueryable filteredDataSource = this.GetFilteredDataSource(dataSource, gridState);

            this.ExportToExcel(filteredDataSource, fileName);
        }
Exemplo n.º 11
0
 public void ExportToExcel(IQueryable dataSource, JQGridState gridState)
 {
     this.DoExportToExcelWithState(dataSource, "GridExcelExport.xls", gridState);
 }