コード例 #1
0
        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
ファイル: OrderItem.cs プロジェクト: 2644783865/Infoztc
 /// <summary>
 /// 删除对应数据
 /// </summary>
 /// <param name="orderId"></param>
 /// <returns></returns>
 public int Delete(object orderId)
 {
     return(dal.Delete(orderId));
 }
コード例 #4
0
 public void Execute()
 {
     _orderItem.Delete(_id);
 }