Example #1
0
        private void btnProcura_Click(object sender, System.EventArgs e)
        {
            string max, min;

            meteoWS.meteo ws = new testaMeteo.meteoWS.meteo();
            string ret = ws.temperatura(txtCidade.Text, out max, out min);

            if(ret.CompareTo("ERRO")==0)
            {
                MessageBox.Show("Previsao para a cidade inexistente!!!");
            }
            else
            {
                txtMin.Text = min;
                txtMax.Text = max;
            }
        }
Example #2
0
        private void btnPergunta_Click(object sender, System.EventArgs e)
        {
            string max, min;

            meteoWS.meteo ws = new testaMeteo.meteoWS.meteo();
            string retv = ws.temperatura(txtCidade.Text, out max, out min);

            if(retv.CompareTo("ERRO")==0)
            {
                System.Windows.Forms.MessageBox.Show("A cidade não existe!!!!");
            }
            else
            {
                txtMax.Text = max;
                txtMin.Text = min;
            }
        }