public ActionResult DeleteConfirmed(int id) { GoTour goTour = db.GoTours.Find(id); db.GoTours.Remove(goTour); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "TourId,FName,LName,Contact,EmailId,TourDate,TourTime,TourType,GTUserId")] GoTour goTour) { if (ModelState.IsValid) { db.Entry(goTour).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.GTUserId = new SelectList(db.Students, "UserId", "Passwd", goTour.GTUserId); return(View(goTour)); }
// GET: GoTour/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } GoTour goTour = db.GoTours.Find(id); if (goTour == null) { return(HttpNotFound()); } return(View(goTour)); }
// GET: GoTour/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } GoTour goTour = db.GoTours.Find(id); if (goTour == null) { return(HttpNotFound()); } ViewBag.GTUserId = new SelectList(db.Students, "UserId", "Passwd", goTour.GTUserId); return(View(goTour)); }