index.aspx.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Web;
  4. using System.Text;
  5. using CB.Framework;
  6. namespace CB.Web
  7. {
  8. public partial class index : WebPage
  9. {
  10. protected void Page_Load(object sender, EventArgs e)
  11. {
  12. }
  13. public string GetTrendChartString(int lotteryId, int tid)
  14. {
  15. var list = CB.Data.Caches.GetTrendChartList(lotteryId, tid, 0);
  16. if (null == list || 0 >= list.Count)
  17. return "";
  18. var sp = new StringBuilder(list.Count * 120);
  19. string url = "";
  20. foreach (var item in list)
  21. {
  22. if (!item.Name.Contains("手机版"))
  23. {
  24. url = string.Format("{0}{1}_{2}.htm", CB.Data.Caches.GetTrendPath(tid), item.Cid, item.Id);
  25. if (2002 == tid)
  26. url = item.Url;
  27. sp.AppendFormat("<li><a href=\"{0}\" target=\"_blank\">{1}</a></li>", url, item.Name);
  28. }
  29. }
  30. return sp.ToString();
  31. }
  32. }
  33. }