public static Country GetCountry_name(string name) { CountryMaster.Init_from_DB(); if (name == null) { return(null); } if (CountryMaster.name_dic.ContainsKey(name)) { return(CountryMaster.name_dic[name]); } else if (CountryMaster.short_dic.ContainsKey(name)) { return(CountryMaster.short_dic[name]); } else if (CountryMaster.otherShort.ContainsKey(name)) { string shrName = CountryMaster.otherShort[name]; if (CountryMaster.short_dic.ContainsKey(shrName)) { return(CountryMaster.short_dic[shrName]); } } return(null); }
public static List <Country> GetAll_countryList() { CountryMaster.Init_from_DB(); List <Country> list = new List <Country>(CountryMaster.name_dic.Values); list.Sort((a, b) => (string.Compare(a.name, b.name))); return(list); }
public static Country GetCountry_short(string shortName) { CountryMaster.Init_from_DB(); if (shortName == null) { return(null); } if (CountryMaster.short_dic.ContainsKey(shortName)) { return(CountryMaster.short_dic[shortName]); } else { return(null); } }