コード例 #1
0
        public ActionResult EditEvent(int id)
        {
            var mediator = new TicketMediator();
            var model    = mediator.GetEvent(id);

            model.Categories = mediator.GetEventTypes();

            ViewBag.PageTitle = "Edit Event";
            return(View("~/Views/Admin/EventForm.cshtml", model));
        }
コード例 #2
0
        public ActionResult CreateEvent()
        {
            var model = new EventVM();

            ViewBag.PageTitle = "Create Event";

            var mediator = new TicketMediator();

            model.Categories = mediator.GetEventTypes();
            model.Active     = true;
            return(View("~/Views/Admin/EventForm.cshtml", model));
        }
コード例 #3
0
        public ActionResult BuyTickets()
        {
            var mediator = new TicketMediator();
            var model    = new BuyTicketsVM();

            model.Performances = new List <PerformanceVM>();
            model.Performances = mediator.GetAllPerformances();

            model.Categories = new List <Category>();
            model.Categories = mediator.GetEventTypes();
            model.Events     = new List <EventItem>();
            model.Events     = mediator.GetEventItems();
            model.FromDate   = DateTime.Today.ToString("MM/dd/yyyy");
            return(View(model));
        }