コード例 #1
0
        public void Download(String fileType)
        {
            DataTable      overAllExpenseTable = expenseRepository.GetOverallExpenses().Tables[0];
            IReportFactory reportFactory       = ReportFactoryCreator.CreateReportInstance(ReportType.Expense);

            reportFactory.GenerateReport(overAllExpenseTable, fileType.ConvertToEnum <ReportFormat>(), ReportType.Expense);
        }
コード例 #2
0
        public ActionResult Download(String fileType)
        {
            DataTable      BudgetSummaryTable = budgetRepository.GetBudgetSummary().Tables[0];
            IReportFactory reportFactory      = ReportFactoryCreator.CreateReportInstance(ReportType.BudgetSummary);
            ReportFormat   reportFormat;

            Enum.TryParse <ReportFormat>(fileType, true, out reportFormat);
            reportFactory.GenerateReport(BudgetSummaryTable, reportFormat, ReportType.BudgetSummary);
            return(View());
        }