public IActionResult CinemaHallCreate(string Name, string Rows, string Seats, int Technology, int Cinema)
        {
            var CinemaHall = new CinemaHall()
            {
                Name       = Name,
                RowsCount  = int.Parse(Rows),
                SeatsCount = int.Parse(Seats)
            };
            var technology = technologyService.GetById(Technology);

            CinemaHall.TechnologyId = technology.Id;
            CinemaHall.Technology   = technology;
            var CinemaLocation = cinemaLocationService.GetById(Cinema);

            CinemaHall.CinemaLocationId = CinemaLocation.Id;
            CinemaHall.CinemaLocation   = CinemaLocation;

            cinemaHallService.Add(CinemaHall);
            return(RedirectToAction("CinemaHallTable"));
        }
示例#2
0
        // GET: Admin/Technology/Edit
        public ActionResult Edit(int id)
        {
            var viewModel = Mapper.Map <Technology, TechnologyViewModel>(_technologyService.GetById(id));

            return(View(viewModel));
        }