public ActionResult Admin_Login(Users user) { if (ModelState.IsValid) { int ID = UsersBL.CheckExistentUser(user); if (ID == 0) { ModelState.AddModelError("UserID", "UserName or Password is Error"); return(RedirectToAction("Admin")); } else if (ID == 1) { return(RedirectToAction("Doctors")); } else if (ID == 2) { return(RedirectToAction("students")); } } return(View(user)); }