Пример #1
0
        public ActionResult EditMainLayout(int?id)
        {
            if (!id.HasValue)
            {
                return(View(new LayoutAreaViewModel()));
            }

            var seats = _venueService.GetSeatsByLayout(id.Value).ToList();
            var areas = _venueService.GetAreasByLayout(id.Value).ToList();

            var returnedModel = new LayoutAreaViewModel
            {
                LayoutId = id.Value,
                Seats    = seats,
                Areas    = areas
            };

            return(View(returnedModel));
        }