public static List <BookedDates> AvailabilityForSpecifiedRoom(int roomID) { List <BookedDates> bookedDates = DBMethods.GetDatesReserved(); var selectedRoomBookedDates = (from d in bookedDates where d.RoomID == roomID select d).ToList(); return(selectedRoomBookedDates); }
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; } } } }
//returns all the data from the room table in the DB public static List <Room> RoomData() { List <Room> roomData = DBMethods.GetRoomTableData(); return(roomData); }
public static List <BookingElement> RetrieveBookingDetails(string email, string bookingID) { List <BookingElement> existingBooking = DBMethods.RetrieveExistingBooking(email, Convert.ToInt32(bookingID)); return(existingBooking); }