public void Execute()
        {
            _orderItem.Delete(_id);
            string total = "0";

            if (_count > 2)
            {
                total = _orderItem.GetTotalPrice(_orderId);
            }
            _order.UpdateTotal(_orderId, total);
        }
예제 #2
0
        public static bool Delete(int orderId)
        {
            IList <OrderItemInfo> infoListByOrderId = GetInfoListByOrderId(orderId);
            bool flag = dal.Delete(orderId);

            if (flag)
            {
                foreach (OrderItemInfo info in infoListByOrderId)
                {
                    if (!string.IsNullOrEmpty(info.TableName))
                    {
                        Product.AddOrderNum(info.ProductId, -info.Amount);
                    }
                }
            }
            return(flag);
        }
예제 #3
0
 /// <summary>
 /// 删除对应数据
 /// </summary>
 /// <param name="orderId"></param>
 /// <returns></returns>
 public int Delete(object orderId)
 {
     return(dal.Delete(orderId));
 }
 public void Execute()
 {
     _orderItem.Delete(_id);
 }