Esempio n. 1
0
        private void OnClickButtonEditBaggage(object sender, RoutedEventArgs e)
        {
            Baggage selectedBaggage = lvwBaggage.SelectedItem as Baggage;

            if (selectedBaggage == null)
            {
                MessageBox.Show(ERROR_NO_BAGGAGE_SELECTED, "Bearbeiten nicht möglich", MessageBoxButton.OK, MessageBoxImage.Information);
                return;
            }

            BaggageWindow baggageWindow = new BaggageWindow(selectedBaggage);

            bool?dialogResult = baggageWindow.ShowDialog();
        }
Esempio n. 2
0
        private void OnClickButtonAddBaggage(object sender, RoutedEventArgs e)
        {
            BaggageWindow baggageWindow = new BaggageWindow();

            bool?dialogResult = baggageWindow.ShowDialog();

            if (!dialogResult.HasValue)
            {
                return;
            }

            if (dialogResult.Value)
            {
                Booking.Passenger.AddBaggage(baggageWindow.Baggage);
            }
        }