public ActionResult ExportPartial() { var service = new ReportSalesService(); var model = service.GetSalesByEmployeeByDivision(DateTime.Today.AddMonths(-3), DateTime.Today); return(PartialView("_SalesPivotGridPartial", model)); }
public ActionResult Export() { ViewBag.DemoOptions = ViewBag.DemoOptions ?? new PivotGridExportOptionsModel(); var service = new ReportSalesService(); var model = service.GetSalesByEmployeeByDivision(DateTime.Today.AddMonths(-3), DateTime.Today); return(View("_SalesPivotGridPartial", model)); }
public ActionResult SalesByEmployeeByDivision(BusinessIntelligenceModel model) { var service = new ReportSalesService(); Session["PivotGridData"] = service.GetSalesByEmployeeByDivision(model.DateStart, model.DateEnd); if (Request.Params["ExportTo"] == null) { return(View(model)); } model.PivotGridData = (IEnumerable <object>)Session["PivotGridData"]; model.PivotGridSettings = Session["PivotGridSettings"] as PivotGridSettings; return(PivotGridDataExportHelper.ExportActionResult(model.PivotGridExportOptions, model)); }
public ActionResult SalesByEmployeeByDivision() { var model = new BusinessIntelligenceModel(); var lastMonthDate = DateTime.Today.AddMonths(-1); var dateStart = new DateTime(lastMonthDate.Year, lastMonthDate.Month, 1); var dateEnd = dateStart.AddMonths(1).AddDays(-1); model.DateStart = dateStart; model.DateEnd = dateEnd; var service = new ReportSalesService(); Session["PivotGridData"] = service.GetSalesByEmployeeByDivision(dateStart, dateEnd); Session["PivotGridSettings"] = BusinessIntelligenceSettings.SalesByEmployeeByDivisionSettings(); return(View(model)); }