示例#1
0
 private void TBSymboleas_KeyUp(object sender, KeyEventArgs e)
 {
     TBSymboleas.Text = saisieFloat(sender);
     if (!TBSymboleas.Text.Equals(""))
     {
         List <Article> art = Requettes.getAllArticle("symbole", TBSymboleas.Text);
         if (art.Count > 0)
         {
             TBDescas.Text          = art.ElementAt(0).description;
             TBBesoinas.Text        = art.ElementAt(0).besoin + "";
             TBStockas.Text         = art.ElementAt(0).stock + "";
             TBRatioas.Text         = art.ElementAt(0).ratio + "";
             TBSAas.Text            = art.ElementAt(0).sa + "";
             TBSMdhillaas.Text      = art.ElementAt(0).smdhilla + "";
             TBSSkhiraas.Text       = art.ElementAt(0).sskhira + "";
             TBDesignationas.Text   = art.ElementAt(0).designation;
             TBFormatas.Text        = art.ElementAt(0).format;
             TBEpisseuras.Text      = art.ElementAt(0).episseur;
             TBSymboleas.Background = Brushes.GreenYellow;
         }
         else
         {
             TBSymboleas.Background = Brushes.Bisque;
             MessageBox.Show("Ce symbole n'existe pas dans la base de données courante", "Erreur", MessageBoxButton.OK, MessageBoxImage.Error);
         }
     }
     else
     {
         TBSymboleas.Background = Brushes.White;
         viderChampsArtileas();
     }
 }
示例#2
0
        private void importerArticle(String champ, String texte)
        {
            DataGridArticle.ItemsSource = null;
            List <Article> reader = Requettes.getAllArticle(champ, texte);

            DataGridArticle.ItemsSource = reader;
        }
示例#3
0
        private void importerArticle()
        {
            DataGridArticle.ItemsSource = null;
            List <Article> reader = Requettes.getAllArticle();

            //MessageBox.Show(reader.Count+"");
            DataGridArticle.ItemsSource = reader;
        }
示例#4
0
        private void LoadColumnChartData()
        {
            List <PersonelStat> v  = new List <PersonelStat>();
            List <Article>      ls = Requettes.getAllArticle();

            for (int i = 0; i < ls.Count; i++)
            {
                v.Add(new PersonelStat(ls.ElementAt(i).symbole + "", Int16.Parse(ls.ElementAt(i).stock + "")));
            }

            ((ColumnSeries)mcChartS.Series[0]).ItemsSource = v;
        }