|
|
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Data;
- using Basic;
- using System.Collections;
- /// <summary>
- /// 网站配置
- /// </summary>
-
- namespace Basic.BLL
- {
- public class news_class
- {
- /// <summary>
- /// 获取父级列表
- /// </summary>
- /// <param name="_classid"></param>
- /// <returns></returns>
- public static Hashtable GetParentList(int _classid)
- {
- Hashtable htList = new Hashtable();
- int _parentId = _classid;
- int i = 0;
- while (_parentId > 0)
- {
- Basic.DAL.news_class dalp = new Basic.DAL.news_class();
-
- Basic.Model.news_class modelparent = dalp.GetModel(_parentId);
- i++;
- htList.Add("title"+i, modelparent.title);
- htList.Add("url"+i, modelparent.url);
- if (modelparent != null)
- {
- _parentId = modelparent.parent_id;
- }
- }
- return htList;
- }
-
- }
- }
|