Exemple #1
0
        private void symboleArticleStat_KeyUp(object sender, KeyEventArgs e)
        {
            symboleArticleStat.Text = saisieFloat(sender);
            if (symboleArticleStat.Text.Equals(""))
            {
                ((LineSeries)mcChartSS.Series[0]).ItemsSource = null;
                symboleArticleStat.Background = Brushes.Bisque;
            }
            else
            {
                if (Requettes.SymboleExisteJournalArticle(symboleArticleStat.Text) == 0)
                {
                    symboleArticleStat.Background = Brushes.Bisque;
                }
                else
                {
                    List <journalArticle> art = Requettes.getAllJournalArticleBySymbole(symboleArticleStat.Text);
                    List <PersonelStat>   v   = new List <PersonelStat>();
                    //List<Article> ls = Requettes.getAllArticle();
                    for (int i = 0; i < art.Count; i++)
                    {
                        v.Add(new PersonelStat(new DateTime(Int16.Parse(art.ElementAt(i).anne), Int16.Parse(art.ElementAt(i).moi), Int16.Parse(art.ElementAt(i).jour)).ToShortDateString(), Int16.Parse(art.ElementAt(i).remarque + "")));
                    }

                    ((LineSeries)mcChartSS.Series[0]).ItemsSource = v;
                    symboleArticleStat.Background = Brushes.GreenYellow;
                }
            }
        }