Exemple #1
0
        private static CountryType GetCountry(SRC.CountryType countryType)
        {
            if (countryType == null)
            {
                return(null);
            }
            CountryType cty = new CountryType(CountryCodeType.AT);

            if (countryType.Text != null)
            {
                cty.CountryCode = countryType.CountryCode.ToString();
                cty.Value       = CountryCodes.GetFromCode(cty.CountryCode.ToString()).Country;
            }
            return(cty);
        }
Exemple #2
0
        private static CountryType GetCountry(SRC.CountryType countryType)
        {
            if (countryType == null)
            {
                return(null);
            }
            CountryType cty = new CountryType(CountryCodeType.AT);

            if (!string.IsNullOrEmpty(countryType.Value))
            {
                cty.CountryCode = countryType.CountryCode.ToEnum(CountryCodeType.AT).ToString(); //.ConvertEnum<V4P3.CountryCodeType>();
                //cty.CountryCodeSpecified = true; // This is always true!
                //cty.Text = countryType.Text.ToArray();
                if (!string.IsNullOrEmpty(countryType.Value))
                {
                    cty.Value = countryType.Value;
                }
                else
                {
                    cty.Value = CountryCodes.GetFromCode(cty.CountryCode.ToString()).Country;
                }
            }
            return(cty);
        }