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"));
        }
示例#2
0
        public ActionResult Current()
        {
            var yearSheet = _yearSheetsRepository.GetForUser(User.Identity.GetUserId());

            return(View("YearSheetView", yearSheet));
        }