public ActionResult CreateConcert(AdminConcert adminConcert) { adminConcert.Concert.TableType = "Concert"; adminConcert.Concert.AvailableSeats = hallRepository.GetHall(adminConcert.Concert.HallId).Seats; if (ModelState.IsValid) { concertRepository.AddConcert(adminConcert.Concert); } else { ModelState.AddModelError("Error", "One or more Fields were empty."); } var adminEventEditViewModel = (AdminEventEditViewModel)Session["adminEventEditViewModel"]; adminEventEditViewModel.AdminConcert = adminConcert; Session["adminEventEditViewModel"] = adminEventEditViewModel; return(RedirectToAction("AdminEventEdit")); }
//get Hall info public Hall GetHall(int hallId) { return(_hallRepository.GetHall(hallId)); }