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.

42 lines
1.1 KiB

пре 3 година
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Data;
  6. using Basic;
  7. using System.Collections;
  8. /// <summary>
  9. /// 网站配置
  10. /// </summary>
  11. namespace Basic.BLL
  12. {
  13. public class news_class
  14. {
  15. /// <summary>
  16. /// 获取父级列表
  17. /// </summary>
  18. /// <param name="_classid"></param>
  19. /// <returns></returns>
  20. public static Hashtable GetParentList(int _classid)
  21. {
  22. Hashtable htList = new Hashtable();
  23. int _parentId = _classid;
  24. int i = 0;
  25. while (_parentId > 0)
  26. {
  27. Basic.DAL.news_class dalp = new Basic.DAL.news_class();
  28. Basic.Model.news_class modelparent = dalp.GetModel(_parentId);
  29. i++;
  30. htList.Add("title"+i, modelparent.title);
  31. htList.Add("url"+i, modelparent.url);
  32. if (modelparent != null)
  33. {
  34. _parentId = modelparent.parent_id;
  35. }
  36. }
  37. return htList;
  38. }
  39. }
  40. }