private bool consultarEstudiante() { try { if (!validar("consultarEstudiante")) { return(false); } clsUsuariosOPE objMatri = new clsUsuariosOPE(strNombreAplica, "frmGestHijo"); objMatri.Identificacion = this.txtIdentificacion.Text.Trim(); if (!objMatri.consultarUsuarioOpe()) { mostrarMsj(objMatri.Error); objMatri = null; return(false); } txtUsuario.Text = objMatri.NombreUsuario; txtEmail.Text = objMatri.Email; txtContraseña.Text = objMatri.Contrasena; txtNombres.Text = objMatri.Nombre; txtApellidos.Text = objMatri.Apellido; txtFecNac.Text = Convert.ToDateTime(objMatri.FechaNacimiento).ToString("yyyy-MM-dd"); txtTelefono.Text = objMatri.Telefono; txtIdPadre.Text = objMatri.IdentPadre; mostrarMsj(objMatri.Mensaje); objMatri = null; inhabilitarControles("consultarEstudiante"); return(true); } catch (Exception ex) { mostrarMsj(ex.Message); return(false); } }
private bool consultar() { try { if (!validar("consultar")) { return(false); } clsUsuariosOPE objUsuario = new clsUsuariosOPE(strNombreAplica, "frmGestUsuario"); objUsuario.Identificacion = this.txtIdentificacion.Text.Trim(); if (!objUsuario.consultarUsuarioOpe()) { mostrarMsj(objUsuario.Error); objUsuario = null; return(false); } txtUsuario.Text = objUsuario.NombreUsuario; txtEmail.Text = objUsuario.Email; txtContraseña.Text = objUsuario.Contrasena; txtIdentificacion.Text = objUsuario.Identificacion; txtNombres.Text = objUsuario.Nombre; txtApellidos.Text = objUsuario.Apellido; txtFecNac.Text = objUsuario.FechaNacimiento; txtTelefono.Text = objUsuario.Telefono; mostrarMsj(objUsuario.Mensaje); inhabilitarControles("consultar"); objUsuario = null; return(true); } catch (Exception ex) { throw ex; } }