private void SupprimerAllergene(object sender, RoutedEventArgs e)
        {
            Allergenes selection = (Allergenes)lvAllergenes.SelectedItem;

            if (selection != null)
            {
                if (MessageBox.Show($"Etes-vous sur de vouloir supprimer le lien allergie {selection.Contenir} de la liste ?", "Confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
                {
                    Statics.TryCatch(() => { _bdd.SupprimerAllergenes(selection); }, nameof(SupprimerAllergene));
                }
            }
        }
Exemple #2
0
        private void SupprimerUnite(object sender, RoutedEventArgs e)
        {
            Unite selection = (Unite)lvUnite.SelectedItem;

            if (selection != null)
            {
                if (MessageBox.Show($"Etes-vous sur de vouloir supprimer l'unité {selection.Nom} de la liste ?", "Confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
                {
                    Statics.TryCatch(() => { _bdd.SupprimerUnite(selection); }, nameof(SupprimerUnite));
                }
            }
        }
Exemple #3
0
 private void AjouterUnite(object sender, RoutedEventArgs e)
 {
     Statics.TryCatch(() => { lvUnite.SelectedItem = _bdd.AjouterUnite("Nouvelle unite"); }, nameof(AjouterUnite));
 }
Exemple #4
0
 private void AjouterEtage(object sender, RoutedEventArgs e)
 {
     Statics.TryCatch(() => { lvEtage.SelectedItem = _bdd.AjouterEtage("Nouveau etage"); }, nameof(AjouterEtage));
 }
 private void AjouterSousCategorie(object sender, RoutedEventArgs e)
 {
     Statics.TryCatch(() => { lvSousCategorie.SelectedItem = _bdd.AjouterSousCategorie("Nouveau Sous Categorie"); }, nameof(AjouterSousCategorie));
 }
Exemple #6
0
 private void AjouterEtagere(object sender, RoutedEventArgs e)
 {
     Statics.TryCatch(() => { lvEtagere.SelectedItem = _bdd.AjouterEtagere("Nouveau etagere", _bdd.Etage.FirstOrDefault()); }, nameof(AjouterEtagere));
 }
 private void AjouterAllergene(object sender, RoutedEventArgs e)
 {
     Statics.TryCatch(() => { lvAllergenes.SelectedItem = _bdd.AjouterAllergenes("Nouveau Allergene"); }, nameof(AjouterAllergene));
 }
Exemple #8
0
 private void AjouterPays(object sender, RoutedEventArgs e)
 {
     Statics.TryCatch(() => { lvPays.SelectedItem = _bdd.AjouterPays("Nouveau Pays"); }, nameof(AjouterPays));
 }
Exemple #9
0
 private void AjouterArticle(object sender, RoutedEventArgs e)
 {
     Statics.TryCatch(() => { lvArticles.SelectedItem = _bdd.AjouterArticle("Nouveau"); }, nameof(AjouterArticle));
 }