public ActionResult DeleteConfirmed(int id) { ADOPTION aDOPTION = db.ADOPTIONs.Find(id); db.ADOPTIONs.Remove(aDOPTION); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,FULL_NAME,EMAIL,DESCRIPTION,DOG_ID,REGISTER,ESTATUS")] ADOPTION aDOPTION) { if (ModelState.IsValid) { db.Entry(aDOPTION).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.DOG_ID = new SelectList(db.DOGs, "ID", "NAME", aDOPTION.DOG_ID); return(View(aDOPTION)); }
// GET: Adoption/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ADOPTION aDOPTION = db.ADOPTIONs.Find(id); if (aDOPTION == null) { return(HttpNotFound()); } return(View(aDOPTION)); }
// GET: Adoption/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ADOPTION aDOPTION = db.ADOPTIONs.Find(id); if (aDOPTION == null) { return(HttpNotFound()); } ViewBag.DOG_ID = new SelectList(db.DOGs, "ID", "NAME", aDOPTION.DOG_ID); return(View(aDOPTION)); }