예제 #1
0
파일: DataLayer.cs 프로젝트: matti16/SOTI
        //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;
        }
예제 #2
0
파일: StateMarket.cs 프로젝트: matti16/SOTI
 public void InitMarket(Allergia first, Allergia second)
 {
     List_of_Products = new Dictionary<Cibo, int>();
     Scartati = new List<Cibo>();
     Allergia_1 = first;
     Allergia_2 = second;
 }
예제 #3
0
 public WrongProductMessage(Cibo product, Allergia uno, Allergia due)
 {
     this.product = product;
     this.allergia_1 = uno;
     this.allergia_2 = due;
 }
예제 #4
0
 public AllergoloAllergiaMessage(Allergia allergia)
 {
     this.allergia = allergia;
 }
예제 #5
0
 public AllergieMarketMessage(Allergia first, Allergia second)
 {
     allergia_1 = first;
     allergia_2 = second;
 }