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; }
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; }
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; }