public ActionResult Index() { if (!User.Identity.IsAuthenticated) { return(RedirectToAction("Login", "Account")); } var yearSheet = _yearSheetsRepository.GetForUser(User.Identity.GetUserId()); if (yearSheet == null) { return(RedirectToAction("NoYearSheetPresent", "YearSheet")); } return(RedirectToAction("Current", "YearSheet")); }
public ActionResult Current() { var yearSheet = _yearSheetsRepository.GetForUser(User.Identity.GetUserId()); return(View("YearSheetView", yearSheet)); }