Пример #1
0
        /// <summary>
        /// 获取栏目当前位置
        /// </summary>
        /// <param name="CID">栏目ID,多个ID用,号隔开</param>
        public DataTable GetThisPlace(SqlLoading sl)
        {
            string strSql = string.Format("SELECT CID,ClassName,ClassEName FROM {0}Arc_Class", tablePrefix);

            strSql += sl.GetSqlWhereString();

            DataSet ds = dbHelper.ExecuteQuery(CommandType.Text, strSql);

            if (ds != null && ds.Tables.Count > 0)
            {
                return(ds.Tables[0]);
            }
            else
            {
                return(null);
            }
        }
Пример #2
0
        /// <summary>
        /// 根据查询条件获取模块泛型数据列表
        /// </summary>
        /// <param name="where">查询条件</param>
        /// <param name="count">返回记录总数</param>
        /// <returns>模块对象泛型集合</returns>
        public List <Modules> GetList(SqlLoading sl, out int count)
        {
            string strSql = string.Format("SELECT ID,ModuleID,ParentID,ModuleName,EName,ModuleDepth,ModuleURL,Target,Description,CreateTime,IsQuickMenu,IsSystem,IsEnable,OrderID FROM {0}Modules{1} ORDER BY OrderID", tablePrefix, sl.GetSqlWhereString());

            using (SqlDataReader dr = dbHelper.ExecuteReader(CommandType.Text, strSql, null))
            {
                List <Modules> lst = GetList(dr, out count);
                return(lst);
            }
        }