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); } }
public DataTable SearchByName(string name) { CakeDA cakeDA = new CakeDA(); return(cakeDA.SearchByLikeName(name)); }
public DataTable ShowCakeDetail(int id) { CakeDA cakeDA = new CakeDA(); return(cakeDA.GetCakeByID(id)); }
public DataTable GetCakes() { CakeDA cakeDA = new CakeDA(); return(cakeDA.GetAllCakes()); }
public bool ReturnAmountWhenDeteleItem(int quantity, int id) { CakeDA cakeDA = new CakeDA(); return(cakeDA.ReturnCakeQuantity(quantity, id)); }
public bool UpdateCakeAmount(int quantity, int id) { CakeDA cakeDA = new CakeDA(); return(cakeDA.UpdateCakeQuantity(quantity, id)); }
public bool AddNewCake(CakeBO cakeBO) { CakeDA cakeDA = new CakeDA(); return(cakeDA.AddCake(cakeBO)); }