Exemplo n.º 1
0
        /// <summary>
        /// 获取简单行信息列表
        /// </summary>
        /// <param name="q">查询参数</param>
        /// <param name="useIndex">是否使用索引</param>
        /// <returns></returns>
        private List <SimpleRowInfo> GetSimpleRowInfos(QueryArgs q, bool useIndex)
        {
            List <SimpleRowInfo> results = new List <SimpleRowInfo>();
            var rdr = _Connection.ExecuteQuery(q.TableName, q.Condition, useIndex);

            while (rdr.Read())
            {
                SimpleRowInfo testType = new SimpleRowInfo();
                if (!String.IsNullOrEmpty(q.TagName))
                {
                    testType.Tag = (int)rdr[q.TagName];
                }
                if (!String.IsNullOrEmpty(q.IDName))
                {
                    testType.ID = rdr[q.IDName].ToString();
                }
                results.Add(testType);
            }

            return(results);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 获取简单行信息列表
        /// </summary>
        /// <param name="q">查询参数</param>
        /// <param name="useIndex">是否使用索引</param>
        /// <returns></returns>
        private List<SimpleRowInfo> GetSimpleRowInfos(QueryArgs q, bool useIndex)
        {
            List<SimpleRowInfo> results = new List<SimpleRowInfo>();
            var rdr = _Connection.ExecuteQuery(q.TableName, q.Condition, useIndex);
            while (rdr.Read())
            {
                SimpleRowInfo testType = new SimpleRowInfo();
                if (!String.IsNullOrEmpty(q.TagName))
                {
                    testType.Tag = (int)rdr[q.TagName];
                }
                if (!String.IsNullOrEmpty(q.IDName))
                {
                    testType.ID = rdr[q.IDName].ToString();
                }
                results.Add(testType);
            }

            return results;
        }