public ActionResult Delete(int id) { usersModel s = new usersModel() { Id = id }; if (us.Del(s) > 0) { return(RedirectToAction("Index")); } else { return(RedirectToAction("Index")); } }
// GET: user_list/Delete/5 public ActionResult Delete(int id) { usersModel um = new usersModel() { Id = id }; //根据ID做删除 if (iub.Del(um) > 0) { return(Content("<script>alert('删除成功');window.location.href='/user_list/user_list'</script>")); } else { return(Content("<script>alert('删除失败');window.location.href='/user_list/user_list'</script>")); } }