Beispiel #1
0
        /// <summary>
        /// 获取列表
        /// </summary>
        /// <param name="categoryId">类别主键</param>
        /// <returns>数据表</returns>
        public virtual IDataReader GetDataReaderByCategory(string categoryCode)
        {
            List <KeyValuePair <string, object> > parameters = new List <KeyValuePair <string, object> >();

            parameters.Add(new KeyValuePair <string, object>(BaseBusinessLogic.FieldCategoryCode, categoryCode));
            return(DbLogic.GetDataReader(DbHelper, this.CurrentTableName, parameters));
        }
Beispiel #2
0
        /// <summary>
        /// 按父亲节点获取数据
        /// </summary>
        /// <param name="parentId">父节点主键</param>
        /// <returns>数据表</returns>
        public virtual IDataReader GetDataReaderByParent(string parentId)
        {
            List <KeyValuePair <string, object> > parameters = new List <KeyValuePair <string, object> >();

            parameters.Add(new KeyValuePair <string, object>(BaseBusinessLogic.FieldParentId, parentId));
            return(DbLogic.GetDataReader(DbHelper, this.CurrentTableName, parameters, 0, BaseBusinessLogic.FieldSortCode));
        }
Beispiel #3
0
        public virtual IDataReader GetDataReader(KeyValuePair <string, object> parameter, int topLimit = 0, string order = null)
        {
            List <KeyValuePair <string, object> > parameters = new List <KeyValuePair <string, object> >();

            parameters.Add(parameter);
            return(DbLogic.GetDataReader(DbHelper, this.CurrentTableName, parameters, topLimit, order));
        }
Beispiel #4
0
        public virtual IDataReader GetDataReader(KeyValuePair <string, object> parameter1, KeyValuePair <string, object> parameter2, string order)
        {
            List <KeyValuePair <string, object> > parameters = new List <KeyValuePair <string, object> >();

            parameters.Add(parameter1);
            parameters.Add(parameter2);
            return(DbLogic.GetDataReader(DbHelper, this.CurrentTableName, parameters, 0, order));
        }
Beispiel #5
0
        public virtual List <T> GetList <T>(KeyValuePair <string, object> parameter, int topLimit, string order) where T : new()
        {
            List <KeyValuePair <string, object> > parameters = new List <KeyValuePair <string, object> >();

            parameters.Add(parameter);
            IDataReader dr = DbLogic.GetDataReader(DbHelper, this.CurrentTableName, parameters, topLimit, order);

            return(GetList <T>(dr));
        }
Beispiel #6
0
        /// <summary>
        /// 获取列表
        /// </summary>
        /// <param name="categoryId">类别主键</param>
        /// <returns>数据表</returns>
        public virtual List <T> GetListByCategory <T>(string categoryId) where T : new()
        {
            List <KeyValuePair <string, object> > parameters = new List <KeyValuePair <string, object> >();

            parameters.Add(new KeyValuePair <string, object>(BaseBusinessLogic.FieldCategoryId, categoryId));
            IDataReader dr = DbLogic.GetDataReader(DbHelper, this.CurrentTableName, parameters);

            return(GetList <T>(dr));
        }
Beispiel #7
0
        public virtual IDataReader GetDataReader(params KeyValuePair <string, object>[] parameters)
        {
            List <KeyValuePair <string, object> > parametersList = new List <KeyValuePair <string, object> >();

            for (int i = 0; i < parameters.Length; i++)
            {
                parametersList.Add(parameters[i]);
            }
            return(DbLogic.GetDataReader(DbHelper, this.CurrentTableName, parametersList));
        }
Beispiel #8
0
        public virtual List <T> GetList <T>(params KeyValuePair <string, object>[] parameters) where T : new()
        {
            List <KeyValuePair <string, object> > parametersList = new List <KeyValuePair <string, object> >();

            for (int i = 0; i < parameters.Length; i++)
            {
                parametersList.Add(parameters[i]);
            }
            IDataReader dr = DbLogic.GetDataReader(DbHelper, this.CurrentTableName, parametersList);

            return(GetList <T>(dr));
        }
Beispiel #9
0
        public virtual List <T> GetList <T>(List <KeyValuePair <string, object> > parameters, string order) where T : new()
        {
            IDataReader dr = DbLogic.GetDataReader(DbHelper, this.CurrentTableName, parameters, 0, order);

            return(GetList <T>(dr));
        }
Beispiel #10
0
        public virtual List <T> GetList <T>(string name, Object[] values, string order = null) where T : new()
        {
            IDataReader dr = DbLogic.GetDataReader(DbHelper, this.CurrentTableName, name, values, order);

            return(GetList <T>(dr));
        }
Beispiel #11
0
        public virtual List <T> GetList <T>(string[] ids) where T : new()
        {
            IDataReader dr = DbLogic.GetDataReader(DbHelper, this.CurrentTableName, BaseBusinessLogic.FieldId, ids);

            return(GetList <T>(dr));
        }
Beispiel #12
0
        public virtual List <T> GetList <T>(int topLimit = 0, string order = null) where T : new()
        {
            IDataReader dr = DbLogic.GetDataReader(DbHelper, this.CurrentTableName, null, topLimit, order);

            return(GetList <T>(dr));
        }
Beispiel #13
0
 public virtual IDataReader GetDataReader(string[] ids)
 {
     return(DbLogic.GetDataReader(DbHelper, this.CurrentTableName, BaseBusinessLogic.FieldId, ids));
 }
Beispiel #14
0
 //
 // 读取多条记录
 //
 public virtual IDataReader GetDataReader(int topLimit = 0, string order = null)
 {
     return(DbLogic.GetDataReader(DbHelper, this.CurrentTableName, null, topLimit, order));
 }
Beispiel #15
0
 public virtual IDataReader GetDataReader(List <KeyValuePair <string, object> > parameters, string order)
 {
     return(DbLogic.GetDataReader(DbHelper, this.CurrentTableName, parameters, 0, order));
 }
Beispiel #16
0
 public virtual IDataReader GetDataReader(string name, Object[] values, string order = null)
 {
     return(DbLogic.GetDataReader(DbHelper, this.CurrentTableName, name, values, order));
 }