예제 #1
0
        private static CountryType GetCountry(Model.CountryType countryType)
        {
            if (countryType == null)
            {
                return(null);
            }
            CountryType cty = new CountryType();

            if (string.IsNullOrEmpty(countryType.Value))
            {
                cty.CountryCode = Model.CountryCodeType.AT.ToString();
                cty.Value       = "Österreich";
            }
            else
            {
                cty.CountryCode = countryType.CountryCode.ToString(); //.ConvertEnum<CountryCodeType>();
                cty.Value       = Model.CountryCodes.GetFromCode(cty.CountryCode).Country;
            }
            return(cty);
        }
예제 #2
0
        private static CountryType GetCountry(Model.CountryType countryType)
        {
            if (countryType == null)
            {
                return(null);
            }
            CountryType cty = new CountryType();

            if (string.IsNullOrEmpty(countryType.Value))
            {
                cty.CountryCode          = TARGET.CountryCodeType.AT;
                cty.Text                 = new string[] { "Österreich" };
                cty.CountryCodeSpecified = true;
            }
            else
            {
                cty.CountryCode          = countryType.CountryCode.ToEnum(TARGET.CountryCodeType.AT); //.ConvertEnum<CountryCodeType>();
                cty.Text                 = new string[1];
                cty.Text[0]              = Model.CountryCodes.GetFromCode(cty.CountryCode.ToString()).Country;
                cty.CountryCodeSpecified = true;
            }
            return(cty);
        }