/// <summary> /// Función recursiva que va creando el árbol de submódulos y preguntas /// </summary> /// <param name="padre"></param> /// <param name="apartado"></param> private void SetAlumnosValues(TreeNode padre, PromocionInfo promocion) { TreeNode nodo = new TreeNode(promocion.Numero + " - " + promocion.Nombre); nodo.NodeFont = new Font("Tahoma", (float)8.25, FontStyle.Regular); nodo.ForeColor = System.Drawing.Color.Black; nodo.Tag = promocion; nodo.SelectedImageKey = "submodulo"; if (_alumnos == null) { _alumnos = AlumnoList.GetAlumnosAdmitidosList(_entity.OidModulo, _entity.Desarrollo, _entity.Oid, ExamenPromocionList.GetChildList(_entity.Promociones), _entity.FechaExamen, true); } foreach (AlumnoInfo alumno in _alumnos) { bool pertenece = false; if (alumno.Promociones == null) { alumno.LoadChilds(typeof(Alumno_Promocion), false); } foreach (Alumno_PromocionInfo item in alumno.Promociones) { if (item.OidPromocion == promocion.Oid) { pertenece = true; break; } } if (pertenece) { TreeNode nodo_p = new TreeNode("[" + alumno.NExpediente + "] " + alumno.Apellidos + ", " + alumno.Nombre); nodo_p.NodeFont = new Font("Tahoma", (float)8.25, FontStyle.Regular); nodo_p.ForeColor = System.Drawing.Color.Black; nodo_p.Tag = alumno; foreach (Alumno_Examen item in _entity.Alumnos) { if (item.OidAlumno == alumno.Oid) { nodo_p.Checked = true; break; } } nodo.Nodes.Add(nodo_p); } } if (nodo.Nodes.Count > 0) { if (padre == null) { Arbol_TV.Nodes.Add(nodo); } else { padre.Nodes.Add(nodo); } } }
public void SetSourceData(Examen item) { _entity = item; _alumnos = AlumnoList.GetAlumnosAdmitidosList(item.OidModulo, _entity.Desarrollo, _entity.Oid, ExamenPromocionList.GetChildList(_entity.Promociones), _entity.FechaExamen, false); _promociones = PromocionList.GetList(false);//.GetByModuloList(item.OidModulo, false); this.Text = Resources.Labels.SELECT_ALUMNOS; RefreshSecondaryData(); RefreshMainData(); }