Beispiel #1
0
        public PersistentObject PreviousObject()
        {
            PersistentObject aObject = null;

            try
            {
                aObject = broker.GetEntityObject(m_TypeOfClass, m_ClassName, m_Results.Tables[0].Rows[m_Index]);
                aObject.IsPersistent = true;
            }
            catch (IndexOutOfRangeException)
            {
                Assert.Fail(Error.NoObjectForTable);
            }
            this.m_Index--;
            return(aObject);
        }
Beispiel #2
0
        /// <summary>
        ///		返回下一个对象对象
        /// </summary>
        /// <returns>EntityObject</returns>
        public EntityObject NextObject()
        {
            EntityObject aObject = null;

            try
            {
                aObject = broker.GetEntityObject(typeOfClass, className, results.Tables[0].Rows[pointer]);
                //broker.RetrieveObject(aObject,this.m_IsIncludeAssociation);//以后再做修改
            }
            catch (IndexOutOfRangeException)
            {
                throw new PlException("已经没有实体对象可以枚举了!");
            }

            this.pointer++;
            return(aObject);
        }