/// <summary>
        /// Devuelve una lista de todos los elementos
        /// </summary>
        /// <returns>Lista de elementos</returns>
        public static ExamenList GetModuloList(long oid_modulo)
        {
            CriteriaEx criteria = Examen.GetCriteria(Examen.OpenSession());

            criteria.AddEq("OidModulo", oid_modulo);
            ExamenList list = ExamenList.RetrieveList(typeof(Examen), AppContext.ActiveSchema.Code, criteria);

            CloseSession(criteria.SessionCode);
            return(list);
        }
 /// <summary>
 /// Retrieve the complete list from db
 /// </summary>
 /// <returns>RespuestaList</returns>
 public void FormatCodigoList()
 {
     foreach (ExamenInfo item in this)
     {
         if (item.Numero == 0)
         {
             string     query    = UPDATE_CODIGO(item.Oid);
             CriteriaEx criteria = Examen.GetCriteria(Examen.OpenSession());
             nHManager.Instance.SQLNativeExecute(query, Session());
             CloseSession(criteria.SessionCode);
         }
     }
 }
        /// <summary>
        /// Retrieve the complete list from db
        /// </summary>
        /// <returns>ExamenList</returns>
        public static ExamenList GetComboAlumno_ExamenList(long oid_promocion)
        {
            CriteriaEx criteria = Examen.GetCriteria(Examen.OpenSession());

            //No criteria. Retrieve all de List
            if (nHManager.Instance.UseDirectSQL)
            {
                criteria.Query = Examens.SELECT_EXAMENES_PENDIENTES(oid_promocion);
            }
            ExamenList list = DataPortal.Fetch <ExamenList>(criteria);

            CloseSession(criteria.SessionCode);

            return(list);
        }
        /// <summary>
        /// Retrieve the complete list from db
        /// </summary>
        /// <returns>ExamenList</returns>
        private static ExamenList GetFechaList(DateTime fecha_examen)
        {
            CriteriaEx criteria = Examen.GetCriteria(Examen.OpenSession());

            //No criteria. Retrieve all de List
            if (nHManager.Instance.UseDirectSQL)
            {
                criteria.Query = Examens.SELECT_BY_FECHA(fecha_examen);
            }
            criteria.Childs = true;
            ExamenList list = DataPortal.Fetch <ExamenList>(criteria);

            CloseSession(criteria.SessionCode);

            return(list);
        }
        //  private ExamenList() { }

        /// <summary>
        /// Retrieve the complete list from db
        /// </summary>
        /// <returns>ExamenList</returns>
        public static ExamenList GetList(bool childs)
        {
            CriteriaEx criteria = Examen.GetCriteria(Examen.OpenSession());

            criteria.Childs = childs;

            //No criteria. Retrieve all de List
            if (nHManager.Instance.UseDirectSQL)
            {
                criteria.Query = ExamenList.SELECT();
            }

            ExamenList list = DataPortal.Fetch <ExamenList>(criteria);

            CloseSession(criteria.SessionCode);

            return(list);
        }