Exemplo n.º 1
0
        public async Task <ActionResult> EditArea(int areaId, int eventId)
        {
            var data = await _eventService.GetEventInformationAsync(eventId);

            var area = data.Areas.Where(x => x.Id == areaId).FirstOrDefault();

            var model = new EventAreaViewModel
            {
                SeatList = area.Seats.Select(x => new EventSeat
                {
                    State       = x.State,
                    EventAreaId = x.EventAreaId,
                    Id          = x.Id,
                    Number      = x.Number,
                    Row         = x.Row
                }).ToList(),
                CoordX      = area.CoordX,
                CoordY      = area.CoordY,
                Description = area.Description,
                Id          = area.Id,
                Price       = area.Price
            };

            ViewBag.Title  = ProjectResources.EventResource.Edit;
            ViewBag.Action = "EditArea";
            return(PartialView("~/Views/Event/Partial/_EventArea.cshtml", model));
        }
Exemplo n.º 2
0
        public async Task <ActionResult> EventInfo(int id)
        {
            var displayEvent = await _eventService.GetEventInformationAsync(id);

            if (displayEvent == null || !displayEvent.IsPublished)
            {
                return(RedirectToAction("Index"));
            }

            return(View(displayEvent));
        }