public ActionResult DeleteConfirmed(long?id, int?id2, DateTime?id3) { donor_health_info donor_health_info = db.donor_health_info.Find(id, id2, id3); db.donor_health_info.Remove(donor_health_info); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "national_id,hospital_id,report_date,blood_pressure,glucose_level,notes")] donor_health_info donor_health_info) { if (ModelState.IsValid) { db.Entry(donor_health_info).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.national_id = new SelectList(db.donors, "national_id", "name", donor_health_info.national_id); ViewBag.hospital_id = new SelectList(db.hospitals, "hospital_id", "username", donor_health_info.hospital_id); return(View(donor_health_info)); }
// GET: DHI/Details/5 public ActionResult Details(long?id, int?id2, DateTime?id3) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } donor_health_info donor_health_info = db.donor_health_info.Find(id, id2, id3); if (donor_health_info == null) { return(HttpNotFound()); } return(View(donor_health_info)); }
// GET: DHI/Edit/5 public ActionResult Edit(long?id, int?id2, DateTime?id3) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } donor_health_info donor_health_info = db.donor_health_info.Find(id, id2, id3); if (donor_health_info == null) { return(HttpNotFound()); } ViewBag.national_id = new SelectList(db.donors, "national_id", "name", donor_health_info.national_id); ViewBag.hospital_id = new SelectList(db.hospitals, "hospital_id", "username", donor_health_info.hospital_id); return(View(donor_health_info)); }