private void cmdSimpleFlecheGauche_Click(object sender, RoutedEventArgs e)
        {
            if (grdListeArticle2.SelectedIndex != -1)
            {
                try
                {
                    ArticleQTBE articleQt = ListeArticles2.ElementAt(grdListeArticle2.SelectedIndex);
                    ArticleBE   article   = new ArticleBE();

                    article.codeArticle    = articleQt.codeArticle;
                    article.codeCatArticle = articleQt.codeCatArticle;
                    article.designation    = articleQt.designation;

                    ListeArticles2.Remove(ListeArticles2.ElementAt(grdListeArticle2.SelectedIndex));
                    ListeArticles1.Add(article);
                    grdListeArticle1.ItemsSource = ListeArticles1;
                    grdListeArticle2.ItemsSource = ListeArticles2;

                    if (typeOperation == MODIFIER)
                    {
                        int numerovente = articleBL.rechercherNumeroAchat(acheters.ElementAt(cmbArticle.SelectedIndex));
                        articleBL.incrementerStock(articleQt.codeArticle, articleQt.quantite, annee, dpiDateOp.SelectedDate.Value, numerovente);
                    }
                }
                catch (Exception exp) { Console.WriteLine(exp.Message); }
            }
        }
 private void grdListePaiement_KeyUp(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Delete)
     {
         if (MessageBox.Show("Voulez vous supprimer?", "School : Confirmation", System.Windows.MessageBoxButton.YesNo) == MessageBoxResult.Yes)
         {
             if (grdListePaiement.SelectedIndex != -1)
             {
                 AcheterBE    acheter    = new AcheterBE();
                 SetarticleBE setarticle = new SetarticleBE();
                 acheter = acheters.ElementAt(grdListePaiement.SelectedIndex);
                 setarticle.codesetarticle = acheter.codesetarticle;
                 setarticle = articleBL.rechercherSetArticle(setarticle);
                 articleBL.incrementerStock(setarticle, acheter.quantite, annee);
                 acheters.Remove(acheter);
                 articleBL.supprimerAcheter(acheter);
                 grdListePaiement.ItemsSource = acheters;
                 grdListePaiement.Items.Refresh();
             }
             else
             {
                 MessageBox.Show("Aucune ligne sélectionnée", "School brain:Alerte");
             }
         }
     }
 }