Пример #1
0
        public GetUsersResponse GetUsersByCriteria(GetUsersRequest request)
        {
            GetUsersResponse response = new GetUsersResponse();
            SecurityBusinessComponent bc = DependencyInjectionHelper.GetSecurityBusinessComponent();

            IQueryable<User> users = bc.GetUsersByCriteria(request.SearchType, request.Username, request.Rolename);
            response.Users = SecurityAdapter.UsersToDtos(users);

            return response;
        }
Пример #2
0
 private IList<UserListDTO> getUsers(UserSearchType searchType, string name, string role)
 {
     try
     {
         GetUsersRequest request = new GetUsersRequest();
         request.SearchType = searchType;
         request.Username = name;
         request.Rolename = role;
         GetUsersResponse response = Service.GetUsersByCriteria(request);
         return response.Users;
     }
     catch (Exception ex)
     {
         if (ExceptionPolicy.HandleException(ex, "PL Policy")) throw;
         return new List<UserListDTO>();
     }
 }