public ActionResult DeleteConfirmed(int id) { APTUser aPTUser = db.APTUsers.Find(id); db.APTUsers.Remove(aPTUser); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "UserId,FullName,UserName,Password,Email,PhoneNumber,IsActive,CreatedBy,CreatedDate,UpdatedBy,UpdatedDate")] APTUser aPTUser) { if (ModelState.IsValid) { db.Entry(aPTUser).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(aPTUser)); }
public ActionResult Create([Bind(Include = "UserId,FullName,UserName,Password,Email,PhoneNumber,IsActive,CreatedBy,CreatedDate,UpdatedBy,UpdatedDate")] APTUser aPTUser) { if (ModelState.IsValid) { db.APTUsers.Add(aPTUser); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(aPTUser)); }
// GET: APTUsers/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } APTUser aPTUser = db.APTUsers.Find(id); if (aPTUser == null) { return(HttpNotFound()); } return(View(aPTUser)); }