public byte[] Download(AllReportSearchTerms searchTerms) { searchTerms.Page = 1; searchTerms.PageSize = ExcelDefaultPageSize; var searchResult = Search(searchTerms); var excelReportDataSearchResult = GetExcelReportDataSearchResult(searchResult); return(_excelReportFactory.CreateExcelReport(excelReportDataSearchResult)); }
public byte[] DownloadStateReportViewModel(int reportId, ExcelReportType excelReportType) { var report = GetStateReportViewModel(reportId); return(excelReportType == ExcelReportType.List ? _excelReportFactory.CreateExcelReport(new SearchResult <StateReportViewModel>( new List <StateReportViewModel>() { report }, new PagingData(1, DefaultPageSize, 1) )) : _excelReportFactory.CreateExcelReport(report)); }
public byte[] SearchUnitReport(UnitReportInquirySearchTerms searchTerms) { var result = _session.Query <UnitReportViewModel>() .ApplyOrganizationReferenceFilter(_userContext) .ApplyOnlyReportFilter() .ApplyQuickSearch(searchTerms.QuickSearch) .ApplyTimestampFromSearch(searchTerms.TimestampFrom) .ApplyTimestampToSearch(searchTerms.TimestampTo) .FetchSimpleSearchResult(searchTerms.PagingData ?? new PagingData(1, DefaultPageSize, 0)); return(_excelReportFactory.CreateExcelReport(result)); }