Example #1
0
 protected void ButRegistrar_Click(object sender, EventArgs e)
 {
     try
     {
     cSGPRINGRESONegocios Negocios = new cSGPRINGRESONegocios(Global.gCOD_APLICACION, "CA", 1, "naquiros");
     string[] stringFecha = TextBoxFecha.Text.Split('/');
     DateTime fecha = new DateTime(Int32.Parse(stringFecha[2]), Int32.Parse(stringFecha[0]), Int32.Parse(stringFecha[1]));
     Negocios.FEC_INGRESO = fecha;
     Negocios.FEC_SISTEMA = DateTime.Now.Date;
     Negocios.CAR_USUARIOGIMNASIO = TextBoxId.Text;
     Negocios.Insertar();
     Response.Write("<SCRIPT>alert('Se ha registrado correctamente dentro del sistema.')</SCRIPT>");
     LabelNombre.Text = "Se ha registrado correctamente dentro del sistema";
     LabelNombre.ForeColor = System.Drawing.Color.Blue;
     LabelNombre.Visible = true;
     }
      catch (Exception ex)
      {
          Response.Write("<SCRIPT>alert(''" + ex.Message + ")</SCRIPT>");
      }
 }