Пример #1
0
        //returns the list of countries
        public static List <Country> GetCountries()
        {
            List <Country> netto = countries.Values.ToList();

            //netto.AddRange(TemporaryCountries.GetCountries());
            netto.Remove(GetCountry("100"));

            List <Country> tCountries = new List <Country>();

            foreach (Country country in netto)
            {
                if (!(country is TerritoryCountry))
                {
                    tCountries.Add((Country) new CountryCurrentCountryConverter().Convert(country));
                }
            }

            foreach (Country country in TemporaryCountries.GetCountries())
            {
                if (((TemporaryCountry)country).Type == TemporaryCountry.TemporaryType.ManyToOne)
                {
                    tCountries.Add((Country) new CountryCurrentCountryConverter().Convert(country));
                }
            }

            return(tCountries.Distinct().ToList());
        }
Пример #2
0
        //returns the list of countries
        public static List <Country> GetAllCountries()
        {
            List <Country> tCountries = countries.Values.ToList();

            tCountries.AddRange(TemporaryCountries.GetCountries());
            return(tCountries);
        }
Пример #3
0
 //retuns a country
 public static Country GetCountry(string uid)
 {
     if (countries.ContainsKey(uid))
     {
         return(countries[uid]);
     }
     else
     if (TemporaryCountries.GetCountry(uid) != null)
     {
         return(TemporaryCountries.GetCountry(uid));
     }
     else
     {
         return(null);
     }
 }