/// <summary> /// 返回当前类别名称 /// </summary> /// <param name="category_id">类别ID</param> /// <returns>String</returns> protected string get_category_title(int category_id, string default_value) { Hoto.BLL.category bll = new Hoto.BLL.category(); if (bll.Exists(category_id)) { return bll.GetTitle(category_id); } return default_value; }
/// <summary> /// 返回当前类别名称 /// </summary> /// <param name="category_id">类别ID</param> /// <returns>String</returns> protected string get_category_title(int category_id, string default_value) { Hoto.BLL.category bll = new Hoto.BLL.category(); if (bll.Exists(category_id)) { return(bll.GetTitle(category_id)); } return(default_value); }
/// <summary> /// 递归找到父节点 /// </summary> private void LoopChannelMenu(StringBuilder strTxt, string urlKey, int category_id) { Hoto.BLL.category bll = new Hoto.BLL.category(); int parentId = bll.GetParentId(category_id); if (parentId > 0) { this.LoopChannelMenu(strTxt, urlKey, parentId); } strTxt.Append(" > <a href=\"" + linkurl(urlKey, category_id, 1) + "\">" + bll.GetTitle(category_id) + "</a>"); }