Example #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;
            }
        }
Example #2
0
		private void detach_Orders(Order entity)
		{
			this.SendPropertyChanging();
			entity.Order_Dish = null;
		}
Example #3
0
		private void attach_Orders(Order entity)
		{
			this.SendPropertyChanging();
			entity.Order_Dish = this;
		}
Example #4
0
 partial void DeleteOrder(Order instance);
Example #5
0
 partial void UpdateOrder(Order instance);
Example #6
0
 partial void InsertOrder(Order instance);