Exemplo n.º 1
0
        public static void AddAvailabilityToBookingElements(ref List <BookingElement> bookingElements)
        {
            List <BookedDates> booked = DBMethods.GetDatesReserved();            //calls Database

            foreach (BookingElement be in bookingElements)
            {
                for (int i = 0; i < booked.Count; i++)
                {
                    if (be.UserDate == booked[i].BookedDate && be.RoomID == booked[i].RoomID)
                    {
                        be.RoomAvailable = false;
                    }
                }
            }
        }