예제 #1
0
        public ActionResult Create(Event e)
        {
            try
            {
                service.CreateEvent(new CodeCampService.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);
            }
        }
예제 #2
0
        public ActionResult Venue(int eventid)
        {
            var event_ = service.GetEvent(eventid);

            Event model = new Event()
            {
                ID = event_.ID,
                Name = event_.Name,
                Description = event_.Description,
                TwitterHashTag = event_.TwitterHashTag,
                StartTime = event_.StartTime,
                EndTime = event_.EndTime,
                Location = event_.Location,
                Address1 = event_.Address1,
                Address2 = event_.Address2,
                City = event_.City,
                State = event_.State,
                Zip = event_.Zip
            };

            return View(model);
        }
예제 #3
0
        //
        // 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);
        }