public ActionResult Edit([Bind(Include = "EventTypeID,Type")] EventType eventType) { if (ModelState.IsValid) { db.Entry(eventType).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(eventType)); }
public ActionResult Edit([Bind(Include = "EventId,TypeId,EventName,EventDescription,EventType,EventStart,EventEnd,MaxTickets,AvailableTickets,OrganizerName,Location")] Event @event) { if (ModelState.IsValid) { db.Entry(@event).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.TypeId = new SelectList(db.EventTypes, "TypeId", "TypeName"); return(View(@event)); }
public ActionResult Edit([Bind(Include = "EventID,EventTypeID,Title,Description,StartDate,EndDate,Organizer,ContactInfo,City,State,MaxTickets,AvailTickets")] Event @event) { if (ModelState.IsValid) { db.Entry(@event).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.EventTypeID = new SelectList(db.EventTypes, "EventTypeID", "Type", @event.EventTypeID); return(View(@event)); }