Exemplo n.º 1
0
        public List <Ordered_Dish> GetOrderedDishes_list()
        {
            List <Ordered_Dish> list = new List <Ordered_Dish>();

            foreach (XElement OrderedDish_Element in OrderedDishes_Root.Elements())
            {
                list.Add(get_OrderedDish(int.Parse(OrderedDish_Element.Element("OrderedDish_Number").Value)));
            }
            return(list);
        }
Exemplo n.º 2
0
        public void RemoveOrdered_Dish(Ordered_Dish OD)
        {
            XElement OrderedDish_Element;

            OrderedDish_Element = (from od in OrderedDishes_Root.Elements()
                                   where Convert.ToInt32(od.Element("OrderedDish_Number").Value) == OD.OrderedDish_Number && od.Element("OrderedDish_Situation").Value == OrderedDish_Situation.IN_PROGRESS.ToString()
                                   select od).FirstOrDefault();
            OrderedDish_Element.Element("OrderedDish_Situation").Value = OrderedDish_Situation.CANCELED.ToString();
            OrderedDishes_Root.Save(OrderedDishes_Path);
        }