Пример #1
0
        public IActionResult GetById(long id)
        {
            var seat = new SeatRepo(_context).GetSeat(id);

            if (seat == null)
            {
                return(NotFound());
            }

            return(Ok(new ObjectResult(seat)));
        }
Пример #2
0
        public IActionResult GetAll()
        {
            var seats = new SeatRepo(_context).GetSeats();

            if (seats == null)
            {
                return(NotFound());
            }

            return(Ok(new ObjectResult(seats)));
        }
Пример #3
0
        public ActionResult SeatSelection(long?ScheduleID = null)
        {
            List <SeatGroup> model = null;

            if (ScheduleID.HasValue)
            {
                var schedule = new Schedule();
                schedule.GetSingleSchedule(ScheduleID.Value);
                ViewBag.Schedule = schedule;

                model = SeatRepo.GetBySession(ScheduleID.Value).OrderByDescending(s => s.RowIndex).ToList();
            }

            return(PartialView(model));
        }
Пример #4
0
 public void Setup()
 {
     seatRepo = new SeatRepo(seatTestContext);
 }