public async Task<ActionResult> CBPSummaryReport(ReportPresenter reportPresenter) { if (reportPresenter != null && reportPresenter.Filters != null) { var shipTime = BaseController.GenerateLocalDateTime(DateTime.UtcNow); reportPresenter.Filters.ShipTime = shipTime.ToString(this.ApplicationSettings.ShipDateTimeFormat, CultureInfo.InvariantCulture); if (reportPresenter.Filters.VoyageId == null) { var voyage = reportPresenter.ActiveVoyages.OrderByDescending(d => d.EmbarkDate).FirstOrDefault(item => item.IsActive); reportPresenter.Filters.VoyageId = voyage != null ? voyage.VoyageId : string.Empty; } var summaryReport = await this.reportManager.RetrieveCBPSummaryReportAsync(reportPresenter.Filters); if (summaryReport.Items.Count > 0) { reportPresenter.AssignCBPSummarySearchResult(summaryReport); reportPresenter.TotalRecordCount = summaryReport.Items.Count; } reportPresenter.NoRecordFound = summaryReport.Items.Count <= 0; SessionData.Instance.AssignCBPData(reportPresenter.Filters); } return this.PartialView(CBPSummaryPartialView, reportPresenter); }
/// <summary> /// Guests the CBP report print. /// </summary> /// <returns>The Task</returns> public async Task<ActionResult> GuestCBPReportPrint() { var reportPresenter = new ReportPresenter(); var searchFilter = new SearchFilters(); searchFilter = SessionData.Instance.CBPSearchParameter; searchFilter.PageSize = 0; searchFilter.PageNumber = 1; var summaryReport = await this.reportManager.RetrieveCBPSummaryReportAsync(searchFilter); if (summaryReport != null && summaryReport.Items.Count > 0) { reportPresenter.AssignCBPSummarySearchResult(summaryReport); } return this.View(CBPReportPrintView, reportPresenter); }