public ActionResult DeleteConfirmed(int id) { ACSystem aCSystem = db.ACSystems.Find(id); db.ACSystems.Remove(aCSystem); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ACSystemID,ACSystemIDName,Description,DREF0prefix")] ACSystem aCSystem) { if (ModelState.IsValid) { db.Entry(aCSystem).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(aCSystem)); }
public ActionResult Create([Bind(Include = "ACSystemID,ACSystemIDName,Description,DREF0prefix")] ACSystem aCSystem) { if (ModelState.IsValid) { db.ACSystems.Add(aCSystem); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(aCSystem)); }
// GET: ACSystems/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ACSystem aCSystem = db.ACSystems.Find(id); if (aCSystem == null) { return(HttpNotFound()); } return(View(aCSystem)); }