private void BuscarSocioEvent(object sender, EventArgs e) { var unTextBox = (TextBoxValidar)sender; BaseUI formBase = (BaseUI)unTextBox.FindForm(); var adminSocio = new ControladorSocio(); var unSocio = adminSocio.GetSocioByDni(int.Parse(this.txtDocumento.Text.Trim())); if (!(unSocio is null)) { formBase.txtDocumento.Text = unSocio.DNI.ToString(); formBase.txtNombre.Text = unSocio.Nombre; formBase.txtApellido.Text = unSocio.Apellido; formBase.txtDomicilio.Text = unSocio.Domicilio; formBase.txtTelefono.Text = unSocio.Telefono.ToString(); formBase.txtCorreo.Text = unSocio.Mail; formBase.dateFechaNacimiento.Value = unSocio.FecNacimiento; if (unSocio.Activo == false) { this.SocioInactivoOption(formBase, adminSocio, unSocio.DNI); } else { this.ModificarSocioOption(formBase); } }