Beispiel #1
0
    private void InitData(int PageIndex, string name)
    {
        this.Title = "链接列表";    // 设置标题

        DataSet ds          = new DataSet();
        int     recordcount = 0; //获取总条数

        if (!name.Equals(string.Empty) && name != null)
        {
            //搜索
            ds = bll.GetSearchNameList(AspNetPager1.PageSize, PageIndex, name, out recordcount);
        }
        else
        {
            ds = bll.GetList(AspNetPager1.PageSize, PageIndex, out recordcount);
        }

        AspNetPager1.RecordCount = recordcount;

        this.rptBind.DataSource = ds.Tables[0].DefaultView;
        this.rptBind.DataBind();
    }