/// <summary> /// Devuelve una lista de todos los elementos /// </summary> /// <returns>Lista de elementos</returns> private static ExpedienteList GetList(string query, bool childs) { if (!Expedient.CanGetObject()) { throw new System.Security.SecurityException(moleQule.Resources.Messages.USER_NOT_ALLOWED); } CriteriaEx criteria = Expedient.GetCriteria(Expedient.OpenSession()); criteria.Childs = childs; criteria.Query = query; ExpedienteList list = DataPortal.Fetch <ExpedienteList>(criteria); CloseSession(criteria.SessionCode); return(list); }