public ActionResult DeleteConfirmed(int id) { Rx2 rx2 = db.Rx2.Find(id); db.Rx2.Remove(rx2); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "RXID,RxName,ExID,PID,PhID,LogID,UsersName")] Rx2 rx2) { if (ModelState.IsValid) { db.Entry(rx2).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.PID = new SelectList(db.Patients, "PID", "UserID", rx2.PID); return(View(rx2)); }
// GET: Rx2/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Rx2 rx2 = db.Rx2.Find(id); if (rx2 == null) { return(HttpNotFound()); } return(View(rx2)); }
// GET: Rx2/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Rx2 rx2 = db.Rx2.Find(id); if (rx2 == null) { return(HttpNotFound()); } ViewBag.PID = new SelectList(db.Patients, "PID", "UserID", rx2.PID); return(View(rx2)); }