Beispiel #1
0
        public bool checkIfMaxRes(LaundryUser laundryUser)
        {
            int count = 0;

            foreach (var res in laundryUser.Reservations)
            {
                if (!res.reservationUsed.GetValueOrDefault())
                {
                    count += res.Machines.Count;
                }
            }
            return(count >= maxReservationPerUser.GetValueOrDefault());
        }
Beispiel #2
0
        public bool checkIfMaxRes(LaundryUser laundryUser)
        {
            int count = 0;
            foreach (var res in laundryUser.Reservations)
            {

                if (!res.reservationUsed.GetValueOrDefault())
                {
                    count += res.Machines.Count;
                }

            }
            return (count >= maxReservationPerUser.GetValueOrDefault());
        }
Beispiel #3
0
        public void Init()
        {
            laundryRoom = new LaundryRoom();
            laundryRoom.Machines.Add(new Machine());
            laundryRoom.Machines.Add(new Machine());
            laundryRoom.Machines.Add(new Machine());
            laundryUser      = new LaundryUser();
            laundryUser.name = "Namjoo";

            reservation = new Reservation();

            washTime          = new WashTime();
            washTime.fromTime = DateTime.Now.AddMinutes(10).TimeOfDay;

            reservation.WashTime1 = washTime;
            laundryUser.Reservations.Add(reservation);
        }
Beispiel #4
0
        public void Init()
        {
            laundryRoom = new LaundryRoom();
            laundryRoom.Machines.Add(new Machine());
            laundryRoom.Machines.Add(new Machine());
            laundryRoom.Machines.Add(new Machine());
            laundryUser = new LaundryUser();
            laundryUser.name = "Namjoo";

            reservation = new Reservation();

            washTime = new WashTime();
            washTime.fromTime = DateTime.Now.AddMinutes(10).TimeOfDay;

            reservation.WashTime1 = washTime;
            laundryUser.Reservations.Add(reservation);
        }