123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- 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
- {
- /// <summary>
- /// 开奖历史的表格
- /// </summary>
- /// <param name="enumName">彩种类型名称</param>
- /// <param name="year">年份</param>
- /// <param name="date">日期</param>
- /// <param name="qi">期数</param>
- /// <param name="number">查询条数</param>
- /// <returns></returns>
- public ActionResult KJLS_Table(string enumName, int? year, int? qi, int number = 30)
- {
- return PartialView(new ResultModel<List<ApiModel>, ViewBagModel>
- {
- Data = qi.HasValue ? new List<ApiModel> { GetOne(enumName, (int)qi) } : GetList(enumName, year, qi, qi, number).OrderByDescending(p => p.qi).ToList(),
- ViewBag = new ViewBagModel
- {
- NewTypeName = enumName
- }
- });
- }
- /// <summary>
- /// 开机号历史的表格
- /// </summary>
- /// <param name="enumName">彩种类型名称</param>
- /// <param name="year">年份</param>
- /// <param name="qi">期数</param>
- /// <param name="sqi">开始期数</param>
- /// <param name="eqi">结束期数</param>
- /// <param name="number">查询条数</param>
- /// <returns></returns>
- public ActionResult KJH_Table(string enumName, int? year, int? qi, int? sqi, int? eqi, int number = 30)
- {
- return PartialView(new ResultModel<List<ApiModel>, ViewBagModel>
- {
- Data = qi.HasValue ? new List<ApiModel> { 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
- }
- });
- }
- /// <summary>
- /// 试机号历史的表格
- /// </summary>
- /// <param name="enumName">彩种类型名称</param>
- /// <param name="year">年份</param>
- /// <param name="qi">期数</param>
- /// <param name="sqi">开始期数</param>
- /// <param name="eqi">结束期数</param>
- /// <param name="number">查询条数</param>
- /// <returns></returns>
- public ActionResult SJH_Table(string enumName, int? year, int? qi, int? sqi, int? eqi, int number = 30)
- {
- return PartialView(new ResultModel<List<ApiModel>, ViewBagModel>
- {
- Data = qi.HasValue ? new List<ApiModel> { 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
- }
- });
- }
- /// <summary>
- /// 试机号历史今天记录表格
- /// </summary>
- /// <param name="enumName"></param>
- /// <param name="type"></param>
- /// <returns></returns>
- public ActionResult SJH_LSNow_Table(string enumName, string type = "sjh",int qi = 0)
- {
- return PartialView(new ResultModel<List<ApiModel>, ViewBagModel>
- {
- Data = GetLsList(enumName, type, qi),
- ViewBag = new ViewBagModel
- {
- NewTypeName = enumName
- }
- });
- }
- /// <summary>
- /// 首页的Tab彩种信息
- /// </summary>
- /// <param name="enumName"></param>
- /// <returns></returns>
- public ActionResult Home_Tab(int? czTypeEnum)
- {
- return PartialView(new ResultModel<List<ApiModel>, ViewBagModel>
- {
- Data = GetToday(),
- ViewBag = new ViewBagModel
- {
- CzTypeEnum = czTypeEnum
- }
- });
- }
- }
- }
|