Exemplo n.º 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;
        }
Exemplo n.º 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;
 }
Exemplo n.º 3
0
 public WrongProductMessage(Cibo product, Allergia uno, Allergia due)
 {
     this.product = product;
     this.allergia_1 = uno;
     this.allergia_2 = due;
 }
Exemplo n.º 4
0
 public AllergoloAllergiaMessage(Allergia allergia)
 {
     this.allergia = allergia;
 }
Exemplo n.º 5
0
 public AllergieMarketMessage(Allergia first, Allergia second)
 {
     allergia_1 = first;
     allergia_2 = second;
 }