protected void gridPeriodos_SelectedIndexChanged(object sender, EventArgs e) { GridViewRow row = gridPeriodos.SelectedRow; lblPeriodoId.Text = row.Cells[1].Text; txtNombrePeriodo.Text = row.Cells[2].Text; txtFechaFin.Text = InstitucionesUtil.transformaFecha(row.Cells[3].Text); txtFechaInicio.Text = InstitucionesUtil.transformaFecha(row.Cells[4].Text); edit(); }
private void editarProfesorUsuario(int profesorId) { PROFESOR profesor = new PROFESOR(); profesor = profesor.obtainProfesorById(profesorId); txtNombreProfesor.Text = profesor.NOMBRE; txtApellidoProfesor.Text = profesor.APELLIDO; txtcedulaProfesor.Text = profesor.CEDULA; dlGenero.SelectedValue = profesor.GENERO; txtFechaNacimiento.Text = InstitucionesUtil.transformaFecha(profesor.FECHANACIEMIENTO.ToString()); txtUsuario.Text = profesor.USUARIO.NOMBRE; txtClave.Text = profesor.USUARIO.CLAVE; cbPerfil.SelectedValue = profesor.USUARIO.PERFIL.ToString(); lblUsuarioId.Text = profesor.USUARIO.USUARIOID.ToString(); edit(); }
private void editarAlumnoUsuario(int alumnoId) { ALUMNO alumno = new ALUMNO(); alumno = alumno.obtainAlumnoById(alumnoId); txtNombreAlumno.Text = alumno.NOMBRE; txtApellidoAlumno.Text = alumno.APELLIDO; txtCedulaAlumno.Text = alumno.CEDULA; cbGeneroAlumno.SelectedValue = alumno.GENERO; txtFechaNacimientoAlumno.Text = InstitucionesUtil.transformaFecha(alumno.FECHANACIMIENTO.ToString()); txtNombreTutor.Text = alumno.TUTOR.NOMBRE; txtApellidoTutor.Text = alumno.TUTOR.APELLIDO; txtCedulaTutor.Text = alumno.TUTOR.CEDULA; cbGeneroTutor.SelectedValue = alumno.TUTOR.GENERO; txtFechaNacimientoTutor.Text = InstitucionesUtil.transformaFecha(alumno.TUTOR.FECHANACIMIENTO.ToString()); txtUsuarioTutor.Text = alumno.TUTOR.USUARIO.NOMBRE; txtClaveTutor.Text = alumno.TUTOR.USUARIO.CLAVE; cbPerfil.SelectedValue = alumno.TUTOR.USUARIO.PERFIL.ToString(); if (alumno.MATERIA_ALUMNO.Count > 0) { MATERIA_ALUMNO ma = null; foreach (MATERIA_ALUMNO materiaAlmuno in alumno.MATERIA_ALUMNO) { ma = materiaAlmuno; } CURSO_MATEIRA curso = new CURSO_MATEIRA(); List <CURSO_MATEIRA> cursoMateria = curso.obtainCursosByMateria(Convert.ToInt32(ma.MATERIAID)); if (cursoMateria.Count > 0) { setCursoId(cursoMateria[0].CURSOID.ToString()); } } lblUsuarioId.Text = alumno.TUTOR.USUARIO.USUARIOID.ToString(); lblTutorId.Text = alumno.TUTOR.TUTORID.ToString(); edit(); }