public ActionResult Index() { var model = new ReportViewModel(); ViewBag.CacheDebug = GetCacheDebug(); return View(model); }
public ActionResult Index(ReportViewModel model) { if (!ModelState.IsValid) return View(model); var args = new ReportArgs { GroupId = model.GroupId.Value, AreForumsIncluded = model.AreForumsIncluded.Value }; var report = _reportService.GetReportData(args); model.Results = report; ViewBag.CacheDebug = GetCacheDebug(); return View(model); }