示例#1
0
 public Grove.EntityData GetObjectSource(ObjectQuery query)
 {
     m_db.OP = new ObjectOperator(m_connString);
     m_db.OP.DbOperator.ClearParameters();
     Grove.EntityData ret = m_db.OP.GetObjectSource(query);
     m_db.OP.Dispose();
     return(ret);
 }
示例#2
0
        /// <summary>
        /// EntityData result = oo.GetObjectSource ( new ObjectQuery ( typeof ( Customer ) , "" ) );
        ///
        /// </summary>
        public Grove.EntityData GetObjectSource(string filter, string subsetFilter)
        {
            m_db.OP = new ObjectOperator(m_connString);
            m_db.OP.DbOperator.ClearParameters();
            ObjectQuery query = new ObjectQuery(GetType(), filter);

            query.DeclareSubset(GetType(), subsetFilter);
            Grove.EntityData ret = m_db.OP.GetObjectSource(query);
            m_db.OP.Dispose();
            return(ret);
        }
示例#3
0
        /// <summary>
        ///   ArrayList customers = oo.GetObjectSet ( new ObjectQuery ( typeof ( Customer ) , "" ) );
        /// </summary>
        public ArrayList GetObjectSet(string filter, string subsetFilter)
        {
            m_db.OP = new ObjectOperator(m_connString);
            m_db.OP.DbOperator.ClearParameters();
            // ObjectQuery query = new ObjectQuery(GetType(), filter);
            // query.DeclareSubset(GetType(),subsetFilter);
            Grove.EntityData temp = GetObjectSource(filter, subsetFilter);
            ArrayList        ret  = Grove.Util.EntityUtil.ToObjects(temp, GetType());

            m_db.OP.Dispose();
            return(ret);
            // return m_db.OP.GetObjectSet(query);
        }
示例#4
0
        public List <T> GetObjectList(string filter)
        {
            m_db.OP = new ObjectOperator(m_connString);
            List <T> ret = new List <T>();

            m_db.OP.DbOperator.ClearParameters();
            ObjectQuery query = new ObjectQuery(GetType(), filter);

            Grove.EntityData temp  = GetObjectSource(filter);
            ArrayList        array = Grove.Util.EntityUtil.ToObjects(temp, GetType());

            if (array != null)
            {
                foreach (T t in array)
                {
                    t.ConnString = m_connString;
                    ret.Add(t);
                }
            }
            m_db.OP.Dispose();
            return(ret);
        }