Esempio n. 1
0
 protected void Boton_Click(object sender, EventArgs e)
 {
     try
     {
         string Nombre;
         wsSeguridad.SeguridadSoapClient wsseg = new wsSeguridad.SeguridadSoapClient();
         wsseg.ComprobarEstudiante(out Nombre, TextBoxCarne.Text);
         if (Nombre == "")
         {
             throw new Exception("Identificación no registrada");
         }
         else
         {
             cSGPRUSUARIOGIMNASIONegocios Asistente = new cSGPRUSUARIOGIMNASIONegocios(Global.gCOD_APLICACION, "CA", 1, "naquiros");
             Asistente.CAR_USUARIOGIMNASIO = TextBoxCarne.Text;
             Asistente.NOM_USUARIOGIMNASIO = Nombre;
             Asistente.APE_USUARIOGIMNASIO = "";
             Asistente.Insertar();
         }
     }
     catch (Exception ex)
     {
         Response.Write("<SCRIPT>alert('" + ex.Message + "')</SCRIPT>");
     }
 }