public ActionResult Delete(long id, User user) { try { activeUser = userBll.GetUserById((long)HttpContext.Session.GetInt32("userId")); if (activeUser.Administrator > 0) { userBll.DeleteUser(id); } return(RedirectToAction(nameof(Index))); } catch { ViewData["sessionData"] = new int?[] { HttpContext.Session.GetInt32("admin"), HttpContext.Session.GetInt32("language") }; return(View()); } }
public void Delete(long id) { userBll.DeleteUser(id); }
public void Delete(long id) { userBll.DeleteUser(id); //userProcessor.Delete(id); }