private void btnGuardar_Click(object sender, EventArgs e) { Validaciones.ValidarCampos(ref txtBoxNombre, "string"); Validaciones.ValidarCampos(ref txtBoxApellido, "string"); Validaciones.ValidarCampos(ref txtBoxDni, "int"); Validaciones.ValidarCampos(ref txtBoxNacionalidad, "string"); Validaciones.ValidarCampos(ref txtBoxEmail, "string"); Validaciones.ValidarCampos(ref txtBoxDireccion, "string"); Validaciones.ValidarCampos(ref txtBoxTelefono, "double"); Validaciones.ValidarCampoCombo(ref comboBoxPago, "string"); Validaciones.ValidarCampoCombo(ref comboBoxEstcivil, "string"); Validaciones.ValidarCampoCombo(ref comboBoxSexo, "string"); Validaciones.ValidarCampoCombo(ref comboBoxTipoPlan, "string"); try { SocioPleno socio = new SocioPleno(); socio.InsertarSocioPleno(Convert.ToInt32(txtBoxIdSocio.Text), comboBoxTipoPlan.Text); FormExito.ConfirmarForm("Se ha guardado correctamente"); Close(); } catch (Exception ex) { //MessageBox.Show("PASO ESTO PAI: " + ex); FormNotificacion.VerificarForm("Atención. Uno o más datos son incorrectos"); } }
private void btnCalcularPrecioFinal_Click(object sender, EventArgs e) { Validaciones.ValidarCampos(ref txtBoxPrecioBase, "double"); try { SocioPleno socio = new SocioPleno(lblTipoPago.Text, Convert.ToDouble(txtBoxPrecioBase.Text), lblPlan.Text); this.precioFinal = socio.Calcularpreciofinal(); lblPrecioFinal.Text = Convert.ToString(this.precioFinal); } catch (Exception) { FormNotificacion.VerificarForm("Los datos ingresados son incorrectos"); } }
public void BuscarSocios(string buscar) { SocioPleno socio = new SocioPleno(); tablaSocioPleno.DataSource = socio.BuscarSocio(buscar); }
public void ListarSocioPlenos() { SocioPleno socio = new SocioPleno(); tablaSocioPleno.DataSource = socio.ListarSocioPleno(); }