public ActionResult Delete(int id) { if (Session["Admin"].Equals(false)) { return(View("No")); } if (id > 0) { iuser.DeleteUser(id); iuser.Commit(); } if (id == Convert.ToInt32(Session["UserID"])) { return(RedirectToAction("Login")); } return(RedirectToAction("Index")); }
public ActionResult DeleteConfirmed(int id) { u.DeleteUser(id); u.CommitUser(); return(RedirectToAction("UserIndex")); }