private static void CallGetZoneForCompany(string baseUrl) { Console.WriteLine("Calling CallGetZoneForCompany web service " + baseUrl); var staticService = new StaticDataservice { Url = baseUrl + "IStaticData" }; try { var company = staticService.GetProviders("taxi", "test"); foreach (var co in company) { var zone = staticService.GetCompanyZoneByGPS("taxi", "test", co.ProviderNum, 45.42159, -75.6477); Console.WriteLine(zone); } } catch (Exception ex) { Console.WriteLine(ex.Message); } }
private static void CallGetCompanyZoneByGPS(string baseUrl) { Console.WriteLine("Calling CallGetCompanyZoneByGPS web service " + baseUrl); var staticService = new StaticDataservice { Url = baseUrl + "IStaticData" }; try { var company = staticService.GetProviders("taxi", "test").FirstOrDefault(p => p.isDefault); var zone = staticService.GetCompanyZoneByGPS("taxi", "test", company.ProviderNum, 45.3417, -75.9233); if (string.IsNullOrEmpty(zone)) { Console.WriteLine("Call made sucesfully but no zone found"); } else { Console.WriteLine("Zone found " + zone); } } catch (Exception ex) { Console.WriteLine(ex.Message); } }