using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Text; using CB.Common; using CB.Entity; using CB.Framework; namespace CB.Web.Kjh.kaijihao { public partial class p3list : WebPage { protected int topSize; protected DateTime date = DateTime.Now; protected StringBuilder sp = new StringBuilder(); protected void Page_Load(object sender, EventArgs e) { InitData(); } protected override void InitData() { topSize = WRequest.GetQueryInt("topsize"); List n = new List(new int[] { 20, 50, 80, 100 }); if (!n.Contains(topSize)) topSize = 20; var info = CB.Data.Caches.GetTCP3Info(0, OpenCodeType.KaiJiangHao); if (null != info) { date = info.OpenTime; } var list = CB.Data.Caches.GetTCP3List(topSize, OpenCodeType.KaiJiHao); if (null != list && 0 < list.Count) { int i = 1; IList d; foreach (var item in list) { d = item.KaiJiHao.ToIntArray(','); if (null == d) break; if ( 0 == i % 2) { sp.AppendLine(" "); } else { sp.AppendLine(" "); } sp.AppendLine(" " + item.Term.ToString() + ""); sp.AppendLine(" " + item.OpenTime.ToString("yyyy.MM.dd") + ""); sp.AppendLine(" " + item.KaiJiHao.Replace(",", ",") + ""); sp.AppendLine(" " + CB.Common.LotteryUtils.GetProportionOfJO(d) + ""); sp.AppendLine(" " + CB.Common.LotteryUtils.GetProportionOfDX(d, 5) + ""); sp.AppendLine(" " + CB.Common.LotteryUtils.GetSpan(d).ToString() + ""); if (item.OpenCode.Contains(-1)) { sp.AppendLine(" ---"); sp.AppendLine(" ---"); sp.AppendLine(" ---"); sp.AppendLine(" ---"); } else { sp.AppendLine(" " + item.OpenCode1 + "," + item.OpenCode2 + "," + item.OpenCode3 + ""); sp.AppendLine(" " + CB.Common.LotteryUtils.GetProportionOfJO(item.OpenCode, 3) + ""); sp.AppendLine(" " + CB.Common.LotteryUtils.GetProportionOfDX(item.OpenCode, 5, 3) + ""); sp.AppendLine(" " + CB.Common.LotteryUtils.GetSpan(item.OpenCode, 3).ToString() + ""); } sp.AppendLine(" "); i++; } } base.InitData(); } } }