public void ExportInkindReport(InkindReportModel inkindReportmodel, int filterType, int reportFormatType) { try { var reportFormat = EnumHelper.GetEnumByStringValue <FingerprintsModel.Enums.ReportFormatType>(reportFormatType.ToString()); inkindReportmodel.SkipRows = inkindReportmodel.GetSkipRows(); inkindReportmodel.FilterTypeEnum = EnumHelper.GetEnumByStringValue <FingerprintsModel.Enums.InkindReportFilter>(filterType.ToString()); inkindReportmodel.SortColumn = string.IsNullOrEmpty(inkindReportmodel.SortColumn) || inkindReportmodel.SortColumn == "null" ? string.Empty : inkindReportmodel.SortColumn.ToUpperInvariant(); inkindReportmodel.SortOrder = string.IsNullOrEmpty(inkindReportmodel.SortOrder) || inkindReportmodel.SortOrder == "null"?string.Empty : inkindReportmodel.SortOrder; inkindReportmodel.SearchTermType = string.IsNullOrEmpty(inkindReportmodel.SearchTermType) || inkindReportmodel.SearchTermType == "null" ? string.Empty : inkindReportmodel.SearchTermType; new InKindData().GetInkindReportData(ref inkindReportmodel, staff); string imagePath = Server.MapPath("~/Images/"); MemoryStream memoryStream = new MemoryStream(); if (inkindReportmodel != null && inkindReportmodel.InkindReportList != null && inkindReportmodel.InkindReportList.Count > 0) { memoryStream = new Export().ExportInkindReport(inkindReportmodel, imagePath, reportFormat); } string reportName = "In-Kind Report"; DownloadReport(memoryStream, reportFormat, reportName); } catch (Exception ex) { clsError.WriteException(ex); } }
public PartialViewResult GetInkindReportPartial(InkindReportModel inkindReportmodel, int filterType) { //InkindReportModel inkindReportmodel = new InkindReportModel(); try { inkindReportmodel.SkipRows = inkindReportmodel.GetSkipRows(); inkindReportmodel.FilterTypeEnum = EnumHelper.GetEnumByStringValue <FingerprintsModel.Enums.InkindReportFilter>(filterType.ToString()); new InKindData().GetInkindReportData(ref inkindReportmodel, staff); } catch (Exception ex) { clsError.WriteException(ex); } return(PartialView("~/Views/InKind/_InkindReportListPartial.cshtml", inkindReportmodel)); }
public JsonResult AutoCompleteInkindTransactions(int filterType, string selectedOption, string centers, string fromDate, string toDate, int requestedPage, int pageSize, string sortOrder, string sortColumn, string searchTerm, string searchTermType) { InkindReportModel inkindReportmodel = new InkindReportModel(); inkindReportmodel.RequestedPage = requestedPage; inkindReportmodel.PageSize = pageSize; inkindReportmodel.SkipRows = inkindReportmodel.GetSkipRows(); inkindReportmodel.FilterTypeEnum = EnumHelper.GetEnumByStringValue <FingerprintsModel.Enums.InkindReportFilter>(filterType.ToString()); inkindReportmodel.FromDate = fromDate; inkindReportmodel.ToDate = toDate; inkindReportmodel.SortColumn = sortColumn.ToUpperInvariant(); inkindReportmodel.SortOrder = sortOrder; inkindReportmodel.SubFilterOption = selectedOption; inkindReportmodel.Centers = centers; inkindReportmodel.SearchTerm = searchTerm; //inkindReportmodel.SearchFilterType = searchFilterType; List <SelectListItem> inkindSearchList = new InKindData().AutoCompleteInkindTransactionData(inkindReportmodel, staff); return(Json(inkindSearchList, JsonRequestBehavior.AllowGet)); }