// private TemaList() { } /// <summary> /// Retrieve the complete list from db /// </summary> /// <returns>TemaList</returns> public static TemaList GetList(bool childs) { CriteriaEx criteria = Tema.GetCriteria(TemaList.OpenSession()); criteria.Childs = childs; criteria.Query = SELECT(); //No criteria. Retrieve all de List TemaList list = DataPortal.Fetch <TemaList>(criteria); CloseSession(criteria.SessionCode); return(list); }
/// <summary> /// Retrieve the complete list from db /// </summary> /// <returns>SubmoduloList</returns> public static TemaList GetModuloList(long oid_modulo, bool childs) { CriteriaEx criteria = Tema.GetCriteria(TemaList.OpenSession()); criteria.Childs = childs; criteria.Query = Temas.SELECT_BY_MODULO(oid_modulo); //No criteria. Retrieve all de List TemaList list = DataPortal.Fetch <TemaList>(criteria); CloseSession(criteria.SessionCode); return(list); }
// called to copy objects data from list private void Fetch(IDataReader reader) { this.RaiseListChangedEvents = false; IsReadOnly = false; while (reader.Read()) { this.AddItem(Tema.GetChild(reader).GetInfo()); } IsReadOnly = true; this.RaiseListChangedEvents = true; }
private void Fetch(Submodulo source) { try { SessionCode = source.SessionCode; _base.CopyValues(source); CriteriaEx criteria; criteria = Tema.GetCriteria(Session()); criteria.AddEq("OidSubmodulo", this.Oid); _temas = Temas.GetChildList(criteria.List <Tema>()); } catch (Exception ex) { iQExceptionHandler.TreatException(ex); } MarkOld(); }
private void Fetch(int session_code, IDataReader source) { try { _base.CopyValues(source); if (Childs) { string query; Tema.DoLOCK(Session(session_code)); query = Temas.SELECT_BY_SUBMODULO(this.Oid); IDataReader reader = nHManager.Instance.SQLNativeSelect(query, Session(session_code)); _temas = Temas.GetChildList(reader, GChilds); } } catch (Exception ex) { iQExceptionHandler.TreatException(ex); } MarkOld(); }
public void CopyFrom(Tema source) { _base.CopyValues(source); }
public static string SELECT() { return(Tema.SELECT(new QueryConditions(), false)); }