Esempio n. 1
0
 private void btnAceptar_Click(object sender, EventArgs e)
 {
     Interface = new InterfaceUsuario(this);
     //Cambiar Validar campos por validacio por separado
     if (!Validaciones.ValidarCampos())
     {
         tbTarjeta.TextMaskFormat = MaskFormat.ExcludePromptAndLiterals;
         if (!Interface.ValidarDatosTarjeta(User))
         {
             if (!SacandoRegistro)
             {
                 RegistroTarjeta Tarjeta = ObtenerRegistro;
                 if (Interface.AgregarTarjeta(Tarjeta))
                 {
                     MessageBox.Show("Tarjeta registrada con éxito", "AVISO", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                 }
                 else
                 {
                     MessageBox.Show("Hubo algun problema, intente más tarde", "AVISO", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
                 }
             }
         }
         this.Close();
     }
 }