/// <summary>
    /// 绑定数据
    /// </summary>
    private void BindGrid()
    {
        //throw new NotImplementedException();
        BArriveDetailBB saleBillBB = new BArriveDetailBB();
        DataSet ds = new DataSet();

        try
        {

            string strwhere = this.StrWhere;

            //销售订单编号
            if (!string.IsNullOrEmpty(this.txtSaleBillNo.Text))
            {
                strwhere += " and billNo like '%" + this.txtSaleBillNo.Text.Trim().Replace("'", "''").Trim() + "%'";
            }

            //客户
            if (!string.IsNullOrEmpty(this.txtMaterialNo.Text))
            {
                strwhere += " and (MaterialNo like '%" + this.txtMaterialNo.Text.Replace("'", "''").Trim()
                    + "%')";
            }

            //订单状态

           // ds = saleBillBB.GetVListChange(strwhere);
            ds = saleBillBB.GetVListChange(strwhere);
            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
        {
            saleBillBB.Dispose();
        }
    }