Example #1
0
        /// <summary>
        /// 获取模块顶级栏目
        /// </summary>
        /// <param name="count">返回记录总数</param>
        /// <returns>模块对象泛型集合</returns>
        public List <Modules> GetTopnav(out int count)
        {
            SqlLoading sl = new SqlLoading();

            sl.AddSqlWhere("ParentID", "'M0'");
            sl.AddSqlWhere("IsEnable", 1, JoinSign.And);

            return(dal.GetList(sl, out count));
        }
Example #2
0
        /// <summary>
        /// 获取模块子栏目
        /// </summary>
        /// <param name="count">返回记录总数</param>
        /// <returns>模块对象泛型集合</returns>
        public List <Modules> GetSubnav(out int count)
        {
            SqlLoading sl = new SqlLoading();

            sl.AddSqlWhere("ModuleDepth", 1, OperateSign.GreatThan);
            sl.AddSqlWhere("IsEnable", 1, JoinSign.And);

            return(dal.GetList(sl, out count));
        }
Example #3
0
        /// <summary>
        /// 根据父ID获取模块子栏目
        /// </summary>
        /// <param name="parentID">父模块ID</param>
        /// <param name="moduleDepth">模块深度</param>
        /// <param name="count">返回记录总数</param>
        /// <returns>模块对象泛型集合</returns>
        public List <Modules> GetSubnavByParentID(string parentID, int moduleDepth, out int count)
        {
            SqlLoading sl = new SqlLoading();

            sl.AddSqlWhere("ModuleDepth", moduleDepth);
            sl.AddSqlWhere("IsEnable", 1, JoinSign.And);
            sl.AddSqlWhere("parentID", string.Format("'{0}'", parentID), JoinSign.And);

            return(dal.GetList(sl, out count));
        }
Example #4
0
        /// <summary>
        /// 获取栏目当前位置
        /// </summary>
        /// <param name="CID">栏目ID,多个ID用,号隔开</param>
        public DataTable GetThisPlace(string CID)
        {
            SqlLoading sl = new SqlLoading();

            sl.AddSqlWhere("CID", CID, OperateSign.In);
            return(dal.GetThisPlace(sl));
        }