Exemple #1
0
        //Load Allergie from DataBase
        private List<Allergia> ReadAllergie()
        {
            OleDbDataReader reader = null;
            List<Allergia> allergie = new List<Allergia>();
            try
            {
                OleDbCommand cmd =
                    new OleDbCommand("Select * FROM Allergie", conn);
                reader = cmd.ExecuteReader();
                while (reader.Read())
                {
                    Allergia newItem = new Allergia();
                    newItem.nome = reader["Nome"].ToString();
                    newItem.descrizione = reader["Descrizione"].ToString();
                    newItem.immagine = reader["Immagine"].ToString();
                    allergie.Add(newItem);
                }

            }
            finally
            {
                if (reader != null) reader.Close();
            }
            return allergie;
        }
Exemple #2
0
 public void InitMarket(Allergia first, Allergia second)
 {
     List_of_Products = new Dictionary<Cibo, int>();
     Scartati = new List<Cibo>();
     Allergia_1 = first;
     Allergia_2 = second;
 }
Exemple #3
0
 public WrongProductMessage(Cibo product, Allergia uno, Allergia due)
 {
     this.product = product;
     this.allergia_1 = uno;
     this.allergia_2 = due;
 }
 public AllergoloAllergiaMessage(Allergia allergia)
 {
     this.allergia = allergia;
 }
 public AllergieMarketMessage(Allergia first, Allergia second)
 {
     allergia_1 = first;
     allergia_2 = second;
 }