You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 rivejä
1.1 KiB

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;
}
}
}