Exemple #1
0
        public virtual JsonResult GetUsersListNoSelf(string filter)
        {
            var userList = UserIdentityManager.SearchUsersByNameOrFullName(new GetUserByPCmailOrNameRequest {
                Search = filter
            });
            UsersByNameOrFullNameResponse response = new UsersByNameOrFullNameResponse();

            if (userList != null)
            {
                response = userList.Users.UserIdentityModelToResponse();

                if (response != null && response.ListResponse != null)
                {
                    var currentUser = response.ListResponse
                                      .SingleOrDefault(o => o.Value.ToUpper() == IDBContext.Current.UserName.ToUpper());
                    response.ListResponse.Remove(currentUser);
                }
            }

            return(new JsonResult
            {
                Data = response,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
Exemple #2
0
        public virtual JsonResult GetUsersList(string filter)
        {
            UsersByNameOrFullNameResponse resp = new UsersByNameOrFullNameResponse();
            var response = UserIdentityManager.SearchUsersByFullNameOrName(new GetUsersRequest {
                FullName = filter
            });

            if (response != null && response.Users != null)
            {
                resp = response.Users.UserIdentityModelToResponse();
            }

            return(new JsonResult {
                Data = resp, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }