public ActionResult DeleteConfirmed(int id) { All_User allUser = db.All_User.Find(id); db.All_User.Remove(allUser); db.SaveChanges(); return(RedirectToAction("Index")); }
// // GET: /Home/Delete/5 public ActionResult Delete(int id = 0) { All_User allUser = db.All_User.Find(id); if (allUser == null) { return(HttpNotFound()); } return(View(allUser)); }
public ActionResult Edit(All_User allUser) { if (ModelState.IsValid) { db.Entry(allUser).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(allUser)); }
public ActionResult Create(All_User allUser) { if (ModelState.IsValid) { db.All_User.Add(allUser); allUser.AddedDate = DateTime.Now; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(allUser)); }