public ActionResult DeleteConfirmed(int id) { AILIST aILIST = db.AILISTs.Find(id); db.AILISTs.Remove(aILIST); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "aiid,ascid,airange,ainame,nic,telephone,email")] AILIST aILIST) { if (ModelState.IsValid) { db.Entry(aILIST).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ascid = new SelectList(db.ASCs, "ascid", "ascname", aILIST.ascid); return(View(aILIST)); }
// GET: AILISTs/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AILIST aILIST = db.AILISTs.Find(id); if (aILIST == null) { return(HttpNotFound()); } return(View(aILIST)); }
// GET: AILISTs/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AILIST aILIST = db.AILISTs.Find(id); if (aILIST == null) { return(HttpNotFound()); } ViewBag.ascid = new SelectList(db.ASCs, "ascid", "ascname", aILIST.ascid); return(View(aILIST)); }