Esempio n. 1
0
        public ActionResult AddEvent()
        {
            var vm = new NewEventViewModel();

            vm.SetSelectListItems();
            return(View(vm));
        }
Esempio n. 2
0
        public ActionResult EditEvent(int id)
        {
            var repo = RepositoryFactory.CreateRepository();
            var e    = repo.GetEventById(id);
            var vm   = new NewEventViewModel
            {
                Name        = e.Name,
                Description = e.Description,
                EventId     = e.EventId,
                VenueId     = e.Venue.VenueId
            };

            vm.SetSelectListItems();
            return(View(vm));
        }