Пример #1
0
        public bool InsertOrder(List<int> idplatos, Order order)
        {
            try
            {
                dcdc.Orders.InsertOnSubmit(order);
                dcdc.SubmitChanges();
                var s = (from data in dcdc.Orders select data.id_ord).Last();
                foreach (int idp in idplatos)
                {
                    var od = new Order_Dish {id_ord = s, id_dish = idp, status_orddish = '0'};

                    dcdc.Order_Dishes.InsertOnSubmit(od);
                    dcdc.SubmitChanges();
                }
                return true;
            }
            catch (Exception)
            {
                return false;
            }
        }
Пример #2
0
 partial void DeleteOrder_Dish(Order_Dish instance);
Пример #3
0
 partial void UpdateOrder_Dish(Order_Dish instance);
Пример #4
0
 partial void InsertOrder_Dish(Order_Dish instance);