TrendChartPreview.aspx.cs 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using System.Reflection;
  6. using System.Text;
  7. using System.Web;
  8. using System.Web.UI;
  9. using System.Web.UI.WebControls;
  10. using CB.Common;
  11. using CB.Entity;
  12. using CB.Framework;
  13. using CB.TrendChart.FrequencyTrendChart;
  14. using CB.TrendChart.LotteryTrendChart;
  15. namespace CB.Admin.Plugins.TrendChartConfig
  16. {
  17. public partial class TrendChartPreview : AdminPage
  18. {
  19. protected string sb = string.Empty, hHead = string.Empty, hFoot = string.Empty;
  20. protected int ChartId, cid;
  21. protected string trendName = "";
  22. protected void Page_Load(object sender, EventArgs e)
  23. {
  24. InitData();
  25. }
  26. protected override void InitData()
  27. {
  28. ChartId = WRequest.GetInt("ChartId", 0);
  29. cid = WRequest.GetQueryInt("Cid", 0);
  30. var entity = CB.Data.TrendChartService.Get(ChartId);
  31. if (null != entity)
  32. {
  33. switch (entity.Type)
  34. {
  35. case TrendChartIdType.Normal:
  36. Normal();
  37. break;
  38. case TrendChartIdType.Abnormal:
  39. Abnormal();
  40. break;
  41. case TrendChartIdType.Static:
  42. Static(entity.Url);
  43. break;
  44. }
  45. }
  46. trendName = null != entity ? entity.Name : "";
  47. }
  48. // 通用配置项
  49. public void Normal()
  50. {
  51. hHead = TrendHFHtml.CreateHeadHtml(ChartId, TrendChartType.PC);
  52. switch (cid)
  53. {
  54. case 1:
  55. if (ChartId == 11)
  56. {
  57. sb = FC3DTrend.PreViewTrendChart(ChartId, TrendChartType.PC,
  58. new LotterySearchField() { NumRepeat = 1 });
  59. break;
  60. }
  61. sb = FC3DTrend.PreViewTrendChart(ChartId, TrendChartType.PC, null);
  62. break;
  63. case 2:
  64. case 3:
  65. if (ChartId == 23)
  66. {
  67. sb = TCP3Trend.PreViewTrendChart(ChartId, TrendChartType.PC,
  68. new LotterySearchField() { NumRepeat = 1 });
  69. break;
  70. }
  71. sb = TCP3Trend.PreViewTrendChart(ChartId, TrendChartType.PC, null);
  72. break;
  73. case 4:
  74. if (ChartId == 99)
  75. {
  76. sb = FCSSQTrend.PreViewTrendChart(ChartId, TrendChartType.PC,
  77. new LotterySearchField() { Week = 3 });
  78. break;
  79. }
  80. if (ChartId == 100)
  81. {
  82. sb = FCSSQTrend.PreViewTrendChart(ChartId, TrendChartType.PC,
  83. new LotterySearchField() { Week = 5 });
  84. break;
  85. }
  86. if (ChartId == 101)
  87. {
  88. sb = FCSSQTrend.PreViewTrendChart(ChartId, TrendChartType.PC,
  89. new LotterySearchField() { Week = 1 });
  90. break;
  91. }
  92. sb = FCSSQTrend.PreViewTrendChart(ChartId, TrendChartType.PC, null);
  93. break;
  94. case 5:
  95. sb = FCQLCTrend.PreViewTrendChart(ChartId, TrendChartType.PC, null);
  96. break;
  97. case 12:
  98. if (ChartId == 107)
  99. {
  100. sb = TCDLTTrend.PreViewTrendChart(ChartId, TrendChartType.PC,
  101. new LotterySearchField() { Week = 2 });
  102. break;
  103. }
  104. if (ChartId == 108)
  105. {
  106. sb = TCDLTTrend.PreViewTrendChart(ChartId, TrendChartType.PC,
  107. new LotterySearchField() { Week = 4 });
  108. break;
  109. }
  110. if (ChartId == 109)
  111. {
  112. sb = TCDLTTrend.PreViewTrendChart(ChartId, TrendChartType.PC,
  113. new LotterySearchField() { Week = 7 });
  114. break;
  115. }
  116. sb = TCDLTTrend.PreViewTrendChart(ChartId, TrendChartType.PC, null);
  117. break;
  118. case 19:
  119. sb = TCQXCTrend.PreViewTrendChart(ChartId, TrendChartType.PC, null);
  120. break;
  121. case 28: //好彩1
  122. sb = HC1Trend.PreViewTrendChart(ChartId, TrendChartType.PC, null);
  123. break;
  124. default: //高频走势图
  125. sb = KL12SiChuanTrend.PreViewTrendChart(ChartId, TrendChartType.TV, null).HtmlData;
  126. break;
  127. }
  128. hFoot = TrendHFHtml.CreateFootHtml(ChartId, TrendChartType.PC);
  129. }
  130. // 特殊配置项
  131. public void Abnormal()
  132. {
  133. LotterySearchField field = null;
  134. switch (cid)
  135. {
  136. case 1:
  137. if (ChartId == 94)
  138. {
  139. sb = FC3DTrend.PreViewFC3D_012_4_TrendChart(ChartId, TrendChartType.PC, field);
  140. break;
  141. }
  142. break;
  143. case 2:
  144. case 3:
  145. if (ChartId == 95)
  146. {
  147. sb = TCP3Trend.PreViewTCP3_012_4_TrendChart(ChartId, TrendChartType.PC);
  148. break;
  149. }
  150. break;
  151. case 4:
  152. if (ChartId == 102)
  153. {
  154. sb = FCSSQTrend.PreView_FCSSQChuHaoPL_TrendChart(ChartId, TrendChartType.PC);
  155. break;
  156. }
  157. break;
  158. case 5:
  159. break;
  160. case 12:
  161. if (ChartId == 114)
  162. {
  163. sb = TCDLTTrend.PreView_TCDLTChuHaoPL_TrendChart(ChartId, TrendChartType.PC);
  164. break;
  165. }
  166. break;
  167. case 19:
  168. break;
  169. }
  170. }
  171. // 静态类型(图表)
  172. public void Static(string url)
  173. {
  174. sb = GetHtml.GetHtmlText(url);
  175. }
  176. }
  177. }