ProcessResultData.aspx.cs 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.UI;
  6. using System.Web.UI.WebControls;
  7. using CB.Entity;
  8. using CB.Data;
  9. namespace CB.Admin
  10. {
  11. public partial class ProcessResultData : System.Web.UI.Page
  12. {
  13. private int _term = 0;
  14. private int[] _openCode = { -1, -1, -1 };
  15. protected void Page_Load(object sender, EventArgs e)
  16. {
  17. if (!IsPostBack)
  18. {
  19. GetOpenCode();
  20. }
  21. }
  22. /// <summary>
  23. /// 页面打开初始化开奖号
  24. /// </summary>
  25. private void GetOpenCode()
  26. {
  27. FC3DInfo info = Caches.GetFC3DInfo(0, OpenCodeType.KaiJiangHao);
  28. if (info == null)
  29. {
  30. Tqi.Text = "0";
  31. Tn1.Text = "-1";
  32. Tn2.Text = "-1";
  33. Tn3.Text = "-1";
  34. return;
  35. }
  36. Tqi.Text = info.Term.ToString();
  37. Tn1.Text = info.OpenCode1.ToString();
  38. Tn2.Text = info.OpenCode2.ToString();
  39. Tn3.Text = info.OpenCode3.ToString();
  40. }
  41. /// <summary>
  42. /// 获取基本参数
  43. /// </summary>
  44. private void GetValue()
  45. {
  46. int.TryParse(Tqi.Text, out _term);
  47. int.TryParse(Tn1.Text, out _openCode[0]);
  48. int.TryParse(Tn2.Text, out _openCode[1]);
  49. int.TryParse(Tn3.Text, out _openCode[2]);
  50. }
  51. /// <summary>
  52. /// 重新获取开奖号
  53. /// </summary>
  54. /// <param name="sender"></param>
  55. /// <param name="e"></param>
  56. protected void Button1_Click(object sender, EventArgs e)
  57. {
  58. int qi = 0;
  59. int.TryParse(Tqi.Text, out qi);
  60. if (qi > 0)
  61. {
  62. FC3DInfo info = Caches.GetFC3DInfo(qi, OpenCodeType.KaiJiangHao);
  63. if (info != null)
  64. {
  65. Tqi.Text = info.Term.ToString();
  66. Tn1.Text = info.OpenCode1.ToString();
  67. Tn2.Text = info.OpenCode2.ToString();
  68. Tn3.Text = info.OpenCode3.ToString();
  69. Lrecord.Text = OldDataCenterService.GetProcessResultCount(qi).ToString();
  70. return;
  71. }
  72. }
  73. Tqi.Text = "0";
  74. Tn1.Text = "-1";
  75. Tn2.Text = "-1";
  76. Tn3.Text = "-1";
  77. }
  78. protected void Button2_Click(object sender, EventArgs e)
  79. {
  80. GetValue();
  81. if (_term > 0 && _openCode[0] >= 0)
  82. {
  83. try
  84. {
  85. List<ShortResult> prList = OldDataCenterService.ProcessResultData(_term, _openCode);
  86. OldDataCenterService.UpBatchDataResult(prList);
  87. Label1.Text = "处理分类结果数据---成功!";
  88. }
  89. catch (Exception ex)
  90. {
  91. Label1.Text = "处理分类结果数据--" + ex.ToString();
  92. }
  93. Lrecord.Text = OldDataCenterService.GetProcessResultCount(_term).ToString();
  94. }
  95. else
  96. { Label1.Text = "期数或开奖号数据出错!"; }
  97. }
  98. protected void Button3_Click(object sender, EventArgs e)
  99. {
  100. GetValue();
  101. if (_term > 0 && _openCode[0] >= 0)
  102. {
  103. try
  104. {
  105. OldDataCenterService.UpBatchDataReports(_term, _openCode);
  106. OldDataCenterService.UpBatchDataEffect(_term, _openCode);
  107. Label1.Text = "处理统计报表数据--成功!";
  108. }
  109. catch (Exception ex)
  110. {
  111. Label1.Text = "处理统计报表数据--" + ex.ToString(); ;
  112. }
  113. }
  114. else
  115. { Label1.Text = "期数或开奖号数据出错!"; }
  116. }
  117. protected void Button4_Click(object sender, EventArgs e)
  118. {
  119. GetValue();
  120. if (_term > 0)
  121. {
  122. try
  123. {
  124. OldDataCenterService.ProcessReportDeviation(_term);
  125. OldDataCenterService.ProcessEffectDeviation(_term);
  126. Label1.Text = "更新号码偏差数据--成功!";
  127. }
  128. catch (Exception ex)
  129. {
  130. Label1.Text = "更新号码偏差数据--" + ex.ToString();
  131. }
  132. }
  133. else
  134. { Label1.Text = "期数不正确!"; }
  135. }
  136. protected void Button5_Click(object sender, EventArgs e)
  137. {
  138. GetValue();
  139. if (_term > 0)
  140. {
  141. try
  142. {
  143. OldDataCenterService.UpConfigQi(_term);
  144. Label1.Text = "更新当前期数信息--成功!";
  145. }
  146. catch (Exception ex)
  147. {
  148. Label1.Text = "更新当前期数信息--" + ex.ToString();
  149. }
  150. }
  151. else
  152. { Label1.Text = "期数不正确!"; }
  153. }
  154. protected void Button6_Click(object sender, EventArgs e)
  155. {
  156. GetValue();
  157. if (_term > 0)
  158. {
  159. OldDataCenterService.PushHistoryResultData(_term, _openCode);
  160. Label1.Text = "更新历史记录数据--成功!";
  161. }
  162. else
  163. { Label1.Text = "期数不正确!"; }
  164. }
  165. protected void Button7_Click(object sender, EventArgs e)
  166. {
  167. GetValue();
  168. if (_term > 0)
  169. {
  170. OldDataCenterService.ResetDataResult(_term);
  171. Lrecord.Text = OldDataCenterService.GetProcessResultCount(_term).ToString();
  172. Label1.Text = "重置当期分表结果数据--成功!";
  173. }
  174. else
  175. { Label1.Text = "期数不正确!"; }
  176. }
  177. protected void btn_ClearCache_Click(object sender, EventArgs e)
  178. {
  179. Label1.Text = Common.Utils.GetPagehtml("http://123.55128.cn/cleardstcache.aspx?auto=3a2s1d4f5g6h7j8k9l");
  180. }
  181. }
  182. }