123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
-
- using M55128_rec.Business;
- using M55128_rec.Business.TK;
- using M55128_rec.Models.ViewModels.GallerMangerModel;
- using Models;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.Mvc;
- using Common;
- namespace M55128_rec.Controllers
- {
- [RoutePrefix("kj")]
- public class KJController : Controller
- {
- [Route("index.html")]
- public ActionResult Index()
- {
- List<LotteryData> model = KJApiBLL.GetLottery();
- var c11x5 = new PageLottery { Name = "11选5", Type = "11x5", Data = model.Where(w => w.MenuName == "c11x5").ToList() };
- var k3 = new PageLottery { Name = "快3", Type = "k3", Data = model.Where(w => w.MenuName == "k3").ToList() };
- var klsf = new PageLottery { Name = "快乐十分", Type = "klsf", Data = model.Where(w => w.MenuName == "klsf").ToList() };
- var kl12 = new PageLottery { Name = "快乐12", Type = "kl12", Data = model.Where(w => w.MenuName == "kl12").ToList() };
- var qt = new PageLottery { Name = "其他彩种", Type = "qt", Data = model.Where(w => w.MenuName == "qt").ToList() };
- var qgc = new PageLottery { Name = "全国彩", Type = "qgc", Data = model.Where(w => w.MenuName == "qgc").ToList() };
- var dfc = new PageLottery { Name = "地方彩", Type = "dfc", Data = model.Where(w => w.MenuName == "dfc").ToList() };
- var ssc = new PageLottery { Name = "时时彩", Type = "scc", Data = model.Where(w => w.MenuName == "ssc").ToList() };
- List<PageLottery> gpc = new List<PageLottery>();
- gpc.Add(c11x5);
- gpc.Add(k3);
- gpc.Add(klsf);
- gpc.Add(kl12);
- gpc.Add(qt);
- gpc.Add(ssc);
- List<PageLottery> gd = new List<PageLottery>();
- gd.Add(qgc);
- gd.Add(dfc);
- return View(Tuple.Create(gd,gpc));
- }
- [Route("{t?}.html")]
- public ActionResult KJXQ(string t)
- {
- var lotterytype = EnumHelper.GETEnumTypeByText<SCCLottery>(t);
- LotteryData model= KJApiBLL.GetLottery(lotterytype.ToString());
-
- //model.MoneyCount=model.MoneyCount.Trim
- return View(model);
- }
- [Route("~/kjzs/{i?}.html")]
- public ActionResult KJZS(string i)
- {
- //ViewBag.t = t;
- var lotterytype = EnumHelper.GETEnumTypeByText<SCCLottery>(i);
- var lottery = "";
- if (ZSlotterType.TypeOfNameDict.Keys.Contains(lotterytype.ToString()))
- {
- lottery= ZSlotterType.TypeOfNameDict[lotterytype.ToString()];
- }
- TrendChartModel model = TKApiBLL.GetTrendChartSRC(lottery);
- if (model == null)
- {
- model = new TrendChartModel();
- model.Name = "暂无数据";
- }
- return View(model);
- }
-
- }
- }
|