Пример #1
0
        public Stream ExportToExcel <TModel>(object dataSource, CoreGridState gridState)
        {
            IQueryable       filteredDataSource = GetFilteredDataSource(dataSource, gridState);
            List <Hashtable> data = Util.ToListOfHashtables <TModel>(filteredDataSource);

            return(RenderExcelToStream(data));
        }
Пример #2
0
 public IQueryable GetFilteredDataSource(object dataSource, CoreGridState gridState)
 {
     if (ExportSettings.ExportDataRange != ExportDataRange.FilteredAndPaged)
     {
         gridState.QueryString["page"] = "1";
         gridState.QueryString["rows"] = "1000000";
     }
     FilterDataSource(dataSource, gridState.QueryString, out IQueryable iqueryable);
     return(iqueryable);
 }
Пример #3
0
        public Stream ExportToExcel(object dataSource, CoreGridState gridState)
        {
            IQueryable filteredDataSource = GetFilteredDataSource(dataSource, gridState);

            return(ExportToExcel(filteredDataSource));
        }