public ActionResult Create(Event e) { try { service.CreateEvent(new CC.Service.Webhost.Services.Event() { Name = e.Name, Description = e.Description, TwitterHashTag = e.TwitterHashTag, StartTime = e.StartTime, EndTime = e.EndTime, Location = e.Location, Address1 = e.Address1, Address2 = e.Address2, City = e.City, State = e.State, Zip = e.Zip, IsDefault = e.IsDefault, IsSponsorRegistrationOpen = e.IsSponsorRegistrationOpen, IsSpeakerRegistrationOpen = e.IsSpeakerRegistrationOpen, IsAttendeeRegistrationOpen = e.IsAttendeeRegistrationOpen, IsVolunteerRegistrationOpen = e.IsVolunteerRegistrationOpen }); return RedirectToAction("Index"); } catch { return View(e); } }
// // GET: /Event/Details/5 public ActionResult Details(int id) { var e = service.GetEvent(id); Event model = new Event() { ID = e.ID, Name = e.Name, Description = e.Description, TwitterHashTag = e.TwitterHashTag, StartTime = e.StartTime, EndTime = e.EndTime, Location = e.Location, Address1 = e.Address1, Address2 = e.Address2, City = e.City, State = e.State, Zip = e.Zip, IsDefault = e.IsDefault, IsSponsorRegistrationOpen = e.IsSponsorRegistrationOpen, IsSpeakerRegistrationOpen = e.IsSpeakerRegistrationOpen, IsAttendeeRegistrationOpen = e.IsAttendeeRegistrationOpen, IsVolunteerRegistrationOpen = e.IsVolunteerRegistrationOpen }; return View(model); }