//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; }
public void InitMarket(Allergia first, Allergia second) { List_of_Products = new Dictionary<Cibo, int>(); Scartati = new List<Cibo>(); Allergia_1 = first; Allergia_2 = second; }
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; }