Exemplo n.º 1
0
        public static string CountryListTooltip(string commaSeparatedCountries)
        {
            string result = string.Empty;

            if (commaSeparatedCountries.IsNotEmptyOrWhiteSpace())
            {
                GeoIpCountries countries = new GeoIpCountries();

                List <string> countryList = commaSeparatedCountries.Split(',').ToList();
                foreach (string country in countryList)
                {
                    result += "<span title=\"" + countries.GetCountryByCode(country).CountryName + "\" data-toggle=\"tooltip\">" + country + "</span> ";
                }
            }
            return(result);
        }
Exemplo n.º 2
0
        public static string CountryListTitle(string commaSeparatedCountries)
        {
            string result = string.Empty;

            if (commaSeparatedCountries.IsNotEmptyOrWhiteSpace())
            {
                GeoIpCountries countries = new GeoIpCountries();

                List <string> countryList = commaSeparatedCountries.Split(',').ToList();
                foreach (string country in countryList)
                {
                    result += countries.GetCountryByCode(country).CountryName + ", ";
                }
                result = result.Remove(result.Length - 2);
            }
            return(result);
        }