コード例 #1
0
ファイル: category.cs プロジェクト: yi724926089/MyWx
 /// <summary>
 /// 递归找到父节点
 /// </summary>
 private void LoopChannelMenu(StringBuilder strTxt, string urlKey, int category_id)
 {
     BLL.article_category bll = new BLL.article_category();
     int parentId = bll.GetParentId(category_id);
     if (parentId > 0)
     {
         this.LoopChannelMenu(strTxt, urlKey, parentId);
     }
     strTxt.Append("&nbsp;&gt;&nbsp;<a href=\"" + linkurl(urlKey, category_id, 1) + "\">" + bll.GetTitle(category_id) + "</a>");
 }
コード例 #2
0
ファイル: category.cs プロジェクト: wangjinfang/DTCMS
 /// <summary>
 /// 获取最初始的类别id
 /// </summary>
 /// <param name="category_id"></param>
 /// <returns></returns>
 protected int ret_fist_category( int category_id )
 {
     BLL.article_category bll = new BLL.article_category();
     int parentId = bll.GetParentId( category_id );
     if( parentId > 0 )
     {
       category_id=  this.ret_fist_category( parentId );
     }
        return category_id;
 }
コード例 #3
0
        /// <summary>
        /// 递归找到父节点
        /// </summary>
        private void LoopChannelMenu(StringBuilder strTxt, string urlKey, int category_id)
        {
            BLL.article_category bll = new BLL.article_category();
            int parentId             = bll.GetParentId(category_id);

            if (parentId > 0)
            {
                this.LoopChannelMenu(strTxt, urlKey, parentId);
            }
            strTxt.Append("&nbsp;&gt;&nbsp;<a href=\"" + linkurl(urlKey, category_id, 1) + "\">" + bll.GetTitle(category_id) + "</a>");
        }
コード例 #4
0
ファイル: category.cs プロジェクト: wangjinfang/DTCMS
        /// <summary>
        /// 获取最初始的类别id
        /// </summary>
        /// <param name="category_id"></param>
        /// <returns></returns>
        protected int ret_fist_category(int category_id)
        {
            BLL.article_category bll = new BLL.article_category();
            int parentId             = bll.GetParentId(category_id);

            if (parentId > 0)
            {
                category_id = this.ret_fist_category(parentId);
            }
            return(category_id);
        }
コード例 #5
0
        /// <summary>
        /// 递归找到父节点
        /// </summary>
        private void LoopChannelMenu(StringBuilder strTxt, string urlKey, int category_id)
        {
            BLL.article_category bll = new BLL.article_category();
            int parentId             = bll.GetParentId(category_id);

            if (parentId > 0)
            {
                this.LoopChannelMenu(strTxt, urlKey, parentId);
            }
            HttpCookie cookie = HttpContext.Current.Request.Cookies["lang"];
            string     lang   = cookie != null ? cookie.Value : "pl-PL";

            if ("pl-PL".Equals(lang))
            {
                strTxt.Append("&nbsp;&gt;&nbsp;<a href=\"" + linkurl(urlKey, category_id, 1) + "\">" + bll.GetSeoTitle(category_id) + "</a>");
            }
            else
            {
                strTxt.Append("&nbsp;&gt;&nbsp;<a href=\"" + linkurl(urlKey, category_id, 1) + "\">" + bll.GetTitle(category_id) + "</a>");
            }
        }
コード例 #6
0
ファイル: category.cs プロジェクト: cash2one/youxingtravel
 /// <summary>
 /// 返回父id
 /// </summary>
 /// <param name="category_id"></param>
 /// <returns></returns>
 protected int get_category_parent_id(string category_id)
 {
     BLL.article_category bll = new BLL.article_category();
     return(bll.GetParentId(Convert.ToInt32(category_id)));
 }
コード例 #7
0
ファイル: category.cs プロジェクト: cash2one/youxingtravel
 /// <summary>
 /// 返回父id
 /// </summary>
 /// <param name="category_id"></param>
 /// <returns></returns>
 protected int get_category_parent_id(int category_id)
 {
     BLL.article_category bll = new BLL.article_category();
     return(bll.GetParentId(category_id));
 }