示例#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);
        }
    }
示例#2
0
        public DataTable SearchByName(string name)
        {
            CakeDA cakeDA = new CakeDA();

            return(cakeDA.SearchByLikeName(name));
        }
示例#3
0
        public DataTable ShowCakeDetail(int id)
        {
            CakeDA cakeDA = new CakeDA();

            return(cakeDA.GetCakeByID(id));
        }
示例#4
0
        public DataTable GetCakes()
        {
            CakeDA cakeDA = new CakeDA();

            return(cakeDA.GetAllCakes());
        }
示例#5
0
        public bool ReturnAmountWhenDeteleItem(int quantity, int id)
        {
            CakeDA cakeDA = new CakeDA();

            return(cakeDA.ReturnCakeQuantity(quantity, id));
        }
示例#6
0
        public bool UpdateCakeAmount(int quantity, int id)
        {
            CakeDA cakeDA = new CakeDA();

            return(cakeDA.UpdateCakeQuantity(quantity, id));
        }
示例#7
0
        public bool AddNewCake(CakeBO cakeBO)
        {
            CakeDA cakeDA = new CakeDA();

            return(cakeDA.AddCake(cakeBO));
        }