using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using CB.Common; using CB.Framework; using System.Text.RegularExpressions; namespace CB.Wap.tb { public partial class list : WebPage { //走势图表 protected string hTitle = "", hDescription = "", hKeywords = ""; protected string chartData = "", chartName = "", recommend = ""; //彩种相关 protected string lotName = "", lotLogoCsss = ""; protected string ShowtrendMenu = "", HidetrendMenu=""; protected string navStr = ""; protected void Page_Load(object sender, EventArgs e) { InitData(); header1.ColumnName = lotName; } protected override void InitData() { int chartid = WRequest.GetQueryInt("chartid"); if (0 >= chartid) { ShowError(); return; } var entity = CB.Data.Caches.GetTrendChartInfo(chartid); if (null == entity) { ShowError(); return; } chartName = entity.Name; hTitle = entity.hTitle; hDescription = entity.hDescription; hKeywords = entity.hKeywords; //this.header1.ColumnName = chartName; var lottery = CB.Data.Caches.GetLotteryInfo(entity.Cid); if (null != lottery) { lotName = lottery.Name; lotLogoCsss = GetLotteryLogoCss(entity.Cid); navStr = string.Format("{2} - {3}", lottery.Id, chartid, lotName, chartName); } var list = CB.Data.Caches.GetTrendChartList(entity.Cid, 2004, 0); if (list.Count > 0) { for (int i = 0; i < list.Count; i++) { //modified by zizi at 2016-5-25 var _name = LotteryNameReplace(list[i].Name, lottery.Name);//Regex.Replace(list[i].Name, "^" + lottery.Name, "", RegexOptions.IgnoreCase); ShowtrendMenu += "
  • " + _name + "
  • "; if (list[i].Id == chartid) lotName = lottery.Name + _name; //if (i < 3) //{ // ShowtrendMenu += "
  • " + Regex.Replace(list[i].Name, "^" + lottery.Name, "", RegexOptions.IgnoreCase) + "
  • "; //} //else //{ // HidetrendMenu += "
  • " + Regex.Replace(list[i].Name, "^" + lottery.Name, "", RegexOptions.IgnoreCase) + "
  • "; //} } } else { ShowtrendMenu = ""; } UpdateTrendSmart(entity.Id); chartData = BuildTemplateData(entity.TemplateId, null); var viewbag = new Dictionary(); viewbag.Add("lotTitle", "热门推荐"); recommend = SmartRecommend(chartid, entity, lottery.Name, "电脑版遗漏", viewbag); base.InitData(); } } }