コード例 #1
0
        public ActionResult YearWiseReport()
        {
            var adminReportViewModel = new AdminYearReportViewModel {
                ListofYears = GenerateListofYears()
            };

            return(View(adminReportViewModel));
        }
コード例 #2
0
        public ActionResult YearWiseReport(AdminYearReportViewModel reportViewModel)
        {
            if (ModelState.IsValid)
            {
                var report = _exportReport.GetAgentCheckInOutMonthWiseReport(reportViewModel.Year);

                if (report != null && report.Count > 0)
                {
                    ExporttoExcel(report, "Report", "YearWiseReport.xlsx");
                }
                else
                {
                    TempData["ReportMessages"] = "No Data to Export";
                }
            }
            reportViewModel.ListofYears = GenerateListofYears();
            return(View(reportViewModel));
        }