Exemple #1
0
        void BindLockedUsers()
        {
            if (!canManageUsers)
            {
                return;
            }

            siteUserPage = SiteUser.GetPageLockedUsers(
                siteSettings.SiteId,
                pageNumber,
                pageSize,
                out totalPages
                );

            if (pageNumber > totalPages)
            {
                pageNumber   = 1;
                siteUserPage = SiteUser.GetPageLockedUsers(
                    siteSettings.SiteId,
                    pageNumber,
                    pageSize,
                    out totalPages
                    );
            }
        }
Exemple #2
0
        //private void AddAlphaPagerLinks()
        //{
        //    Literal topPageLinks = new Literal();
        //    string pageUrl = SiteRoot + "/MemberList.aspx?sd=" + sortMode.ToInvariantString() + "&pagenumber=";


        //    if (displaySettings.AlphaPagerContainerCssClass.Length > 0)
        //    {
        //        spnTopPager.Attributes.Add("class", displaySettings.AlphaPagerContainerCssClass);
        //    }

        //    string alphaChars;

        //    if (WebConfigSettings.GetAlphaPagerCharsFromResourceFile)
        //    {
        //        alphaChars = Resource.AlphaPagerChars;
        //    }
        //    else
        //    {
        //        alphaChars = WebConfigSettings.AlphaPagerChars;
        //    }


        //    topPageLinks.Text = UIHelper.GetAlphaPagerLinks(
        //        pageUrl,
        //        pageNumber,
        //        alphaChars,
        //        userNameBeginsWith,
        //        displaySettings.AlphaPagerCurrentPageCssClass,
        //        displaySettings.AlphaPagerOtherPageCssClass,
        //        displaySettings.UseListForAlphaPager,
        //        BuildAllUsersLink());

        //    this.spnTopPager.Controls.Add(topPageLinks);
        //}

        //private string BuildAllUsersLink()
        //{
        //    string cssAttribute = string.Empty;
        //    if (displaySettings.AllUsersLinkCssClass.Length > 0)
        //    {
        //        cssAttribute = " class='" + displaySettings.AllUsersLinkCssClass + "'";
        //    }
        //    string firstLink = "<a href='" + SiteRoot + "/MemberList.aspx'" + cssAttribute + ">"
        //        + Resource.MemberListAllUsersLink + "</a> ";

        //    return firstLink;

        //}

        //void btnSearchUser_Click(object sender, EventArgs e)
        //{
        //    string pageUrl = SiteRoot + "/MemberList.aspx?search=" + Server.UrlEncode(Server.HtmlEncode(txtSearchUser.Text)) + "&pagenumber=";

        //    WebUtils.SetupRedirect(this, pageUrl);

        //}

        //void btnSearchIP_Click(object sender, EventArgs e)
        //{
        //    pgrMembers.Visible = false;
        //    List<SiteUser> users = SiteUser.GetByIPAddress(siteSettings.SiteGuid, txtIPAddress.Text);
        //    rptUsers.DataSource = users;
        //    rptUsers.DataBind();


        //}

        void BindLockedUsers()
        {
            if (!canManageUsers)
            {
                return;
            }

            siteUserPage = SiteUser.GetPageLockedUsers(
                siteSettings.SiteId,
                pageNumber,
                pageSize,
                out totalPages);

            if (pageNumber > totalPages)
            {
                pageNumber   = 1;
                siteUserPage = SiteUser.GetPageLockedUsers(
                    siteSettings.SiteId,
                    pageNumber,
                    pageSize,
                    out totalPages);
            }

            //string pageUrl = SiteRoot
            //    + "/MemberList.aspx?"
            //    + "pagenumber={0}"
            //    + "&amp;locked=true";

            //pgrMembers.PageURLFormat = pageUrl;
            //pgrMembers.ShowFirstLast = true;
            //pgrMembers.CurrentIndex = pageNumber;
            //pgrMembers.PageSize = pageSize;
            //pgrMembers.PageCount = totalPages;
            //pgrMembers.Visible = (totalPages > 1);


            //rptUsers.DataSource = siteUserPage;

            //rptUsers.DataBind();
        }