Beispiel #1
0
        private WebGridList <UserModel> CreateUsersList(UserSearchCriteriaModel userSearchCriteriaModel)
        {
            userSearchCriteriaModel = userSearchCriteriaModel ?? new UserSearchCriteriaModel {
                PageSize = pageSize
            };
            UserSearchCriteria  searchCriteria = userSearchCriteriaModel.ToEntity();
            IQueryResult <User> queryResult    = UserService.Obj.Find(searchCriteria);

            //update stored criteria
            UserSearchCriteriaModelStored = userSearchCriteriaModel;

            return(queryResult.ToWebGridListModel());
        }
 public static UserSearchCriteria ToEntity(this UserSearchCriteriaModel model)
 {
     return(new UserSearchCriteria
     {
         FullName = model.FullName,
         Mobile = model.Mobile,
         RoleName = model.RoleName,
         UserName = model.UserName,
         Email = model.Email,
         IsActive = model.IsActive,
         PageSize = model.PageSize,
         PageNumber = model.PageNumber,
         Sort = model.Sort,
         SortDirection = model.SortDirection
     });
 }