Hi Experts,
I am using a web service API to retrieve holiday information, please consider the following pseudo code:
Sub ButtonOnClick_ApiGetCountryList
countryList = webService.GetCountryList
End Sub
Sub ButtonOnClick_ApiGetHotelList
hotelList = webService.GetHotelList(Country)
End Sub
Sub ButtonOnClick_ApiGetAirportList
airportlList = webService.GetAirportlList(Country)
End Sub
Sub ButtonOnClick_ApiGetBeachlList
BeachList = webService.GetBeachlList(Country)
End Sub
Once the user has clicked the get country button and the web service has delivered a list of countries I need a country from that list to be available to the other three subs. How do I do this without using a global variable or is it OK to use a global variable?
Is it a asp.net/winform project?
Are these lists used elsewhere in your app, appart from the form/page you are displaying?
I will put countryList as global variable, but the others as cached form variables (say 5-10 minutes).