using CP.Common; using CP.Kjh.Models; using CP.Model; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace CP.Kjh.Controllers { public class TemplateController : BaseController { /// /// 开奖历史的表格 /// /// 彩种类型名称 /// 年份 /// 日期 /// 期数 /// 查询条数 /// public ActionResult KJLS_Table(string enumName, int? year, int? qi, int number = 30) { return PartialView(new ResultModel, ViewBagModel> { Data = qi.HasValue ? new List { GetOne(enumName, (int)qi) } : GetList(enumName, year, qi, qi, number).OrderByDescending(p => p.qi).ToList(), ViewBag = new ViewBagModel { NewTypeName = enumName } }); } /// /// 开机号历史的表格 /// /// 彩种类型名称 /// 年份 /// 期数 /// 开始期数 /// 结束期数 /// 查询条数 /// public ActionResult KJH_Table(string enumName, int? year, int? qi, int? sqi, int? eqi, int number = 30) { return PartialView(new ResultModel, ViewBagModel> { Data = qi.HasValue ? new List { GetOne(enumName, (int)qi) } : GetList(enumName, year, qi.HasValue ? qi : sqi, qi.HasValue ? qi : eqi, number).OrderByDescending(p => p.qi).ToList(), ViewBag = new ViewBagModel { NewTypeName = enumName } }); } /// /// 试机号历史的表格 /// /// 彩种类型名称 /// 年份 /// 期数 /// 开始期数 /// 结束期数 /// 查询条数 /// public ActionResult SJH_Table(string enumName, int? year, int? qi, int? sqi, int? eqi, int number = 30) { return PartialView(new ResultModel, ViewBagModel> { Data = qi.HasValue ? new List { GetOne(enumName, (int)qi) } : GetList(enumName, year, qi.HasValue ? qi : sqi, qi.HasValue ? qi : eqi, number).OrderByDescending(p => p.qi).ToList(), ViewBag = new ViewBagModel { NewTypeName = enumName } }); } /// /// 试机号历史今天记录表格 /// /// /// /// public ActionResult SJH_LSNow_Table(string enumName, string type = "sjh",int qi = 0) { return PartialView(new ResultModel, ViewBagModel> { Data = GetLsList(enumName, type, qi), ViewBag = new ViewBagModel { NewTypeName = enumName } }); } /// /// 首页的Tab彩种信息 /// /// /// public ActionResult Home_Tab(int? czTypeEnum) { return PartialView(new ResultModel, ViewBagModel> { Data = GetToday(), ViewBag = new ViewBagModel { CzTypeEnum = czTypeEnum } }); } } }