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 ssqlist : 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.GetFCSSQInfo(0, OpenCodeType.KaiJiangHao); if (null != info) { date = info.OpenTime; } var list = CB.Data.Caches.GetFCSSQList(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.Append(" "); sp.AppendFormat("{0},{1},{2},{3},{4},{5} | {6}", d[0].ToString("00"), d[1].ToString("00"), d[2].ToString("00"), d[3].ToString("00"), d[4].ToString("00"), d[5].ToString("00"), d[6].ToString("00")); sp.AppendLine(""); sp.AppendLine(" " + CB.Common.LotteryUtils.GetProportionOfJO(d) + ""); sp.AppendLine(" " + CB.Common.LotteryUtils.GetProportionOfDX(d, 17) + ""); sp.AppendLine(" " + CB.Common.LotteryUtils.GetSpan(d).ToString() + ""); sp.AppendLine(" "); i++; } } base.InitData(); } } }