private void supprimerButton(object sender, RoutedEventArgs e)
        {
            EtudeViewModel toRemove = (EtudeViewModel)listeEtudes.SelectedItem;

            lp.Remove(toRemove);
            listeEtudes.Items.Refresh();
            EtudeORM.supprimerEtude(selectedEtudeId);
        }
예제 #2
0
        private void supprimerButton_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            EtudeViewModel toRemove = (EtudeViewModel)listeEtudes.SelectedItem;

            lp4.Remove(toRemove);

            EtudeORM.supprimerEtude(selectedEtudeId);

            MessageBox.Show("Etude supprimée avec succes ! ");
        }
예제 #3
0
        ////////////////////////////////////////////////////////////////////////////////
        /////////////// Etude////////////////////////////////////////////////////////


        private void supprimerButton_Etude_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            EtudeViewModel   toRemove = (EtudeViewModel)listeEtude.SelectedItem;
            MessageBoxResult result   = MessageBox.Show("Voulez vous bien supprimer l'Etude " + toRemove.idEtudeProperty + " de la table ?", "Table Etude", MessageBoxButton.YesNo);

            switch (result)
            {
            case MessageBoxResult.Yes:
                MessageBox.Show("L'étude a été suprimmer", "Table Etude");

                lp_Et.Remove(toRemove);
                listeEtude.Items.Refresh();
                EtudeORM.supprimerEtude(selectedEtudeId);
                break;

            case MessageBoxResult.No:
                MessageBox.Show("L'étude n'a pas été supprimer", "Table Etude");
                break;
            }
        }