Пример #1
0
        public seeFly()
        {
            InitializeComponent();

            ListFlies = FlyModel.GetFlies();
            dataGridFlies.ItemsSource       = ListFlies;
            dataGridFlies.SelectedValuePath = "Id";
        }
Пример #2
0
        private void Supprimer_Click(object sender, RoutedEventArgs e)
        {
            List <int> journeyId = FlyModel.selectJourneyId(Convert.ToInt32(dataGridFlies.SelectedValue));

            foreach (var item in journeyId)
            {
                TicketModel.DeleteTicket(item);
                JourneyModel.DeleteJourney(item);
                JourneyModel.DeleteJourneyFly(item);
            }
            FlyModel.DeleteFly(Convert.ToInt32(dataGridFlies.SelectedValue));
            dataGridFlies.ItemsSource = null;
            dataGridFlies.ItemsSource = FlyModel.GetFlies();
        }