//Denne metode opretter en list af bookings alt efter om det skal være med ledige bøger, eller bøger som er retuneret. public List <Booking> GetList(bool ReturnBool) { List <Booking> BookedBooks = new List <Booking>(); foreach (var item in Bda.GetAllBookings()) { if (ReturnBool == false) { if (item.Returned == false) { BookedBooks.Add(item); } } else if (ReturnBool == true) { if (item.Returned == true) { BookedBooks.Add(item); } } } return(BookedBooks); }
/// <summary> /// Method to get all bookings for a specific user /// </summary> /// <param name="userID"></param> /// <returns></returns> public List <Booking> GetAllBookings(string userID) { return(bookingDataAccess.GetAllBookings(userID)); }