public ActionResult CheckActive(int id) { if (Repositories.CheckActive(id) == true) { TempData["success"] = "Check/Uncheck active successfully!"; } else { TempData["error"] = "Check/Uncheck active failed!"; } return(RedirectToAction("UserDetail", new { id = id })); }