Esempio n. 1
0
        private async void Button_Add(object sender, RoutedEventArgs e)
        {
            TravelInfo newAddTravelWindow = new TravelInfo(null);

            newAddTravelWindow.ShowDialog();
            await LoadTravel();
        }
Esempio n. 2
0
        private async void EditTravel_Click(object sender, RoutedEventArgs e)
        {
            if (TravelDataGrid.SelectedIndex >= 0)
            {
                var travel = await travelCore.GetTravelByIdAsync(((TravelInfoDTO)TravelDataGrid.SelectedItem).TravelInfoId);

                TravelInfo newTravelInfoWindow = new TravelInfo(travel);
                newTravelInfoWindow.ShowDialog();
                await LoadTravel();
            }
            else
            {
                MessageBox.Show("Choose travel first");
            }
        }