Пример #1
0
        protected void btnSumar_Click(object sender, EventArgs e)
        {
            // crear un objeto de la clase Proxy del servicio
            Curso.Servicios objServicio = new Curso.Servicios();
            int             intN1       = Convert.ToInt32(txtNumero1.Text);
            int             intN2       = Convert.ToInt32(txtNumero2.Text);

            lblResta.Text = objServicio.Restar(intN1, intN2).ToString();
        }
Пример #2
0
 protected void btnSumar_Click(object sender, EventArgs e)
 {
     if (User.Identity.Name == "*****@*****.**")
     {
         // crear un objeto de la clase Proxy del servicio
         Curso.Servicios objServicio = new Curso.Servicios();
         int             intN1       = Convert.ToInt32(txtNumero1.Text);
         int             intN2       = Convert.ToInt32(txtNumero2.Text);
         lblSuma.Text = objServicio.Sumar(intN1, intN2).ToString();
     }
     else
     {
         MsgBox("No tiene permisos ejecutar esa accion!!!");
     }
 }