public static string GetWeatherData(string zipcode, DateTime date) { Weather_NearestStore_ServiceRef.OmniWSDLServiceInterfaceClient servClient = new Weather_NearestStore_ServiceRef.OmniWSDLServiceInterfaceClient(); string response = servClient.GetFutureWeatherData(zipcode, date); JavaScriptSerializer serializer = new JavaScriptSerializer(); Entity.WeatherDataResponse weathDatResp = serializer.Deserialize <Entity.WeatherDataResponse>(response); string htmlResp = ConvertWeatherRespToHTML(weathDatResp); return(htmlResp); }
/// <summary> /// this method handles the event of click on Store Search service retrieve button /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public static string GetNearestStoreData(string inputZip, string type) { Weather_NearestStore_ServiceRef.OmniWSDLServiceInterfaceClient nearestStoreRef = new Weather_NearestStore_ServiceRef.OmniWSDLServiceInterfaceClient(); int inputVal; if (inputZip.Equals("") || type.Equals("")) { return("Please provide valid input"); } if (!int.TryParse(inputZip, out inputVal)) { return("Invalid ZipCode"); } string xml = nearestStoreRef.FindNearestStore(inputZip, type); return(xml); }