Exemplo n.º 1
0
        protected void btnSomar_Click(object sender, EventArgs e)
        {
            ServiceSomar.ServiceSomarClient objServiceSomar = new ServiceSomar.ServiceSomarClient();
            lblResultado.Text = objServiceSomar.Somar(int.Parse(txtValor1.Text), int.Parse(txtValor2.Text)).ToString();

            objServiceSomar = null;
        }
Exemplo n.º 2
0
        protected async void btnSomarAsync_Click(object sender, EventArgs e)
        {
            ServiceSomar.ServiceSomarClient objServiceSomar = new ServiceSomar.ServiceSomarClient();
            int resultado = await objServiceSomar.SomarAsync(int.Parse(txtValor1.Text), int.Parse(txtValor2.Text));

            lblResultado.Text = resultado.ToString();
            objServiceSomar = null;
        }
Exemplo n.º 3
0
        protected void btnSomarVariacao_Click(object sender, EventArgs e)
        {
            ServiceSomar.ServiceSomarClient objServiceSomar = new ServiceSomar.ServiceSomarClient();
            
            ServiceSomar.Atributos _atributos = 
                new ServiceSomar.Atributos() { IndexVariacao = 15 };
            
            lblResultado.Text = objServiceSomar.SomarAtributo(int.Parse(txtValor1.Text), 
                int.Parse(txtValor2.Text), _atributos).ToString();

            objServiceSomar = null;
        }