Esempio n. 1
0
        public static List <Reservation> listUpcomingReservations(DateTime reservationDate)
        {
            ReservationDB db = new ReservationDB();
            DataSet       ds = db.listUpcomingReservationsDB(reservationDate);

            List <Reservation> reservationList = fillReservationModified(ds);

            ReservedService rs = new ReservedService();

            reservationList.ForEach(delegate(Reservation res) {
                res.petReservationList.ForEach(delegate(PetReservation pres) {
                    List <ReservedService> ser = rs.listReservedService(pres.petResNumber);
                    if (ser.Count != 0)
                    {
                        pres.serviceList = rs.listReservedService(pres.petResNumber);
                    }
                });
            });

            return(reservationList);
        }