protected void FindUVIndexButton_Click(object sender, EventArgs e) { GraduateProjectServices.Service1Client servicesClient = new GraduateProjectServices.Service1Client(); String zipCode = uv_zipcodeTextBox1.Text; try { String uv_Output = servicesClient.get_UV_Index(zipCode); if(uv_Output=="") { uv_Output = "Invalid zipcode. Please try againg"; } UV_IndexOutput.Text = uv_Output; } catch(Exception ex) { } }
protected void GetWindButton_Click(object sender, EventArgs e) { GraduateProjectServices.Service1Client serviceClient=new GraduateProjectServices.Service1Client(); String zipcode = wind_zipcodeTextBox1.Text; String countrycode = countrycodeTextbox.Text; String[] wind = serviceClient.WindIntensity(zipcode,countrycode); if (wind[0] == "Invalid input. Please try again") { windOutput.Text = "Invalid input. Please try againn"; } else { Table2.Visible = true; windOutput.Text = ""; location.Text = wind[0]; latitude.Text = wind[1]; longitude.Text=wind[2]; windspeed.Text = wind[3]; winddirection.Text=wind[4]; } }