Beispiel #1
0
        public string GetUserByUserInRoleGuid(string odsCode, Guid userInRoleGuid)
        {
            OpenHRUser user = DataStore
                              .Users
                              .FirstOrDefault(t => t.Organisation.nationalPracticeCode == odsCode &&
                                              userInRoleGuid.Equals(new Guid(t.UserInRole.id)));

            string result = string.Empty;

            if (user != null)
            {
                EomUserDetails37.UserDetails userDetails = EomUsersTransform.ToEomUserDetails(user);

                result = Utilities.Serialize <EomUserDetails37.UserDetails>(userDetails);
            }

            return(result);
        }
Beispiel #2
0
        public string GetUserByID(string odsCode, int userInRoleId)
        {
            OpenHRUser user = DataStore
                              .Users
                              .FirstOrDefault(t => t.Organisation.nationalPracticeCode == odsCode &&
                                              t.OpenHRUserId == userInRoleId);

            string result = string.Empty;

            if (user != null)
            {
                EomUserDetails37.UserDetails userDetails = EomUsersTransform.ToEomUserDetails(user);

                result = Utilities.Serialize <EomUserDetails37.UserDetails>(userDetails);
            }

            return(result);
        }