예제 #1
0
        //  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);
        }
예제 #2
0
        /// <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);
        }
예제 #3
0
        // 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;
        }
예제 #4
0
        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();
        }
예제 #5
0
        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();
        }
예제 #6
0
 public void CopyFrom(Tema source)
 {
     _base.CopyValues(source);
 }
예제 #7
0
 public static string SELECT()
 {
     return(Tema.SELECT(new QueryConditions(), false));
 }