private void ShowOrderInfo(string orderId)
        {
            GiftOrderBll bll = new GiftOrderBll();
            GiftOrderModel order = bll.GetModel(orderId,this.CurrentUser.UserId);
            if (order != null)
            {
                gvProducts.DataSource = bll.GetOrderItems(orderId);
                gvProducts.DataBind();
                gvActionLog.DataSource = bll.GetChangeLogs(orderId);
                gvActionLog.DataBind();

                lblOrderId.Text = order.OrderId;
                lblUserId.Text = order.UserId;
                lblOrderStatus.Text = order.OrderStatus.ToString();
                lblCreateTime.Text = order.CreateTime.ToString("yyyy-MM-dd HH:mm");
                lblShipMethod.Text = order.ShipMethod.ToString();
                lblAddress.Text = order.RecieverProvince + order.RecieverCity + order.RecieverCounty + " " + order.AddressDetial;
                lblPostcode.Text = order.Postalcode;
                lblUserNotes.Text = order.UserNotes;
                lblTelePhone.Text = order.RecieverPhone;
                lblReceName.Text = order.RecieverName;
                lblEmail.Text = order.RecieverEmail;
                lblTotalScore.Text = order.TotalScore.ToString();
            }
        }
 /// <summary>
 /// 发货,前置条件为:订单处于备货状态
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void btnSend_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)
        {
            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);
        }