public Dictionary <long, string> GetNameValues(string fieldName, string package = null)
        {
            GetValuesForNamedIDRequest namedIdRequest = new GetValuesForNamedIDRequest(getClientInfoHeader(), null, fieldName);
            Dictionary <long, string>  namedIds       = new Dictionary <long, string>();

            GetValuesForNamedIDResponse resp = getChannel().GetValuesForNamedID(namedIdRequest);

            foreach (NamedID namedId in resp.Entry)
            {
                if (namedId.ID.idSpecified)
                {
                    namedIds[namedId.ID.id] = namedId.Name;
                }
            }
            return(namedIds);
        }
Пример #2
0
        public NamedID GetNameIDUsingFieldName(string fieldName, string status)
        {
            GetValuesForNamedIDRequest request = new GetValuesForNamedIDRequest();

            request.FieldName        = fieldName;
            request.ClientInfoHeader = ClientHeader;
            GetValuesForNamedIDResponse valuesForNamedID = GetChannel().GetValuesForNamedID(request);

            foreach (NamedID profile in valuesForNamedID.Entry)
            {
                if (profile.Name == status)
                {
                    return(profile);
                }
            }
            return(null);
        }