Example #1
0
        /// <summary>
        /// 买家申请退款
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void ap_WaitSellerAgree(object sender, NotifyEventArgs e)
        {
            log.Info("买家申请退款,订单号为:" + e.Out_Trade_No);
            CommOrderModel omodel = obll.GetModel(e.Out_Trade_No);

            if (omodel.PayMethod == PayMethType.支付宝)
            {
                if (obll.ChangePayStatus(e.Out_Trade_No, PayStatus.退款申请中))
                {
                    lbll.Add(e.Out_Trade_No, e.Trade_Status + " " + e.Refund_Status, PayStatus.退款申请中.ToString(), "alipay");
                }
            }
        }
        /// <summary>
        /// 置为买家签收(物流),前置条件:订单已发货
        /// 如果是货到付款订单,同时设置订单支付状态为已支付
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnCherrys_Click(object sender, EventArgs e)
        {
            CommOrderBll      obll  = new CommOrderBll();
            OrderChangeLogBll lbll  = new OrderChangeLogBll();
            CommOrderModel    order = obll.GetModel(lblOrderId.Text);

            if (order != null && order.OrderStatus == OrderStatus.已发货)
            {
                obll.ChangeOrderStatus(order.OrderId, OrderStatus.物流到货);
                lbll.Add(order.OrderId, txtActionRemark.Text.Trim(), OrderStatus.物流到货.ToString(),
                         Context.User.Identity.Name);

                if (order.PayMethod == PayMethType.货到付款)
                {
                    obll.ChangePayStatus(order.OrderId, PayStatus.支付成功);
                    lbll.Add(order.OrderId, txtActionRemark.Text.Trim(), PayStatus.支付成功.ToString(),
                             Context.User.Identity.Name);
                }
                ShowOrderInfo(lblOrderId.Text);
            }
        }
Example #3
0
        /// <summary>
        /// 置为退款完成,前置条件:退款申请中订单,不包括货到付款订单
        /// 如果是线上支付订单,需要调用接口完成退款操作(目前暂无接口)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnAskRefund_Click(object sender, EventArgs e)
        {
            CommOrderBll      obll  = new CommOrderBll();
            OrderChangeLogBll lbll  = new OrderChangeLogBll();
            CommOrderModel    order = obll.GetModel(lblOrderId.Text);

            if (order != null && order.PayMethod != PayMethType.货到付款 && order.PayStatus == PayStatus.支付成功)
            {
                obll.ChangePayStatus(order.OrderId, PayStatus.退款申请中);
                lbll.Add(order.OrderId, txtActionRemark.Text.Trim(), PayStatus.退款申请中.ToString(),
                         Context.User.Identity.Name);
                ShowOrderInfo(lblOrderId.Text);
            }
        }
        /// <summary>
        /// 置为订单完成,前置条件:物流已到货,且支付成功
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnFinish_Click(object sender, EventArgs e)
        {
            CommOrderBll      obll  = new CommOrderBll();
            OrderChangeLogBll lbll  = new OrderChangeLogBll();
            CommOrderModel    order = obll.GetModel(lblOrderId.Text);

            if (order != null && order.OrderStatus == OrderStatus.物流到货 && order.PayStatus == PayStatus.支付成功)
            {
                obll.ChangeOrderStatus(order.OrderId, OrderStatus.交易完成);
                lbll.Add(order.OrderId, txtActionRemark.Text.Trim(), OrderStatus.交易完成.ToString(),
                         Context.User.Identity.Name);
                ShowOrderInfo(lblOrderId.Text);
            }
        }
Example #5
0
        /// <summary>
        /// 置为备货状态,前置条件为:订单为初始创建
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnPrepareGoods_Click(object sender, EventArgs e)
        {
            GiftOrderBll      obll  = new GiftOrderBll();
            OrderChangeLogBll lbll  = new OrderChangeLogBll();
            GiftOrderModel    order = obll.GetModel(lblOrderId.Text);

            if (order != null && order.OrderStatus == OrderStatus.已创建)
            {
                obll.ChangeOrderStatus(order.OrderId, OrderStatus.备货中);
                lbll.Add(order.OrderId, txtActionRemark.Text.Trim(), OrderStatus.备货中.ToString(),
                         Context.User.Identity.Name);
            }
            ShowOrderInfo(lblOrderId.Text);
        }
        /// <summary>
        /// 置为交易失败,前置条件为:货到付款订单,已发货;其他订单,已退款
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnFail_Click(object sender, EventArgs e)
        {
            CommOrderBll      obll  = new CommOrderBll();
            OrderChangeLogBll lbll  = new OrderChangeLogBll();
            CommOrderModel    order = obll.GetModel(lblOrderId.Text);

            if (order != null &&
                ((order.PayMethod == PayMethType.货到付款 && order.OrderStatus == OrderStatus.已发货) ||
                 (order.PayMethod != PayMethType.货到付款 && order.PayStatus == PayStatus.退款完成)))
            {
                obll.ChangeOrderStatus(order.OrderId, OrderStatus.交易失败);
                lbll.Add(order.OrderId, txtActionRemark.Text.Trim(), OrderStatus.交易失败.ToString(),
                         Context.User.Identity.Name);
                ShowOrderInfo(lblOrderId.Text);
            }
        }
Example #7
0
        /// <summary>
        /// 置为交易失败,前置条件为:货到付款订单,已发货;其他订单,已退款
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnFail_Click(object sender, EventArgs e)
        {
            GiftOrderBll      obll  = new GiftOrderBll();
            OrderChangeLogBll lbll  = new OrderChangeLogBll();
            GiftOrderModel    order = obll.GetModel(lblOrderId.Text);

            if (order != null &&
                (order.OrderStatus == OrderStatus.已创建 || order.OrderStatus == OrderStatus.备货中 ||
                 order.OrderStatus == OrderStatus.已发货))
            {
                obll.ChangeOrderStatus(order.OrderId, OrderStatus.交易失败);
                lbll.Add(order.OrderId, txtActionRemark.Text.Trim(), OrderStatus.交易失败.ToString(),
                         Context.User.Identity.Name);

                MemberInfo.LogScore(order.UserId, NoName.NetShop.Common.ScoreType.Gift, order.TotalScore, order.OrderId, "订单失败,归还积分");
            }
            ShowOrderInfo(lblOrderId.Text);
        }