예제 #1
0
        public async Task <ActionResult> AllOpenJobSummaryReport(ReportSelectionViewModel request)
        {
            var rpt = await reportCreator.CreateAllOpenJobSummaryReportAsync();

            var(Steam, MimeType, Name) = reportWriter.GetFinishedResult(rpt);
            return(File(Steam, MimeType, Name));
        }
예제 #2
0
        public async Task <ActionResult> PayPeriodReport(ReportSelectionViewModel request)
        {
            var criteria = request.PayPeriodReportCriteria.Criteria;
            var rpt      = await reportCreator.CreatePayPeriodReportAsync(criteria);

            var(Steam, MimeType, Name) = reportWriter.GetFinishedResult(criteria, rpt);
            return(File(Steam, MimeType, Name));
        }
예제 #3
0
        public async Task <ActionResult> DetailedExpenseReport(ReportSelectionViewModel request)
        {
            var criteria = request.DetailedExpenseForJobReportCriteria.Criteria;
            var rpt      = await reportCreator.CreateDetailedExpenseReport(criteria);

            var(Steam, MimeType, Name) = reportWriter.GetFinishedResult(criteria, rpt);
            return(File(Steam, MimeType, Name));
        }
        public async Task <ReportSelectionViewModel> GetReportSelectionViewModelAsync(bool isCurrentUserAdmin)
        {
            var vm = new ReportSelectionViewModel()
            {
                PayPeriodReportCriteria             = GetPayPeriodReportViewModel(isCurrentUserAdmin),
                QuickJobTimeReportCriteria          = await GetJobDetailreportAsync(),
                DetailedExpenseForJobReportCriteria = await GetExpenseBreakDownReportCriteria(isCurrentUserAdmin),
                AllOpenJobsSummaryReportCriteria    = GetAllOpenJobsReportCriteria(isCurrentUserAdmin)
                                                      // JobSummaryReportCriteria = await GetJobSummaryReportCriteria(false)
            };

            return(vm);
        }
예제 #5
0
        public async Task <ActionResult> JobDetailReport(ReportSelectionViewModel request)
        {
            try
            {
                var criteria = request.QuickJobTimeReportCriteria.Criteria;
                var rpt      = await reportCreator.CreateQuickJobTimeReportAsync(criteria);

                var(Steam, MimeType, Name) = reportWriter.GetFinishedResult(criteria, rpt);
                return(File(Steam, MimeType, Name));
            }
            catch (System.Exception e)
            {
                Serilog.Log.Error(e, $"Error while handleing {ReportNames.JOB_DETAIL_REPORT}");
                throw;
            }
        }