예제 #1
0
 /// <summary>
 /// 前台取消未付款未发货订单
 /// </summary>
 /// <param name="orderCancel">
 /// The order cancel.
 /// </param>
 /// <returns>
 /// 操作结果:0-订单状态异常,1-操作成功,2-已发货,3-订单已取消、损失或者作废
 /// </returns>
 public int OrderCancelByFront(Order_Cancel orderCancel)
 {
     var state = new OrderCancelService().OrderCancel(orderCancel);
     return state;
 }
예제 #2
0
        /// <summary>
        /// 后台取消已付款未发货订单
        /// </summary>
        /// <param name="orderCancelCauseID">
        /// 订单取消原因编码
        /// </param>
        /// <param name="cancelDescription">
        /// 订单取消备注
        /// </param>
        /// <param name="refund">
        /// 取消对象
        /// </param>
        /// <returns>
        /// 操作状态
        /// </returns>
        public int OrderCancelRefundByBackstage(
            int orderCancelCauseID,
            string cancelDescription,
            Aftersale_Refund refund)
        {
            var state = new OrderCancelService().OrderCancelRefundByBackstage(
                orderCancelCauseID,
                cancelDescription,
                refund);
            if (state == 1)
            {
                // 取消成功时,写订单修改日志
                try
                {
                    var orderStatusLogService = new OrderStatusLogService();
                    orderStatusLogService.Insert(
                        new Order_Status_Log
                        {
                            EmployeeID = refund.EmployeeID,
                            OrderID = refund.OrderID,
                            Remark = cancelDescription,
                            Status = 6
                        },
                        null);
                }
                catch (Exception exception)
                {
                    TextLogger.Instance.Log(
                        string.Format("后台取消订单--订单状态日志写入错误.(订单编码:{0},操作员编码:{1})", refund.OrderID, refund.EmployeeID),
                        Category.Error,
                        exception);
                }
            }

            return state;
        }
예제 #3
0
        /// <summary>
        /// 后台取消未付款未发货订单
        /// </summary>
        /// <param name="orderCancel">
        /// The order cancel.
        /// </param>
        /// <returns>
        /// 操作结果:0-订单状态异常,1-操作成功,2-已发货,3-订单已取消、损失或者作废
        /// </returns>
        public int OrderCancelByBackstage(Order_Cancel orderCancel)
        {
            var state = new OrderCancelService().OrderCancel(orderCancel);
            if (state == 1)
            {
                // 取消成功时,写订单修改日志
                try
                {
                    var orderStatusLogService = new OrderStatusLogService();
                    orderStatusLogService.Insert(
                        new Order_Status_Log
                        {
                            EmployeeID = orderCancel.EmployeeID,
                            OrderID = orderCancel.OrderID,
                            Remark = orderCancel.Description,
                            Status = 6
                        },
                        null);
                }
                catch (Exception exception)
                {
                    TextLogger.Instance.Log(
                        string.Format("后台取消订单--订单状态日志写入错误.(订单编码:{0},操作员编码:{1})", orderCancel.OrderID, orderCancel.EmployeeID),
                        Category.Error,
                        exception);
                }
            }

            return state;
        }