| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
- using System.Reflection;
- using System.Text;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using CB.Common;
- using CB.Entity;
- using CB.Framework;
- using CB.TrendChart.FrequencyTrendChart;
- using CB.TrendChart.LotteryTrendChart;
- namespace CB.Admin.Plugins.TrendChartConfig
- {
- public partial class TrendChartPreview : AdminPage
- {
- protected string sb = string.Empty, hHead = string.Empty, hFoot = string.Empty;
- protected int ChartId, cid;
- protected string trendName = "";
- protected void Page_Load(object sender, EventArgs e)
- {
- InitData();
- }
- protected override void InitData()
- {
- ChartId = WRequest.GetInt("ChartId", 0);
- cid = WRequest.GetQueryInt("Cid", 0);
- var entity = CB.Data.TrendChartService.Get(ChartId);
- if (null != entity)
- {
- switch (entity.Type)
- {
- case TrendChartIdType.Normal:
- Normal();
- break;
- case TrendChartIdType.Abnormal:
- Abnormal();
- break;
- case TrendChartIdType.Static:
- Static(entity.Url);
- break;
- }
- }
- trendName = null != entity ? entity.Name : "";
- }
- // 通用配置项
- public void Normal()
- {
- hHead = TrendHFHtml.CreateHeadHtml(ChartId, TrendChartType.PC);
- switch (cid)
- {
- case 1:
- if (ChartId == 11)
- {
- sb = FC3DTrend.PreViewTrendChart(ChartId, TrendChartType.PC,
- new LotterySearchField() { NumRepeat = 1 });
- break;
- }
- sb = FC3DTrend.PreViewTrendChart(ChartId, TrendChartType.PC, null);
- break;
- case 2:
- case 3:
- if (ChartId == 23)
- {
- sb = TCP3Trend.PreViewTrendChart(ChartId, TrendChartType.PC,
- new LotterySearchField() { NumRepeat = 1 });
- break;
- }
- sb = TCP3Trend.PreViewTrendChart(ChartId, TrendChartType.PC, null);
- break;
- case 4:
- if (ChartId == 99)
- {
- sb = FCSSQTrend.PreViewTrendChart(ChartId, TrendChartType.PC,
- new LotterySearchField() { Week = 3 });
- break;
- }
- if (ChartId == 100)
- {
- sb = FCSSQTrend.PreViewTrendChart(ChartId, TrendChartType.PC,
- new LotterySearchField() { Week = 5 });
- break;
- }
- if (ChartId == 101)
- {
- sb = FCSSQTrend.PreViewTrendChart(ChartId, TrendChartType.PC,
- new LotterySearchField() { Week = 1 });
- break;
- }
- sb = FCSSQTrend.PreViewTrendChart(ChartId, TrendChartType.PC, null);
- break;
- case 5:
- sb = FCQLCTrend.PreViewTrendChart(ChartId, TrendChartType.PC, null);
- break;
- case 12:
- if (ChartId == 107)
- {
- sb = TCDLTTrend.PreViewTrendChart(ChartId, TrendChartType.PC,
- new LotterySearchField() { Week = 2 });
- break;
- }
- if (ChartId == 108)
- {
- sb = TCDLTTrend.PreViewTrendChart(ChartId, TrendChartType.PC,
- new LotterySearchField() { Week = 4 });
- break;
- }
- if (ChartId == 109)
- {
- sb = TCDLTTrend.PreViewTrendChart(ChartId, TrendChartType.PC,
- new LotterySearchField() { Week = 7 });
- break;
- }
- sb = TCDLTTrend.PreViewTrendChart(ChartId, TrendChartType.PC, null);
- break;
- case 19:
- sb = TCQXCTrend.PreViewTrendChart(ChartId, TrendChartType.PC, null);
- break;
- case 28: //好彩1
- sb = HC1Trend.PreViewTrendChart(ChartId, TrendChartType.PC, null);
- break;
- default: //高频走势图
- sb = KL12SiChuanTrend.PreViewTrendChart(ChartId, TrendChartType.TV, null).HtmlData;
- break;
- }
- hFoot = TrendHFHtml.CreateFootHtml(ChartId, TrendChartType.PC);
- }
- // 特殊配置项
- public void Abnormal()
- {
- LotterySearchField field = null;
- switch (cid)
- {
- case 1:
- if (ChartId == 94)
- {
- sb = FC3DTrend.PreViewFC3D_012_4_TrendChart(ChartId, TrendChartType.PC, field);
- break;
- }
- break;
- case 2:
- case 3:
- if (ChartId == 95)
- {
- sb = TCP3Trend.PreViewTCP3_012_4_TrendChart(ChartId, TrendChartType.PC);
- break;
- }
- break;
- case 4:
- if (ChartId == 102)
- {
- sb = FCSSQTrend.PreView_FCSSQChuHaoPL_TrendChart(ChartId, TrendChartType.PC);
- break;
- }
- break;
- case 5:
- break;
- case 12:
- if (ChartId == 114)
- {
- sb = TCDLTTrend.PreView_TCDLTChuHaoPL_TrendChart(ChartId, TrendChartType.PC);
- break;
- }
- break;
- case 19:
- break;
- }
- }
- // 静态类型(图表)
- public void Static(string url)
- {
- sb = GetHtml.GetHtmlText(url);
- }
- }
- }
|