public SortieArticleUI()
        {
            InitializeComponent();
            dpiDateOp.SelectedDate       = DateTime.Today;
            dpiDateOp.IsTodayHighlighted = true;
            dpiDateOp.Text    = DateTime.Now.ToString();
            eleves            = new List <string>();
            classes           = new List <string>();
            achats_setarticle = new List <string>();
            articleBL         = new GestionArticleBL();

            stockers       = new List <StockerBE>();
            ListeArticles1 = new ObservableCollection <ArticleBE>();
            ListeArticles2 = new ObservableCollection <ArticleQTBE>();
            CultureInfo ci = CultureInfo.CreateSpecificCulture(CultureInfo.CurrentCulture.Name);

            ci.DateTimeFormat.ShortDatePattern  = "yyyy-MM-dd";
            Thread.CurrentThread.CurrentCulture = ci;

            ancien_acheter          = new AcheterBE();
            classes                 = articleBL.listerValeurColonneClasse("codeclasse");
            cmbClasse.ItemsSource   = classes;
            cmbClasse.SelectedIndex = 0;

            setarticle            = new SetarticleBE();
            eleve                 = new EleveBE();
            annee                 = articleBL.anneeEnCours();
            txtAnnee.Text         = " / " + annee;
            txtAnneeScolaire.Text = (annee - 1).ToString();
            chargerListeEleves();
            LArticleBE = articleBL.listerTousLesArticle();
            RemplirDataGrid1(LArticleBE);
            typeOperation = ENREGISTRER;
            radioEnregistrement.IsChecked = true;
        }
        private void lignesStockerDuneVente()
        {
            stockers = new List <StockerBE>();
            List <ArticleBE> articles = new List <ArticleBE>();

            ListeArticles2.Clear();
            int numero = articleBL.rechercherNumeroAchat(acheters.ElementAt(cmbArticle.SelectedIndex));

            stockers = articleBL.rechercherLigneStocker(numero);
            ArticleBE   article;
            ArticleQTBE a;

            articles = articleBL.listerTousLesArticle();
            foreach (StockerBE s in stockers)
            {
                a                   = new ArticleQTBE();
                article             = new ArticleBE();
                article.codeArticle = s.codeArticle;
                article             = articleBL.rechercherArticle(article);
                a.codeArticle       = article.codeArticle;
                a.designation       = article.designation;
                a.codeCatArticle    = article.codeCatArticle;
                a.quantite          = s.quantiteVendue;

                ListeArticles2.Add(a);
                article = articles.Find(c => c.codeArticle.Equals(article.codeArticle));
                articles.Remove(article);
            }

            ListeArticles1.Clear();
            foreach (ArticleBE art in articles)
            {
                ListeArticles1.Add(art);
            }
            grdListeArticle2.ItemsSource = ListeArticles2;
            grdListeArticle2.Items.Refresh();
            grdListeArticle1.ItemsSource = ListeArticles1;
            grdListeArticle1.Items.Refresh();
        }