public ActionResult DeleteConfirmed(int id) { Animal_Kennel_History animal_Kennel_History = db.Animal_Kennel_History.Find(id); db.Animal_Kennel_History.Remove(animal_Kennel_History); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Animal_Kennel_History_ID,Animal_ID,Kennel_ID")] Animal_Kennel_History animal_Kennel_History) { if (ModelState.IsValid) { db.Entry(animal_Kennel_History).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Animal_ID = new SelectList(db.Animals, "Animal_ID", "Animal_Name", animal_Kennel_History.Animal_ID); ViewBag.Kennel_ID = new SelectList(db.Kennels, "Kennel_ID", "Kennel_Name", animal_Kennel_History.Kennel_ID); return(View(animal_Kennel_History)); }
// GET: Animal_Kennel_History/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Animal_Kennel_History animal_Kennel_History = db.Animal_Kennel_History.Find(id); if (animal_Kennel_History == null) { return(HttpNotFound()); } return(View(animal_Kennel_History)); }
// GET: Animal_Kennel_History/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Animal_Kennel_History animal_Kennel_History = db.Animal_Kennel_History.Find(id); if (animal_Kennel_History == null) { return(HttpNotFound()); } ViewBag.Animal_ID = new SelectList(db.Animals, "Animal_ID", "Animal_Name", animal_Kennel_History.Animal_ID); ViewBag.Kennel_ID = new SelectList(db.Kennels, "Kennel_ID", "Kennel_Name", animal_Kennel_History.Kennel_ID); return(View(animal_Kennel_History)); }