private void btnCalcularPrecioFinal_Click(object sender, EventArgs e) { Validaciones.ValidarCampos(ref txtBoxPrecioBase, "double"); try { SocioDeportivo socio = new SocioDeportivo(lblTipoPago.Text, Convert.ToDouble(txtBoxPrecioBase.Text), lblInscripcion.Text); this.precioFinal = socio.Calcularpreciofinal(); lblPrecioFinal.Text = Convert.ToString(this.precioFinal); } catch (Exception) { FormNotificacion.VerificarForm("Los datos ingresados son incorrectos"); } }
private void btnGuardar_Click(object sender, EventArgs e) { try { SocioDeportivo socio = new SocioDeportivo(); socio.InsertarSocioDeportivo(Convert.ToInt32(txtBoxIdSocio.Text), comboBoxInscripcion.Text); FormExito.ConfirmarForm("Se ha guardado correctamente"); Close(); lista(); } catch (Exception) { FormNotificacion.VerificarForm("Atención. Uno o más datos son incorrectos"); } }
public void ListarSociosDeportivos() { SocioDeportivo socio = new SocioDeportivo(); tablaSocioDeportivo.DataSource = socio.ListarSocioDeportivo(); }
public void BuscarSocios(string buscar) { SocioDeportivo socio = new SocioDeportivo(); tablaSocioDeportivo.DataSource = socio.BuscarSocio(buscar); }