コード例 #1
0
        internal static string SELECT(QueryConditions conditions)
        {
            OrderList orders = new OrderList();

            orders.NewOrder("Valor", ListSortDirection.Ascending, typeof(TipoAnimal));
            conditions.Orders = orders;
            return(TipoAnimal.SELECT(conditions, false));
        }
コード例 #2
0
        internal void CopyValues(TipoAnimal source)
        {
            if (source == null)
            {
                return;
            }

            _record.CopyValues(source.Base.Record);
        }
コード例 #3
0
        // called to copy objects data from list
        private void Fetch(IDataReader reader)
        {
            this.RaiseListChangedEvents = false;

            IsReadOnly = false;

            while (reader.Read())
            {
                this.AddItem(TipoAnimal.GetChild(reader).GetInfo());
            }

            IsReadOnly = true;

            this.RaiseListChangedEvents = true;
        }
コード例 #4
0
        /// <summary>
        /// Builds a TipoAnimalList
        /// </summary>
        /// <param name="list"></param>
        /// <returns>TipoAnimalList</returns>
        public static TipoAnimalList GetList(bool childs)
        {
            CriteriaEx criteria = TipoAnimal.GetCriteria(TipoAnimal.OpenSession());

            criteria.Childs = childs;

            if (nHManager.Instance.UseDirectSQL)
            {
                criteria.Query = SELECT();
            }

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

            CloseSession(criteria.SessionCode);
            return(list);
        }