コード例 #1
0
 protected void windIntensity_Click(object sender, EventArgs e)
 {
     output.Text = "";
     try
     {
         electiveLocationBasedServices.Service1Client elPxy = new electiveLocationBasedServices.Service1Client();
         decimal lat = Convert.ToDecimal(Session["lat"].ToString());
         decimal lng = Convert.ToDecimal(Session["lng"].ToString());
         decimal op  = elPxy.WindIntensity(lat, lng);
         output.Text = "The wind intensity is " + op.ToString();
     }
     catch (Exception em)
     {
         output.Text = em.Message;
     }
 }
コード例 #2
0
    protected void btn_InvokeWIS_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.WindIntensity(latitude, longitude));
            lblWindIntensity.Text = response;
        }
        catch (Exception em)
        {
            lblWindIntensity.Text = em.Message.ToString();
        }
    }