private void btnValidar_Click(object sender, EventArgs e) { try { int parametro = Convert.ToInt32(txtParametro.Text); int parametroDos = 1;/*debito*/ if (!string.IsNullOrEmpty(txtParametro.Text)) { a = gestorAfiliados.GetAfiliado(parametro, parametroDos); if (a != null) { btnContinuar.Enabled = true; lblCheck.ForeColor = Color.Green; } else { btnContinuar.Enabled = false; lblCheck.ForeColor = Color.Red; } } } catch (Exception error) { MetroFramework.MetroMessageBox.Show(this, "Error en la transacción: " + error.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); txtParametro.Focus(); } }
public FormPagoCuota(AfiliadoDTO a) { InitializeComponent(); afiliado = a; gestorAfiliados = new GestorAfiliados(); }