public ActionResult Edit([Bind(Include = "ID,Location,Date,EventListID")] Event @event) { if (ModelState.IsValid) { db.Entry(@event).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.EventListID = new SelectList(db.EventLists, "ID", "Name", @event.EventListID); return(View(@event)); }
public ActionResult Edit([Bind(Include = "ID,FirstName,LastName,Gender,Age,Active,LoginID")] Person person) { if (ModelState.IsValid) { db.Entry(person).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.LoginID = new SelectList(db.Logins, "ID", "UserName", person.LoginID); return(View(person)); }
public ActionResult Edit([Bind(Include = "ID,Time1,PersonID,EventID")] Time time) { if (ModelState.IsValid) { db.Entry(time).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.EventID = new SelectList(db.Events, "ID", "Location", time.EventID); ViewBag.PersonID = new SelectList(db.People, "ID", "FirstName", time.PersonID); return(View(time)); }