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); }
public void DeleteBooking(string bookingReference) { int refNo = ReservationSystem.RefToInt(bookingReference); bookings.RemoveAll(x => x.ReferenceNumber == refNo); }