public ActionResult DeleteConfirmed(DateTime id) { GUEST_RIDES gUEST_RIDES = db.GUEST_RIDES.Find(id); db.GUEST_RIDES.Remove(gUEST_RIDES); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "RideDate,GuestID,RideID")] GUEST_RIDES gUEST_RIDES) { if (ModelState.IsValid) { db.Entry(gUEST_RIDES).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.GuestID = new SelectList(db.GUESTs, "GuestID", "FirstName", gUEST_RIDES.GuestID); ViewBag.RideID = new SelectList(db.RIDES, "RideID", "RideName", gUEST_RIDES.RideID); return(View(gUEST_RIDES)); }
// GET: Guest_Rides/Details/5 public ActionResult Details(DateTime id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } GUEST_RIDES gUEST_RIDES = db.GUEST_RIDES.Find(id); if (gUEST_RIDES == null) { return(HttpNotFound()); } return(View(gUEST_RIDES)); }
// GET: Guest_Rides/Edit/5 public ActionResult Edit(DateTime id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } GUEST_RIDES gUEST_RIDES = db.GUEST_RIDES.Find(id); if (gUEST_RIDES == null) { return(HttpNotFound()); } ViewBag.GuestID = new SelectList(db.GUESTs, "GuestID", "FirstName", gUEST_RIDES.GuestID); ViewBag.RideID = new SelectList(db.RIDES, "RideID", "RideName", gUEST_RIDES.RideID); return(View(gUEST_RIDES)); }