public ActionResult Edit(string id, Users user) { try { IEnumerable <Role> role = usersDAO.GetAllRole(); ViewBag.AllRole = new SelectList(role, "id", "Name"); if (usersDAO.AddRole(user)) { return(RedirectToAction("Index")); } else { return(View("Edit")); } } catch { return(View("Edit")); } }