示例#1
0
        public IActionResult TPDashboard()
        {
            var user = HttpContext.Session.Get <UserViewModel>(Constants.SessionKeyUserInfo);
            IList <CandidatesViewModel> candidates = null;

            user = user ?? new UserViewModel();
            try
            {
                candidates = dashboardHandler.GetCandidates(user.UserId);
            }
            catch (DataNotFound ex)
            {
                Logger.Logger.WriteLog(Logger.Logtype.Error, ex.Message, user.UserId, typeof(DashboardController), ex);
            }
            if (candidates == null)
            {
                return(RedirectToAction("Index", "BulkJobSeeker", new { area = "TrainingPartner" }));
            }
            else
            {
                return(View(candidates));
            }
        }