예제 #1
0
 private void OnDeleteReservationCommand()
 {
     if (ReservationData.Contains(this.Reservation))
     {
         ReservationData.Remove(this.Reservation);
         this.Reservation = null;
     }
 }
예제 #2
0
        private void OnUpdateReservationCommand()
        {
            if (ReservationData.Contains(this.Reservation))
            {
                ReservationWindow window = new ReservationWindow();

                Reservation currentReservation = new Reservation();

                currentReservation.Copy(Reservation);

                (window.DataContext as ReservationWindowViewModel).Reservation = currentReservation;

                bool?result = window.ShowDialog();

                if (result == true)
                {
                    reservation.Copy(currentReservation);
                }
            }
        }