Esempio n. 1
0
        // Method to update de data
        public void UpdateData(IEnumerable <Coin> coins, IEnumerable <Drink> drinks)
        {
            CoinData.Coins = coins;

            var soldCokes  = (from d in drinks where d.Name == "Coke" select d.Quantity).First();
            var soldPepsis = (from d in drinks where d.Name == "Pepsi" select d.Quantity).First();
            var soldSodas  = (from d in drinks where d.Name == "Soda" select d.Quantity).First();

            DrinkData = new DrinkData(soldCokes, soldPepsis, soldSodas);
        }
Esempio n. 2
0
 public DataBaseCon()
 {
     this.coinData  = new CoinData();
     this.drinkData = new DrinkData();
 }