コード例 #1
0
 private void BindForSearch()
 {
     if (canManageUsers)
     {
         if (ipSearchText.Length > 0)
         {
             siteUserPage = SiteUser.GetByIPAddress(siteSettings.SiteGuid, ipSearchText);
         }
         else
         {
             // admins can also search against email address
             siteUserPage = SiteUser.GetUserAdminSearchPage(
                 siteSettings.SiteId,
                 pageNumber,
                 pageSize,
                 searchText,
                 sortMode,
                 out totalPages
                 );
         }
     }
     else
     {
         siteUserPage = SiteUser.GetUserSearchPage(
             siteSettings.SiteId,
             pageNumber,
             pageSize,
             searchText,
             sortMode,
             out totalPages
             );
     }
 }
コード例 #2
0
        void btnIPLookup_Click(object sender, EventArgs e)
        {
            pgrMembers.Visible = false;
            List <SiteUser> users = SiteUser.GetByIPAddress(siteSettings.SiteGuid, txtIPAddress.Text);

            rptUsers.DataSource = users;
            rptUsers.DataBind();
        }
コード例 #3
0
        private void BindForSearch()
        {
            if (canManageUsers)
            {
                if (ipSearchText.Length > 0)
                {
                    siteUserPage = SiteUser.GetByIPAddress(siteSettings.SiteGuid, ipSearchText);
                }
                else
                {
                    // admins can also search against email address
                    siteUserPage = SiteUser.GetUserAdminSearchPage(
                        siteSettings.SiteId,
                        pageNumber,
                        pageSize,
                        searchText,
                        sortMode,
                        out totalPages);
                }
            }
            else
            {
                siteUserPage = SiteUser.GetUserSearchPage(
                    siteSettings.SiteId,
                    pageNumber,
                    pageSize,
                    searchText,
                    sortMode,
                    out totalPages);
            }


            //if (searchText.Length > 0)
            //{
            //    txtSearchUser.Text = Server.HtmlEncode(searchText);
            //}

            //AddAlphaPagerLinks();


            //string pageUrl = SiteRoot
            //    + "/MemberList.aspx?"
            //    + "search=" + Server.UrlEncode(Server.HtmlEncode(searchText))
            //    + "&amp;pagenumber={0}"
            //    +"&amp;sd=" + sortMode.ToInvariantString(); ;

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


            //rptUsers.DataSource = siteUserPage;
            //rptUsers.DataBind();
        }