Beispiel #1
0
        public void CheckSeatInRange(string Seat, int ShowTimeId)
        {
            ShowTime         showTime   = showTimeRepository.FindById(ShowTimeId);
            int              numCol     = showTime.Room.NumCol;
            int              numRow     = showTime.Room.NumRow;
            Tuple <int, int> parsedSeat = ParseSeat(Seat);

            bool isInRange = parsedSeat.Item1 <= numRow && parsedSeat.Item2 <= numCol;

            if (!isInRange)
            {
                throw new Exception("Seat Invalid!");
            }
        }
Beispiel #2
0
 public ShowTime GetDetail(int id)
 {
     return(repository.FindById(id));
 }