public ViewResult SelectionInvoiceView(Guid invoiceId, Boolean mockData = false)
        {
            var model = mockData
                    ? MockInvoiceData.MockSelectionInvoice()
                    : invoiceReportService.GetOrCreateReport(invoiceId, InvoiceFormatType.Selection)
                        as SelectionInvoiceModel;

            return(View("~/Views/Invoice/Selection.cshtml", model));
        }
        public ViewResult DepartmentInvoiceView(Guid invoiceId, Boolean mockData = false)
        {
            var model = mockData
                    ? MockInvoiceData.MockDepartmentInvoice()
                    : invoiceReportService
                        .GetOrCreateReport(invoiceId, InvoiceFormatType.Department)
                        as DepartmentInvoiceModel;

            return(View("~/Views/Invoice/Department.cshtml", model));
        }
        public ActionResult ActivityInvoiceView(Guid invoiceId, Boolean mockData = false)
        {
            var invoiceModel = mockData
                    ? MockInvoiceData.MockActivityInvoice()
                    : invoiceReportService
                               .GetOrCreateReport(invoiceId, InvoiceFormatType.Activity)
                               as ActivityInvoiceModel;

            return(View("~/Views/Invoice/Activity.cshtml", invoiceModel));
        }
        public FileContentResult SelectionInvoiceExcel(Guid invoiceId, Boolean mockData = false)
        {
            var model = mockData
                    ? MockInvoiceData.MockSelectionInvoice()
                    : invoiceReportService.GetOrCreateReport(invoiceId, InvoiceFormatType.Selection)
                        as SelectionInvoiceModel;

            var excelGenerator = new ExportInvoiceReportToExcel();

            var fileBytes = excelGenerator.GenerateSelectionInvoiceReport(model);

            var reportFileName = String.Format("SelectionInvoiceReport.xlsx");

            return(File(fileBytes, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", reportFileName));
        }