public bool CanUnAssignSeat(Seat seat)
 {
     if (IsValidSeat(seat))
     {
         Seats.Find(x => x.Column == seat.Column && x.Row == seat.Row).Available = AvailabilityEnum.Booked;
         return(true);
     }
     return(false);
 }
Exemple #2
0
        /// <summary>
        /// Получение места по его номеру
        /// </summary>
        /// <param name="seatNum">Номер места</param>
        /// <returns>Объект нужного места</returns>
        public Seat GetSeat(string seatNum)
        {
            Seat result = null;

            if (Seats != null)
            {
                result = Seats.Find(seat => seat.Number == seatNum);
            }

            return(result);
        }