/// <summary>
 /// 关闭订单,前置条件为:订单处于初始创建,且未支付
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void btnClose_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);
     }
 }
 /// <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);
     }
 }
        /// <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.OrderStatus == OrderStatus.已发货 || 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.支付宝)
                {
                    // 转向支付结算页面
                }
                ShowOrderInfo(lblOrderId.Text);

            }
        }
 /// <summary>
 /// 置为备货状态,前置条件为:订单为初始创建,如果是货到付款,不需要判断支付状态,其他的需要为已支付状态
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void btnPrepareGoods_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.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);
     }
 }