Exemplo n.º 1
0
 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));
 }
Exemplo n.º 2
0
 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));
 }
Exemplo n.º 3
0
 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));
 }