123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using CB.Entity;
- using CB.Data;
- namespace CB.Admin
- {
- public partial class ProcessResultData : System.Web.UI.Page
- {
- private int _term = 0;
- private int[] _openCode = { -1, -1, -1 };
- protected void Page_Load(object sender, EventArgs e)
- {
- if (!IsPostBack)
- {
- GetOpenCode();
- }
- }
- /// <summary>
- /// 页面打开初始化开奖号
- /// </summary>
- private void GetOpenCode()
- {
- FC3DInfo info = Caches.GetFC3DInfo(0, OpenCodeType.KaiJiangHao);
- if (info == null)
- {
- Tqi.Text = "0";
- Tn1.Text = "-1";
- Tn2.Text = "-1";
- Tn3.Text = "-1";
- return;
- }
- Tqi.Text = info.Term.ToString();
- Tn1.Text = info.OpenCode1.ToString();
- Tn2.Text = info.OpenCode2.ToString();
- Tn3.Text = info.OpenCode3.ToString();
- }
- /// <summary>
- /// 获取基本参数
- /// </summary>
- private void GetValue()
- {
- int.TryParse(Tqi.Text, out _term);
- int.TryParse(Tn1.Text, out _openCode[0]);
- int.TryParse(Tn2.Text, out _openCode[1]);
- int.TryParse(Tn3.Text, out _openCode[2]);
- }
- /// <summary>
- /// 重新获取开奖号
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected void Button1_Click(object sender, EventArgs e)
- {
- int qi = 0;
- int.TryParse(Tqi.Text, out qi);
- if (qi > 0)
- {
- FC3DInfo info = Caches.GetFC3DInfo(qi, OpenCodeType.KaiJiangHao);
- if (info != null)
- {
- Tqi.Text = info.Term.ToString();
- Tn1.Text = info.OpenCode1.ToString();
- Tn2.Text = info.OpenCode2.ToString();
- Tn3.Text = info.OpenCode3.ToString();
- Lrecord.Text = OldDataCenterService.GetProcessResultCount(qi).ToString();
- return;
- }
- }
- Tqi.Text = "0";
- Tn1.Text = "-1";
- Tn2.Text = "-1";
- Tn3.Text = "-1";
- }
- protected void Button2_Click(object sender, EventArgs e)
- {
- GetValue();
- if (_term > 0 && _openCode[0] >= 0)
- {
- try
- {
- List<ShortResult> prList = OldDataCenterService.ProcessResultData(_term, _openCode);
- OldDataCenterService.UpBatchDataResult(prList);
- Label1.Text = "处理分类结果数据---成功!";
- }
- catch (Exception ex)
- {
- Label1.Text = "处理分类结果数据--" + ex.ToString();
- }
- Lrecord.Text = OldDataCenterService.GetProcessResultCount(_term).ToString();
- }
- else
- { Label1.Text = "期数或开奖号数据出错!"; }
- }
- protected void Button3_Click(object sender, EventArgs e)
- {
- GetValue();
- if (_term > 0 && _openCode[0] >= 0)
- {
- try
- {
- OldDataCenterService.UpBatchDataReports(_term, _openCode);
- OldDataCenterService.UpBatchDataEffect(_term, _openCode);
- Label1.Text = "处理统计报表数据--成功!";
- }
- catch (Exception ex)
- {
- Label1.Text = "处理统计报表数据--" + ex.ToString(); ;
- }
- }
- else
- { Label1.Text = "期数或开奖号数据出错!"; }
- }
- protected void Button4_Click(object sender, EventArgs e)
- {
- GetValue();
- if (_term > 0)
- {
- try
- {
- OldDataCenterService.ProcessReportDeviation(_term);
- OldDataCenterService.ProcessEffectDeviation(_term);
- Label1.Text = "更新号码偏差数据--成功!";
- }
- catch (Exception ex)
- {
- Label1.Text = "更新号码偏差数据--" + ex.ToString();
- }
- }
- else
- { Label1.Text = "期数不正确!"; }
- }
- protected void Button5_Click(object sender, EventArgs e)
- {
- GetValue();
- if (_term > 0)
- {
- try
- {
- OldDataCenterService.UpConfigQi(_term);
- Label1.Text = "更新当前期数信息--成功!";
- }
- catch (Exception ex)
- {
- Label1.Text = "更新当前期数信息--" + ex.ToString();
- }
- }
- else
- { Label1.Text = "期数不正确!"; }
- }
- protected void Button6_Click(object sender, EventArgs e)
- {
- GetValue();
- if (_term > 0)
- {
- OldDataCenterService.PushHistoryResultData(_term, _openCode);
- Label1.Text = "更新历史记录数据--成功!";
- }
- else
- { Label1.Text = "期数不正确!"; }
- }
- protected void Button7_Click(object sender, EventArgs e)
- {
- GetValue();
- if (_term > 0)
- {
- OldDataCenterService.ResetDataResult(_term);
- Lrecord.Text = OldDataCenterService.GetProcessResultCount(_term).ToString();
- Label1.Text = "重置当期分表结果数据--成功!";
- }
- else
- { Label1.Text = "期数不正确!"; }
- }
- protected void btn_ClearCache_Click(object sender, EventArgs e)
- {
- Label1.Text = Common.Utils.GetPagehtml("http://123.55128.cn/cleardstcache.aspx?auto=3a2s1d4f5g6h7j8k9l");
- }
- }
- }
|