protected override IDataReader CallGetUsersBySearchTerm(
     GetUsersContract usersContract,
     bool?includeAuthorized,
     bool?includeDeleted,
     bool?includeSuperUsers)
 {
     LastSearch = SearchTextFilter.CleanWildcards(usersContract.SearchText);
     dataReader = new Mock <IDataReader>();
     return(dataReader.Object);
 }
 protected override IDataReader CallGetUsersBySearchTerm(
     GetUsersContract usersContract,
     bool?includeAuthorized,
     bool?includeDeleted,
     bool?includeSuperUsers,
     bool?hasAgreedToTerms,
     bool?requestsRemoval)
 {
     this.LastSearch = SearchTextFilter.CleanWildcards(usersContract.SearchText);
     this.dataReader = new Mock <IDataReader>();
     return(this.dataReader.Object);
 }
예제 #3
0
        private IEnumerable <UserBasicDto> GetUsers(GetUsersContract usersContract,
                                                    bool?includeAuthorized, bool?includeDeleted, bool?includeSuperUsers,
                                                    bool?hasAgreedToTerms, bool?requestsRemoval, out int totalRecords)
        {
            var parsedSearchText = string.IsNullOrEmpty(usersContract.SearchText) ? "" : SearchTextFilter.CleanWildcards(usersContract.SearchText.Trim());

            usersContract.SearchText = string.Format("{0}*", parsedSearchText);

            List <UserBasicDto2> records = CBO.FillCollection <UserBasicDto2>(
                this.CallGetUsersBySearchTerm(
                    usersContract,
                    includeAuthorized,
                    includeDeleted,
                    includeSuperUsers,
                    hasAgreedToTerms,
                    requestsRemoval));

            totalRecords = records.Count == 0 ? 0 : records[0].TotalCount;
            return(records);
        }
예제 #4
0
        protected virtual IDataReader CallGetUsersBySearchTerm(GetUsersContract usersContract,
                                                               bool?includeAuthorized, bool?includeDeleted, bool?includeSuperUsers,
                                                               bool?hasAgreedToTerms, bool?requestsRemoval)
        {
            var parsedSearchText = string.IsNullOrEmpty(usersContract.SearchText) ? "" : SearchTextFilter.CleanWildcards(usersContract.SearchText.Trim());

            return(DataProvider.Instance().ExecuteReader(
                       "Personabar_GetUsersBySearchTerm",
                       usersContract.PortalId,
                       string.IsNullOrEmpty(usersContract.SortColumn) ? "Joined" : usersContract.SortColumn,
                       usersContract.SortAscending,
                       usersContract.PageIndex,
                       usersContract.PageSize,
                       parsedSearchText,
                       includeAuthorized,
                       includeDeleted,
                       includeSuperUsers,
                       hasAgreedToTerms,
                       requestsRemoval));
        }