// 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); }
public DataBaseCon() { this.coinData = new CoinData(); this.drinkData = new DrinkData(); }