public ActionResult Index(IUser user, ReportListAction listAction = ReportListAction.Run) { return CallAndTransformErrors(() => ProxyIndex(user, listAction), user); }
private ActionResult ProxyIndex(IUser user, ReportListAction listAction) { using (var reportingClient = _reportingClientFactory.CreateClient(user)) { var model = new ReportsModel(CannedReports, GetCustomReports(reportingClient), listAction); return View("Index", model); } }
public ReportsModel(IEnumerable<ReportInfo> cannedReports, IEnumerable<ReportInfo> customReports, ReportListAction listAction) { CannedReports = cannedReports.OrderBy(r => r.Name); CustomReports = customReports.OrderBy(r => r.Name); ReportListAction = listAction; }