Exemple #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));
 }
Exemple #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));
 }
Exemple #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));
 }