Header.ascx.cs 991 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. using System;
  2. using System.Collections.Generic;
  3. using CB.Entity;
  4. namespace CB.Web.Kjh
  5. {
  6. public partial class Header : System.Web.UI.UserControl
  7. {
  8. protected string gg;
  9. protected void Page_Load(object sender, EventArgs e)
  10. {
  11. DataInit();
  12. }
  13. private void DataInit()
  14. {
  15. IList<TopicInfo> list = CB.Data.Caches.GetHelpList(200,1);
  16. if (list!=null &&list.Count>0)
  17. {
  18. gg += "<span>公告:</span><a href=\"http://www.55128.cn/notice/article-" + list[0].Tid + ".htm\">" + list[0].Title + "</a>";
  19. }
  20. else
  21. {
  22. gg += "";
  23. }
  24. }
  25. /// <summary>
  26. /// 页面热点推荐内容
  27. /// </summary>
  28. /// <param name="id"></param>
  29. /// <returns></returns>
  30. public string GetHotContent(int id)
  31. {
  32. return CB.Data.Caches.GetRecommendContent(id);
  33. }
  34. }
  35. }