示例#1
0
        public List <Guest> ListGuests(string bookingReferenceNumber)
        {
            int referenceNumber = ReservationSystem.RefToInt(bookingReferenceNumber);

            List <Guest> temp = new List <Guest>();

            foreach (Guest guest in guests)
            {
                if (guest.BookingReferenceNumber == referenceNumber)
                {
                    temp.Add(guest);
                }
            }

            return(temp);
        }
示例#2
0
        public void DeleteBooking(string bookingReference)
        {
            int refNo = ReservationSystem.RefToInt(bookingReference);

            bookings.RemoveAll(x => x.ReferenceNumber == refNo);
        }