Esempio n. 1
0
        public void UpdateInv(Cupcake lookupCupcake, int qnty)
        {
            double[] cupcakeRequirements = lookupCupcake.GetIngredients();

            int i = 0;

            foreach (var item in StoreInv)
            {
                StoreInv[i] -= (double)(cupcakeRequirements[i] * qnty);
                i++;
            }
        }
Esempio n. 2
0
        public bool CheckInv(Cupcake lookupCupcake, int qnty)
        {
            double[] cupcakeRequirements = lookupCupcake.GetIngredients();

            int i = 0;

            foreach (var item in StoreInv)
            {
                if (StoreInv[i] < (double)(cupcakeRequirements[i] * qnty))
                {
                    return(false);
                }
                i++;
            }
            return(true);
        }