public void Execute() { _orderItem.Delete(_id); string total = "0"; if (_count > 2) { total = _orderItem.GetTotalPrice(_orderId); } _order.UpdateTotal(_orderId, total); }
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); }
/// <summary> /// 删除对应数据 /// </summary> /// <param name="orderId"></param> /// <returns></returns> public int Delete(object orderId) { return(dal.Delete(orderId)); }
public void Execute() { _orderItem.Delete(_id); }