private void InitCountryInfo() { DestinationCountryInfo = iteleportDistrictCountryServices.GetTeleportCountryInfo(destinationtPointCityDistrictModel.CountryLink); DestinationtPointCountryName = "Country : " + DestinationCountryInfo.Name; DestinationtPointCountryPopulation = "Population : " + DestinationCountryInfo.Population; SearchedSalary = ""; ObservableSalaries = new ObservableCollection <TeleportCountrySalary>(DestinationCountryInfo.TeleportCountrySalaries); observableSalariesToStore = new ObservableCollection <TeleportCountrySalary>(ObservableSalaries); }
public TeleportCountryInfo GetTeleportCountryInfo(string countryLink) { TeleportCountryInfo teleportCountryInfo = new TeleportCountryInfo(); try { JObject jObjectCountry = GetJObject(countryLink); teleportCountryInfo.Name = jObjectCountry["name"].Value <string>(); teleportCountryInfo.CurrencyCode = jObjectCountry["currency_code"].Value <string>(); teleportCountryInfo.Iso_alpha2 = jObjectCountry["iso_alpha2"].Value <string>(); teleportCountryInfo.Iso_alpha3 = jObjectCountry["iso_alpha3"].Value <string>(); teleportCountryInfo.Population = jObjectCountry["population"].Value <int>(); teleportCountryInfo.TeleportCountrySalaries = GetTeleportCountrySalaries(((jObjectCountry["_links"])["country:salaries"])["href"].Value <string>()); } catch (Exception e) { return(null); } return(teleportCountryInfo); }