public ActionResult RemoveUser(long userID) { ActionResult response = null; if (Session["RoleID"] != null && (byte)Session["RoleID"] == 3) { try { _dataAccess.DeleteUser(userID); response = RedirectToAction("ViewUsers", "Accounts"); } catch (Exception ex) { LogFile.DataFile(ex: ex); } finally { } } else { TempData["Statement"] = "Please contact Admin to gain permissions to the page you are requesting."; response = RedirectToAction("Index", "Home"); } return(response); }
public string DeleteProfile() { if (CheckLogin()) { string ret = userDao.DeleteUser(userID, sessionToken); Logout(); return(ret); } else { return("Error DeleteProfile Failed!"); } }
public ActionResult Delete(int id) { if (!checkSession()) { return(RedirectToAction("login")); } UsersDAO usersDAO = new UsersDAO(); if (usersDAO.DeleteUser(id)) { return(Json(new { MESSAGE = "1" })); } else { return(Json(new { MESSAGE = "0" })); } }
public void DeleteUser(int id) { userTemp.DeleteUser(id); }
/// <summary> /// Delete user. /// </summary> /// <param name="id">User's id</param> /// <returns></returns> public bool DeleteUser(int id) { return(userdao.DeleteUser(id)); }
public void DeleteUser(int userID) { UsersDAO.DeleteUser(userID); }
public ActionResult DeleteUser(Int64 UserID) { _usersDataAccess.DeleteUser(UserID); return(RedirectToAction("ViewUsers", "Users")); }