protected void btn_InvokeNAS_Click(object sender, EventArgs e) { lblNearestAirports.Text = ""; electiveLocationBasedServices.Service1Client elsPxy = new electiveLocationBasedServices.Service1Client(); decimal latitude = Convert.ToDecimal(txtLatitude.Text.ToString()); decimal longitude = Convert.ToDecimal(txtLongitude.Text.ToString()); try { string[][] response = elsPxy.nearestAirport(latitude, longitude); lblNearestAirports.Text += "<table>"; for (int i = 0; i < response.Length; i++) { lblNearestAirports.Text += "<tr>"; for (int j = 0; j < response[i].Length; j++) { lblNearestAirports.Text += " <td style=\"padding-right:15px\">"; lblNearestAirports.Text += response[i][j]; lblNearestAirports.Text += "</td> "; } lblNearestAirports.Text += "</tr>"; } lblNearestAirports.Text += "</table>"; } catch (Exception em) { lblNearestAirports.Text = em.Message.ToString(); } }
protected void btn_InvokeSIS_Click(object sender, EventArgs e) { electiveLocationBasedServices.Service1Client elsPxy = new electiveLocationBasedServices.Service1Client(); decimal latitude = Convert.ToDecimal(txtInputLattitude.Text.ToString()); decimal longitude = Convert.ToDecimal(txtInputLongitude.Text.ToString()); try { string response = Convert.ToString(elsPxy.SolarIntensity(latitude, longitude)); lblSolarIntensity.Text = response; } catch (Exception em) { lblSolarIntensity.Text = em.Message.ToString(); } }
protected void btn_Invokel2z_Click1(object sender, EventArgs e) { lblZipCodes.Text = ""; electiveLocationBasedServices.Service1Client elsPxy = new electiveLocationBasedServices.Service1Client(); string cityName = txtInputCityName.Text.ToString(); string stateCode = txtInputStateCode.Text.ToString(); try { string[] response = elsPxy.location2zip(cityName, stateCode); for (int i = 0; i < response.Length; i++) { lblZipCodes.Text += response[i] + "<br/>"; } } catch (Exception em) { lblZipCodes.Text = em.Message.ToString(); } }