using System;
using System.Collections.Generic;
using System.Web;
using System.Text;
using CB.Common;
using CB.Framework;
namespace CB.Web
{
public partial class list : WebPage
{
protected int lotteryId;
protected string lotteryName, lotLogoCsss = "", ycs = "",hotmes="";
protected void Page_Load(object sender, EventArgs e)
{
InitData();
}
protected override void InitData()
{
lotteryId = WRequest.GetQueryInt("cid");
if (0 >= lotteryId)
{ ShowError(); return; }
var lottery = CB.Data.Caches.GetLotteryInfo(lotteryId);
if (null == lottery)
{ ShowError(); return; }
lotteryName = lottery.Name;
lotLogoCsss = GetLotteryLogoCss(lotteryId);
switch (lotteryId)
{
case 1:
ycs += "
福彩3D预测";
ycs += GetSynArticle(8, 8, 69, 32);//djp2016-06-15修改,预测专向55125
// ycs += GetColumnArticle(8, 69, 0, 32, "/zt/3dyc/{0}.htm");
hotmes += GetHotContent(20);
break;
case 2:
ycs += "排列三预测";
//ycs += GetSynArticle(8, 20, 73, 32);
ycs += GetColumnArticle(8, 73, 0, 32, "/zt/pl3yc/{0}.htm");
hotmes += GetHotContent(22);
break;
case 3:
ycs += "排列五预测";
ycs += GetSynArticle(8, 20, 82, 32);
hotmes += GetHotContent(24);
break;
case 4:
ycs += "双色球预测";
//ycs += GetSynArticle(8, 20, 79, 32);
ycs += GetColumnArticle(8, 79, 0, 32, "/zt/ssqyc/{0}.htm");
hotmes += GetHotContent(21);
break;
case 5:
ycs += "七乐彩预测";
ycs += GetSynArticle(8, 20, 18, 32);
hotmes += GetHotContent(25);
break;
case 12:
ycs += "大乐透预测";
//ycs += GetSynArticle(8, 20, 16, 32);
ycs += GetColumnArticle(8, 16, 0, 32, "/zt/dltyc/{0}.htm");
hotmes += GetHotContent(23);
break;
case 19:
ycs += "七星彩预测";
ycs += GetSynArticle(8, 20, 18, 32);
hotmes += GetHotContent(26);
break;
default:
ycs += "福彩3D预测";
ycs += GetSynArticle(8, 20, 69, 32);
hotmes += GetHotContent(20);
break;
}
base.InitData();
}
public string GetTrendChartString(int lotteryId, string lotteryName, int tid)
{
var list = CB.Data.Caches.GetTrendChartList(lotteryId, tid, 0);
if (null == list || 0 >= list.Count)
return "";
var sp = new StringBuilder(list.Count * 120);
string url = "", name = "", path = "";
var a = CB.Data.Caches.GetTrendTypeInfo(tid);
if (null != a)
{
name = a.Name; path = a.Path;
}
sp.AppendFormat("- {0}{1}
", lotteryName, name);
foreach (var item in list)
{
url = string.Format("{0}{1}_{2}.htm", path, item.Cid, item.Id);
if (2002 == tid)
url = item.Url;
sp.AppendFormat("- {1}
", url, item.Name);
}
sp.Append("
");
return sp.ToString();
}
}
}