public ActionResult DeleteConfirmed(int id) { Auto_Necropsia auto_Necropsia = db.Auto_Necropsia.Find(id); db.Auto_Necropsia.Remove(auto_Necropsia); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "id,Diagnostico,fecha,historia")] Auto_Necropsia auto_Necropsia) { if (ModelState.IsValid) { db.Entry(auto_Necropsia).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.historia = new SelectList(db.HistoriaClinicas, "id", "id", auto_Necropsia.historia); return(View(auto_Necropsia)); }
// GET: Auto_Necropsia/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Auto_Necropsia auto_Necropsia = db.Auto_Necropsia.Find(id); if (auto_Necropsia == null) { return(HttpNotFound()); } return(View(auto_Necropsia)); }
// GET: Auto_Necropsia/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Auto_Necropsia auto_Necropsia = db.Auto_Necropsia.Find(id); if (auto_Necropsia == null) { return(HttpNotFound()); } ViewBag.historia = new SelectList(db.HistoriaClinicas, "id", "id", auto_Necropsia.historia); return(View(auto_Necropsia)); }