public ActionResult AddCandidateForTest(int id) { if (!user.IsManager()) { return(View("Error")); } TestQuestion check = db.TestQuestions.FirstOrDefault(c => c.TestCode == id); if (check == null) { TempData["CandidateID"] = false; TempData["statusAQ"] = "This test has no questions yet."; return(RedirectToAction("TestCode")); } id_testcode = id; if (managerDal.GetCandidateForTest().Count() == 0 && ktraAdd == 0) { TempData["CandidateID"] = true; TempData["statusACTC"] = "There are no contestants to add!!!!!!"; } ktraAdd = 0; return(View(managerDal.GetCandidateForTest())); }