Ejemplo n.º 1
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>");
 }
Ejemplo n.º 2
0
 /// <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;
 }
Ejemplo n.º 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>");
        }
Ejemplo n.º 4
0
        /// <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);
        }
Ejemplo n.º 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>");
            }
        }
Ejemplo n.º 6
0
 /// <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)));
 }
Ejemplo n.º 7
0
 /// <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));
 }