private void XtraFormCountry_Load(object sender, EventArgs e) { if (GlobalVariables.Cities.IsNull()) { CitySolClient client = Extensions.Extensions.GetCityServiceSol(); GlobalVariables.Cities = client.IsNull() ? null : new List <City>(client.Cities(true)); } cityBindingSource.DataSource = GlobalVariables.Cities; }
public static void GetCities() { if (GlobalVariables.Cities.IsNotNull()) { return; } CitySolClient citySolClient = Extensions.Extensions.GetCityServiceSol(); GlobalVariables.Cities = citySolClient.IsNull() ? null : new List <City>(citySolClient.Cities(true)); }