// 删除管理员 public ActionResult DeleteAdmin(string administratorId) { Login login = (Login)Session["loginInfo"]; if (login == null) { //未登录 //跳转到登录页面 Session["prePage"] = "/Admin/Index";//将当前页面地址放入session,登录后返回到该页面 return(RedirectToAction("Index", "Login")); } if (login.username == "123456") { string result = roleInfoService.DeleteAdmin(administratorId); return(View("AlterAdminInfo")); } else { Response.Write("<script>alert('您没有权限对该信息进行删除操作!');</script>"); return(View("AlterAdminInfo")); } }
// 删除管理员 public ActionResult DeleteAdmin(string administratorId) { string result = roleInfoService.DeleteAdmin(administratorId); return(View("AlterAdminInfo")); }