예제 #1
0
        protected override void Load()
        {
            Kunden.Clear();
            foreach (KundeDto kunde in Service.GetKunden())
            {
                Kunden.Add(kunde);
            }

            Autos.Clear();
            foreach (AutoDto auto in Service.GetAutos())
            {
                Autos.Add(auto);
            }

            Reservationen.Clear();
            reservationenOriginal.Clear();
            foreach (ReservationDto res in Service.GetReservationen())
            {
                Reservationen.Add(res);
                reservationenOriginal.Add((ReservationDto)res.Clone());
            }
            selectedReservation = Reservationen.FirstOrDefault();

            reservationen.ToList().ForEach(r =>
            {
                r.Auto =
                    Autos.ToList().Find(a => a.Id == r.Auto.Id);
                r.Kunde = Kunden.ToList().Find(k => k.Id == r.Kunde.Id);
            });
        }
예제 #2
0
        protected void LoadActive()
        {
            Reservationen.Clear();
            Kunden.Clear();
            Autos.Clear();


            foreach (KundeDto kunde in Service.Kunde)
            {
                Kunden.Add(kunde);
            }
            foreach (AutoDto auto in Service.Autos)
            {
                Autos.Add(auto);
            }

            foreach (ReservationDto reservation in Service.Reservation)
            {
                if (DateTime.Now > reservation.Bis)
                {
                }
                else
                {
                    Reservationen.Add(reservation);
                }
            }
            SelectedReservation = Reservationen.FirstOrDefault();
        }
예제 #3
0
        protected override void Load()
        {
            Reservationen.Clear();
            reservationenOriginal.Clear();

            Kunden.Clear();
            Autos.Clear();
            if (Service.Kunden() != null)
            {
                foreach (KundeDto kunde in Service.Kunden())
                {
                    Kunden.Add(kunde);
                }
            }
            if (Service.Autos() != null)
            {
                foreach (AutoDto auto in Service.Autos())
                {
                    Autos.Add(auto);
                }
            }
            if (Service.Reservationen() != null)
            {
                foreach (ReservationDto reservation in Service.Reservationen())
                {
                    Reservationen.Add(reservation);
                    reservationenOriginal.Add((ReservationDto)reservation.Clone());
                }
            }
            SelectedReservation = Reservationen.FirstOrDefault();
        }
 protected override void Load()
 {
     Autos.Clear();
     foreach (var auto in Service.GetAutos())
     {
         Autos.Add(auto);
     }
     SelectedAuto = Autos.FirstOrDefault();
 }
예제 #5
0
 protected override void Load()
 {
     Autos.Clear();
     autosOriginal.Clear();
     foreach (var auto in Service.Autos)
     {
         Autos.Add(auto);
         autosOriginal.Add(auto.Clone());
     }
     SelectedAuto = Autos.FirstOrDefault();
 }
예제 #6
0
 private void UpdateLists(object sender = null, EventArgs e = null)
 {
     Autos.Clear();
     foreach (var auto in _service.GetAutos())
     {
         Autos.Add(new AutoRow(auto));
     }
     Kunden.Clear();
     foreach (var kunde in _service.GetKunden())
     {
         Kunden.Add(kunde);
     }
     Reservationen.Clear();
     foreach (var reservation in _service.GetReservationen())
     {
         Reservationen.Add(reservation);
     }
 }
예제 #7
0
        protected override void Load()
        {
            Reservationen.Clear();

            Kunden.Clear();
            Autos.Clear();

            foreach (KundeDto kunde in Service.Kunde)
            {
                Kunden.Add(kunde);
            }
            foreach (AutoDto auto in Service.Autos)
            {
                Autos.Add(auto);
            }
            foreach (ReservationDto reservation in Service.Reservation)
            {
                Reservationen.Add(reservation);
            }
            SelectedReservation = Reservationen.FirstOrDefault();
        }
예제 #8
0
        protected override void Load()
        {
            Kunden.Clear();
            foreach (var kunde in Service.Kunden)
            {
                Kunden.Add(kunde);
            }

            Autos.Clear();
            foreach (var auto in Service.Autos)
            {
                Autos.Add(auto);
            }

            Reservationen.Clear();
            _reservationenOriginal.Clear();
            foreach (var reservation in Service.Reservationen)
            {
                Reservationen.Add(reservation);
                _reservationenOriginal.Add((ReservationDto)reservation.Clone());
            }
            SelectedReservation = Reservationen.FirstOrDefault();
        }
예제 #9
0
        protected override void Load()
        {
            Reservationen.Clear();
            reservationenOriginal.Clear();

            Kunden.Clear();
            Autos.Clear();

            foreach (KundeDto kunde in Service.GetKunden)
            {
                Kunden.Add(kunde);
            }
            foreach (AutoDto auto in Service.GetAutos)
            {
                Autos.Add(auto);
            }
            foreach (ReservationDto reservation in Service.GetReservationen)
            {
                Reservationen.Add(reservation);
                reservationenOriginal.Add((ReservationDto)reservation.Clone());
            }
            SelectedReservation = Reservationen.FirstOrDefault();
        }