Exemplo n.º 1
0
        public void GetParentChannel(string channelid)
        {
            ShowShop.BLL.SystemInfo.ArticleChannel bll = new ShowShop.BLL.SystemInfo.ArticleChannel();
            StringBuilder text = new StringBuilder();
            SortedList hashtable = bll.GetChannel(channelid);
            text.AppendLine("<a href='article_edit.aspx?channelid=" + channelid + "'><font color='Blue'>添加资讯</font></a>");
            int index = 0;
            //获取父路径
            foreach (DictionaryEntry de in hashtable)
            {
                if (index == 0)
                {
                    text.AppendLine(" ◎ ");
                }
                else
                {
                    text.AppendLine(" → ");
                }
                text.AppendLine("<a href='?w_z_channel=" + de.Key.ToString() + "'>" + de.Value.ToString() + "</a>");
                index++;
            }
            hashtable.Clear();
            hashtable = null;

            //获取子路径
            hashtable = bll.GetChildChannel(channelid);

            index = 0;
            foreach (DictionaryEntry de in hashtable)
            {
                if (index == 0)
                {
                    text.AppendLine(" ◎ ");
                }
                else
                {
                    text.AppendLine(" ");
                }
                text.Append("<a href='?w_z_channel=" + de.Key.ToString() + "'><font color='#FF9900'>" + de.Value.ToString() + "</font></a>");
                index++;
            }
            hashtable.Clear();
            hashtable = null;
            this.ltlLink.Text += text.ToString();
            bll = null;
        }