Example #1
0
    public void DataBindToGridview()
    {
        GVData.PageSize  = AspNetPager1.PageSize;
        GVData.PageIndex = AspNetPager1.CurrentPageIndex - 1;
        ZWL.BLL.ERPSource MyModel = new ZWL.BLL.ERPSource();
        DataSet           ds      = MyModel.GetList("SourceName Like '%" + this.TextBox1.Text + "%' order by ID desc");

        GVData.DataSource = ds;
        GVData.DataBind();
        AspNetPager1.RecordCount = ds.Tables[0].Rows.Count;
    }