Esempio n. 1
0
        internal static string SELECT(QueryConditions conditions)
        {
            OrderList orders = new OrderList();

            orders.NewOrder("Valor", ListSortDirection.Ascending, typeof(RazaAnimal));
            conditions.Orders = orders;
            return(RazaAnimal.SELECT(conditions, false));
        }
        internal void CopyValues(RazaAnimal source)
        {
            if (source == null)
            {
                return;
            }

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

            IsReadOnly = false;

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

            IsReadOnly = true;

            this.RaiseListChangedEvents = true;
        }
Esempio n. 4
0
        /// <summary>
        /// Builds a RazaAnimalList
        /// </summary>
        /// <param name="list"></param>
        /// <returns>RazaAnimalList</returns>
        public static RazaAnimalList GetList(bool childs)
        {
            CriteriaEx criteria = RazaAnimal.GetCriteria(RazaAnimal.OpenSession());

            criteria.Childs = childs;

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

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

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