Ejemplo n.º 1
0
        /*
         * Methodes pour les boutons, les sélections de liste et les click dans les listes.
         */

        private void BTN_AjouterCategorie_Click(object sender, RoutedEventArgs e)
        {
            FicheCategorie fiche = new FicheCategorie();

            fiche.ShowDialog();
            RafraichirListeCategories();
        }
Ejemplo n.º 2
0
        private void BTN_ModifierCategorie_Click(object sender, RoutedEventArgs e)
        {
            Categorie categorie;
            string    message = "Veuillez sélectionner une catégorie afin de pouvoir la modifier.";

            if (LB_ListeCategories.SelectedIndex >= 0)
            {
                categorie = LB_ListeCategories.SelectedItem as Categorie;

                FicheCategorie fiche = new FicheCategorie(categorie.Numero);
                fiche.ShowDialog();

                RafraichirListeCategories();
            }
            else
            {
                MessageBox.Show(message, "Erreur !", MessageBoxButton.OK, MessageBoxImage.Exclamation);
            }
        }