Exemplo n.º 1
0
        private void ContentPage_Appearing(object sender, EventArgs e)
        {
            DataAntibio.initialiser();
            txtT.Text = categorie.getLibelle();
            Categorie categ = new Categorie(txtT.Text);

            listeCategAntibio.ItemsSource = DataAntibio.getAntibiotiquesUneCateg(categ).ToList();
        }
Exemplo n.º 2
0
        static public List <Antibio> getAntibiotiquesUneCateg(Categorie c)
        {
            List <Antibio> liste = new List <Antibio>();

            foreach (Antibio a in DataAntibio.lesAntibiotiques)
            {
                if (a.getCategorie().getLibelle() == c.getLibelle())
                {
                    liste.Add(a);
                }
            }
            return(liste);
        }