Example #1
0
    protected void BingUserMess()
    {
        UserMess um = new UserMess();

        DataListUserMess.DataSource   = um.GetUserMess();
        DataListUserMess.DataKeyField = "Id";
        DataListUserMess.DataBind();
    }
Example #2
0
    //分页
    protected PagedDataSource PsPageData()
    {
        UserMess        dll = new UserMess();
        PagedDataSource ps  = new PagedDataSource();

        ps.DataSource  = dll.GetUserMess();
        ps.AllowPaging = true;
        ps.PageSize    = 10;
        string txtPa      = Request.QueryString["page"];
        string txtCurrent = string.Empty;

        if (txtPa != null)
        {
            ps.CurrentPageIndex = Convert.ToInt32(txtPa) - 1;
        }
        else
        {
            ps.CurrentPageIndex = 0;
        }

        RepeaterCategory.DataSource = ps;
        RepeaterCategory.DataBind();
        return(ps);
    }