コード例 #1
0
        protected void resta(object sender, EventArgs e)
        {
            servicio = new ServiceReference1.CalculatorSoapClient();
            int n1 = int.Parse(txtn1.Text);
            int n2 = int.Parse(txtn2.Text);

            lblresultado.Text = servicio.Subtract(n1, n2).ToString();
        }
コード例 #2
0
        protected void suma(object sender, EventArgs e)
        {
            servicio = new ServiceReference1.CalculatorSoapClient();
            int n1 = int.Parse(txtn1.Text);
            int n2 = int.Parse(txtn2.Text);

            //int n1 = Convert.ToInt32(txtn1.Text);
            //int n2 = Convert.ToInt32(txtn2.Text);
            lblresultado.Text = servicio.Add(n1, n2).ToString();
        }