protected void btn_AuditSubmit_Click(object sender, EventArgs e)
    {
        int warehouseid = this.UCWareHouse1.WareHousrID;
        int depotseatID = this.UCWareHouse1.DepotSeatID;

        if (Session["Company"] == null)
        {
            return;
        }
        if (warehouseid < 1)
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("007832", "请选择产品退入的仓库!") + "');</script>", false);
            return;
        }
        if (depotseatID < 1)
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("007833", "请选择产品退入的库位!") + "');</script>", false);
            return;
        }
        string msg     = string.Empty;
        string auditer = Session["Company"].ToString();
        var    refundmentOrderDocService     = new RefundmentOrderDocBLL();
        RefundmentOrderDocModel refundEntity = refundmentOrderDocService.GetRefundmentOrderDocByDocID(DocID, ref msg);

        refundEntity.WareHouseID   = warehouseid;
        refundEntity.DepotSeatID   = depotseatID;
        refundEntity.Auditer       = auditer;
        refundEntity.AuditTime     = DateTime.Now;
        refundEntity.StatusFlag_NR = (int)RefundmentOrderStatusEnum.AuditedUnPay;
        bool flag = refundmentOrderDocService.AuditRefundmentOrderDoc(refundEntity, ref msg);

        if (!flag)
        {
            if (string.IsNullOrEmpty(msg))
            {
                msg = GetTran("001541", "操作失败!");
            }
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + msg + "');</script>", false);
        }
        else
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("000858", "审核成功!") + "');window.location.href='RefundmentOrderForMemberList.aspx';</script>", false);
        }
    }
    /// <summary>
    /// 绑定退货单信息
    /// </summary>
    private void BindReturnOrderBill()
    {
        string docid = DocID;

        if (string.IsNullOrEmpty(docid))
        {
            return;
        }

        string msg = string.Empty;
        var    refundmentOrderDocService     = new RefundmentOrderDocBLL();
        RefundmentOrderDocModel refundEntity = refundmentOrderDocService.GetRefundmentOrderDocByDocID(docid, ref msg);

        if (refundEntity == null)
        {
            if (string.IsNullOrEmpty(msg))
            {
                msg = GetTran("007831", "获取数据失败!");
            }
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + msg + "');</script>", false);
            return;
        }
        string number     = refundEntity.OwnerNumber_TX;
        var    memberInfo = MemberInfoDAL.getMemberInfo(number);

        this.lbl_ApplyName.Text = refundEntity.Applicant_TX;

        decimal memberjj = 0;

        //Jackpot-ECTPay-Releasemoney-Out-membership lbl_MemberTotalMoney
        memberjj = (memberInfo.Jackpot - memberInfo.EctOut - memberInfo.Memberships);
        this.lbl_MemberJJ.Text     = memberjj.ToString();
        this.lbl_MemberName.Text   = memberInfo.Name;
        this.lbl_MemberNumber.Text = memberInfo.Number;
        DataTable dtMoneyPv = MemberInfoDAL.GetMemberOrderMoneyPVSum(refundEntity.OwnerNumber_TX);

        if (dtMoneyPv != null && dtMoneyPv.Rows.Count > 0)
        {
            this.lbl_MemberTotalMoney.Text  = Convert.ToDouble(dtMoneyPv.Rows[0]["totalmoney"]).ToString("f2");
            this.lbl_MemberTotalMoney2.Text = this.lbl_MemberTotalMoney.Text;
            this.lbl_MemberTotalPV.Text     = Convert.ToDouble(dtMoneyPv.Rows[0]["totalpv"]).ToString("f2");
            lab_mtpv.Text = Convert.ToDouble(dtMoneyPv.Rows[0]["totalpv"]).ToString("f2");
        }

        this.lbl_OrderIDS.Text = refundEntity.OriginalDocIDS;
        this.lbl_Phone.Text    = refundEntity.MobileTele;

        this.lbl_refundmentTypeName.Text = RefundsTypeConst.GetRefundsTypeName((RefundsTypeEnum)refundEntity.RefundmentType_NR);
        if (refundEntity.RefundmentType_NR == (int)RefundsTypeEnum.RefundsUseBank)
        {//银行退款
            this.pnl_bankInfo.Visible       = true;
            this.lbl_BankAccountName.Text   = refundEntity.BankBookName;
            this.lbl_BankAccountNumber.Text = refundEntity.BankBook;
            this.lbl_BankBranch.Text        = refundEntity.BankBranch;
            string    bankName   = string.Empty;
            string    bankCode   = refundEntity.BankCode;
            DataTable dtBankInfo = CommonDataBLL.GetCountryBankByBankCode(bankCode);
            if (dtBankInfo != null && dtBankInfo.Rows.Count > 0)
            {
                bankName = dtBankInfo.Rows[0]["BankName"].ToString();
            }
            this.lbl_BankName.Text = bankName;
        }
        else
        {
            this.pnl_bankInfo.Visible = false;
        }
        this.lbl_RegesterDate.Text = memberInfo.RegisterDate.ToString();
        this.lbl_Reson.Text        = refundEntity.Cause_TX;
        string fullAddress = string.Empty;

        /*
         * string CPCCode = refundEntity.CPCCode; //memberInfo.CPCCode.ToString();
         * if (CPCCode != string.Empty)
         * {
         *  CityModel cityModel = CommonDataDAL.GetCPCCode(CPCCode);
         *  if (cityModel != null)
         *  {
         *      fullAddress = cityModel.Country + cityModel.Province + cityModel.City;
         *  }
         * }*/
        fullAddress += refundEntity.Address_TX;
        this.lbl_ReturnAddress.Text    = fullAddress;
        this.lbl_ReturnDate.Text       = refundEntity.RefundmentDate_DT.ToString();
        this.lbl_ReturnTotalMoney.Text = refundEntity.TotalMoney.ToString();
        this.lbl_ReturnTotalPV.Text    = refundEntity.TotalPV.ToString();
        this.lblDealingOrderID.Text    = refundEntity.DocID;


        #region 绑定退货明细
        DataTable dtDetails = refundmentOrderDocService.GetRefundmentOrderDetailsByDocID(refundEntity.DocID);
        if (dtDetails != null)
        {
            this.gv_OrderDetailsAll.DataSource = dtDetails;
            this.gv_OrderDetailsAll.DataBind();
        }
        #endregion
    }