Beispiel #1
0
        public static List <Reservation> listActiveReservations(int ownerNumber)
        {
            ReservationDB db = new ReservationDB();
            DataSet       ds = db.listActiveReservationsDB(ownerNumber);

            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);
        }