コード例 #1
0
        private void AddTransfer_Click(object sender, RoutedEventArgs e)
        {
            TransferWindow window = new TransferWindow(Convert.ToInt32(travelersCount.Text));

            window.Owner = this;
            window.ShowDialog();
            ((TravelViewModel)this.DataContext).OnPropertyChanged("Travel");
        }
コード例 #2
0
        private void EditTravelActButton_Click(object sender, RoutedEventArgs e)
        {
            Button    button = sender as Button;
            TravelAct act    = button.DataContext as TravelAct;

            if (act.TravelActType == TravelActType.Transfer)
            {
                TransferWindow window = new TransferWindow(Convert.ToInt32(travelersCount.Text), act.Id);
                window.Owner = this;
                window.ShowDialog();
            }
            else
            {
                AccommodationWindow window = new AccommodationWindow(Convert.ToInt32(travelersCount.Text), act.Id);
                window.Owner = this;
                window.ShowDialog();
            }
            ((TravelViewModel)this.DataContext).OnPropertyChanged("Travel");
        }