Exemplo n.º 1
0
        public ActionResult LoanReports(DateTime startDate, DateTime endDate)
        {
            //  var startDate = DateTime.UtcNow.AddYears(-1);
            //  var endDate = DateTime.UtcNow;

            LoanReportViewModel model = _reportingServices.CreateLoanReportViewModel(startDate, endDate);

            return(View(model));
        }
Exemplo n.º 2
0
        public void LoanReport(DateTime startDate, DateTime endDate)
        {
            var loansReportData = reportingServices.CreateLoanReportViewModel(startDate, endDate);

            string excelContent = exportServices.CreateLoanReportCSV(loansReportData);

            Response.Clear();
            Response.Buffer = true;
            Response.AddHeader("content-disposition", "attachment;filename=LoanExport.csv");
            Response.Charset     = "";
            Response.ContentType = "application/text";
            Response.Output.Write(excelContent);

            Response.Flush();
            Response.End();
        }