示例#1
0
    public void UpdateStock(CartItemList cart)
    {
        foreach (CartItem c in cart)
        {
            Cake aCake = c.Cake;

            // subtract the quantity sold from product amount on hand
            aCake.OnHand = aCake.OnHand - c.Quantity;

            // call to DA to update the DB
            CakeDA.Update(aCake);
        }
    }