public void AddOrdered_Dish(Ordered_Dish orderedDish) { try { // if (dal_func.SearchDishById(orderedDish.DishNumber).kosherLevel > dal_func.searchOrderByID(orderedDish.OrderCode).Kosher) dal_func.AddOrdered_Dish(orderedDish); } catch (Exception ex) { throw ex; } }
public XElement ConvertOrdered_Dish(BE.Ordered_Dish b)//converts from XElement to Ordered Dish { XElement ordereddishElement = new XElement("Ordered-Dish"); foreach (PropertyInfo item in typeof(Ordered_Dish).GetProperties()) { ordereddishElement.Add ( new XElement(item.Name, item.GetValue(b, null)) ); } return(ordereddishElement); }
public void RemoveOrderde_dish(Ordered_Dish orderedDish) { myo_d.RemoveOrder_Dish((int)orderedDish.OrderCode); }
public void AddOrdered_Dish(Ordered_Dish orteredDish) { myo_d.AddOrder_Dish(orteredDish); }
public void UpdateOrderde_Dish(Ordered_Dish orderedDish) { myo_d.UpdateOrder_Dish(orderedDish); }
public void RemoveOrderde_dish(Ordered_Dish orteredDish) { dal_func.RemoveOrderde_dish(orteredDish); }
public void UpdateOrderde_Dish(Ordered_Dish orteredDish) { dal_func.UpdateOrderde_Dish(orteredDish); }
public void UpdateOrder_Dish(Ordered_Dish orderD)//update order dish { if (RemoveOrder_Dish((int)orderD.OrderCode)) AddOrder_Dish(orderD); else throw new NullReferenceException("Order_Dish not found!"); }
public void AddOrder_Dish(Ordered_Dish order_Dish)//add order dish { XElement Orderid = new XElement("Orderid", order_Dish.OrderCode); XElement DishId = new XElement("DishId", order_Dish.DishNumber); XElement Size = new XElement("Size", order_Dish.DishSize); XElement Amount = new XElement("Amount", order_Dish.AmountOfServings); XElement orde_d = new XElement("OrderDish_Details",DishId,Size,Amount); Order_DishRoot.Add(new XElement("Order", Orderid, orde_d)); Order_DishRoot.Save(Order_DishPath); }
public void UpdateOrderde_Dish(Ordered_Dish orteredDish) { for (int i = 0; i < DataSource.Ordered_DishList.Count(); i++) { if (DataSource.Ordered_DishList[i].OrderCode == orteredDish.OrderCode) { DataSource.Ordered_DishList[i].AmountOfServings = orteredDish.AmountOfServings; DataSource.Ordered_DishList[i].DishNumber = orteredDish.DishNumber; break; } } }
public void RemoveOrderde_dish(Ordered_Dish orteredDish) { if (orteredDish == null && DataSource.Ordered_DishList.Remove(orteredDish)) throw new NullReferenceException("orderDish not found"); }
public void AddOrdered_Dish(Ordered_Dish orteredDish) { DataSource.Ordered_DishList.Add(orteredDish); }