/// <summary>
    /// 绑定Grid
    /// </summary>
    protected void BindGrid()
    {
        BArrangeBillDetailBB arrangeBillDetailBB = new BArrangeBillDetailBB();

        try
        {
            string strArriveBillNo = "", strFinanceBillNo = "", strMaterial = "",
                strStartDt = "", strEndDt = "", strAcceptStartDt = "", stAccecptEndDt = "";
            DataSet ds = new DataSet();

            //到货单号
            if (!string.IsNullOrEmpty(this.tbArriveBillNo.Text.Trim()))
            {
                strArriveBillNo = this.tbArriveBillNo.Text.Trim().ToUpper();
            }

            //采购合同号
            if (!string.IsNullOrEmpty(this.tbFinanceBillNo.Text.Trim()))
            {
                strFinanceBillNo = this.tbFinanceBillNo.Text.Trim().ToUpper();
            }

            //物料
            if (!string.IsNullOrEmpty(this.tbMaterial.Text.Trim()))
            {
                strMaterial = this.tbMaterial.Text.Trim().ToUpper();
            }

            //开始入库日期
            if (!string.IsNullOrEmpty(this.tbStartDt.Text.Trim()))
            {
                strStartDt = this.tbStartDt.Text.Trim().ToUpper();
            }

            //截止入库日期
            if (!string.IsNullOrEmpty(this.tbEndDt.Text.Trim()))
            {
                strEndDt = this.tbEndDt.Text.Trim().ToUpper();
            }

            //开始收货日期
            if (!string.IsNullOrEmpty(this.tbAcceptStartDt.Text.Trim()))
            {
                strAcceptStartDt = this.tbAcceptStartDt.Text.Trim().ToUpper();
            }

            //截止收货日期
            if (!string.IsNullOrEmpty(this.tbAcceptEndDt.Text.Trim()))
            {
                stAccecptEndDt = this.tbAcceptEndDt.Text.Trim().ToUpper();
            }

            ds = arrangeBillDetailBB.ArriveBoxStatisticReport(strArriveBillNo, strFinanceBillNo, strMaterial,
                strStartDt, strEndDt, strAcceptStartDt, stAccecptEndDt);
            this.grid.DataSource = ds.Tables[0];
            this.grid.DataBind();

            //赋值记录条数、页面总数
            this.Label3.Text = ds.Tables[0].Rows.Count.ToString();
            this.Label2.Text = this.grid.PageCount.ToString();
            this.currPage.Text = (this.grid.PageIndex + 1).ToString();
        }
        finally
        {
            arrangeBillDetailBB.Dispose();
        }
    }