예제 #1
0
 public void SetSourceData(Examen item)
 {
     _entity      = item;
     _alumnos     = AlumnoList.GetListByExamen(true, _entity.Oid); //.GetAlumnosAdmitidosList(_entity.OidModulo, _entity.Desarrollo, _entity.Oid, true);
     _promociones = PromocionList.GetList(false);                  //.GetByModuloList(_entity.OidModulo, false);
     this.Text    = Resources.Labels.NOTAS_ALUMNOS;
     RefreshSecondaryData();
     RefreshMainData();
 }
예제 #2
0
        /// <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 = Properties.Settings.Default.SUBMODULO_ICON;

            if (_alumnos == null)
            {
                _alumnos = AlumnoList.GetListByExamen(true, _entity.Oid);                  //(_entity.OidModulo, _entity.Desarrollo, _entity.Oid, true);
            }
            foreach (AlumnoInfo alumno in _alumnos)
            {
                bool pertenece = false;

                foreach (Alumno_PromocionInfo item in alumno.Promociones)
                {
                    if (item.OidPromocion == promocion.Oid)
                    {
                        pertenece = true;
                        break;
                    }
                }

                if (pertenece)
                {
                    //nodo_p.Tag = alumno;

                    foreach (Alumno_Examen item in _entity.Alumnos)
                    {
                        if (item.OidAlumno == alumno.Oid)
                        {
                            string texto = "[" + alumno.NExpediente + "] " + alumno.Apellidos + ", " + alumno.Nombre;
                            if (!item.Presentado)
                            {
                                texto += " - NP";
                            }
                            else
                            {
                                if (!_entity.Desarrollo)
                                {
                                    texto += " - " + item.Calificacion.ToString() + "%";
                                }
                                else
                                {
                                    foreach (Respuesta_Alumno_Examen resp in item.Respuestas)
                                    {
                                        texto += " - " + resp.Calificacion.ToString() + "%";
                                    }
                                }
                            }
                            TreeNode nodo_p = new TreeNode(texto);
                            nodo_p.NodeFont  = new Font("Tahoma", (float)8.25, FontStyle.Regular);
                            nodo_p.ForeColor = System.Drawing.Color.Black;
                            nodo_p.Tag       = item;
                            nodo_p.Checked   = true;
                            nodo.Nodes.Add(nodo_p);
                            //break;
                        }
                    }
                }
            }

            if (nodo.Nodes.Count > 0)
            {
                if (padre == null)
                {
                    Arbol_TV.Nodes.Add(nodo);
                }
                else
                {
                    padre.Nodes.Add(nodo);
                }
            }
        }