public ActionResult Edit(int id) { if (Session["Admin"].Equals(false)) { return(View("No")); } return(View(iuser.GetUserByID(id))); }
// GET: Users/Edit/5 public ActionResult EditUser(int id) { User user = u.GetUserByID(id);; if (user == null) { return(HttpNotFound()); } ViewBag.Type_id = new SelectList(t.GetTypes(), "Id", "type1", user.Type_id); return(View(user)); }