public ActionResult Edit([Bind(Include = "FirstName,LastName,Email,ExcursionID")] Member member, int id) { member.MemberID = id; if (ModelState.IsValid) { db.Entry(member).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index", new { id = member.ExcursionID })); } return(View(member)); }
public ActionResult Edit([Bind(Include = "Location,Budget,LeadID,ExcursionID,Start_Date,End_Date")] Excursion excursion) { if (ModelState.IsValid) { db.Entry(excursion).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.LeadID = new SelectList(db.AspNetUsers, "Id", "FirstName", excursion.LeadID); return(View(excursion)); }
public ActionResult Edit([Bind(Include = "Genre,URL,Image,IsFinal,ChoiceID,ExcursionID,ChoiceName,Votes")] Choice choice) { if (ModelState.IsValid) { db.Entry(choice).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ExcursionID = new SelectList(db.Excursions, "ExcursionID", "Location", choice.ExcursionID); return(View(choice)); }