예제 #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));
        }