예제 #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());
        }
예제 #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());
        }
예제 #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);
        }
예제 #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);
        }