TemplateController.cs 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. using CP.Common;
  2. using CP.Kjh.Models;
  3. using CP.Model;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Web;
  8. using System.Web.Mvc;
  9. namespace CP.Kjh.Controllers
  10. {
  11. public class TemplateController : BaseController
  12. {
  13. /// <summary>
  14. /// 开奖历史的表格
  15. /// </summary>
  16. /// <param name="enumName">彩种类型名称</param>
  17. /// <param name="year">年份</param>
  18. /// <param name="date">日期</param>
  19. /// <param name="qi">期数</param>
  20. /// <param name="number">查询条数</param>
  21. /// <returns></returns>
  22. public ActionResult KJLS_Table(string enumName, int? year, int? qi, int number = 30)
  23. {
  24. return PartialView(new ResultModel<List<ApiModel>, ViewBagModel>
  25. {
  26. Data = qi.HasValue ? new List<ApiModel> { GetOne(enumName, (int)qi) } : GetList(enumName, year, qi, qi, number).OrderByDescending(p => p.qi).ToList(),
  27. ViewBag = new ViewBagModel
  28. {
  29. NewTypeName = enumName
  30. }
  31. });
  32. }
  33. /// <summary>
  34. /// 开机号历史的表格
  35. /// </summary>
  36. /// <param name="enumName">彩种类型名称</param>
  37. /// <param name="year">年份</param>
  38. /// <param name="qi">期数</param>
  39. /// <param name="sqi">开始期数</param>
  40. /// <param name="eqi">结束期数</param>
  41. /// <param name="number">查询条数</param>
  42. /// <returns></returns>
  43. public ActionResult KJH_Table(string enumName, int? year, int? qi, int? sqi, int? eqi, int number = 30)
  44. {
  45. return PartialView(new ResultModel<List<ApiModel>, ViewBagModel>
  46. {
  47. 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(),
  48. ViewBag = new ViewBagModel
  49. {
  50. NewTypeName = enumName
  51. }
  52. });
  53. }
  54. /// <summary>
  55. /// 试机号历史的表格
  56. /// </summary>
  57. /// <param name="enumName">彩种类型名称</param>
  58. /// <param name="year">年份</param>
  59. /// <param name="qi">期数</param>
  60. /// <param name="sqi">开始期数</param>
  61. /// <param name="eqi">结束期数</param>
  62. /// <param name="number">查询条数</param>
  63. /// <returns></returns>
  64. public ActionResult SJH_Table(string enumName, int? year, int? qi, int? sqi, int? eqi, int number = 30)
  65. {
  66. return PartialView(new ResultModel<List<ApiModel>, ViewBagModel>
  67. {
  68. 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(),
  69. ViewBag = new ViewBagModel
  70. {
  71. NewTypeName = enumName
  72. }
  73. });
  74. }
  75. /// <summary>
  76. /// 试机号历史今天记录表格
  77. /// </summary>
  78. /// <param name="enumName"></param>
  79. /// <param name="type"></param>
  80. /// <returns></returns>
  81. public ActionResult SJH_LSNow_Table(string enumName, string type = "sjh",int qi = 0)
  82. {
  83. return PartialView(new ResultModel<List<ApiModel>, ViewBagModel>
  84. {
  85. Data = GetLsList(enumName, type, qi),
  86. ViewBag = new ViewBagModel
  87. {
  88. NewTypeName = enumName
  89. }
  90. });
  91. }
  92. /// <summary>
  93. /// 首页的Tab彩种信息
  94. /// </summary>
  95. /// <param name="enumName"></param>
  96. /// <returns></returns>
  97. public ActionResult Home_Tab(int? czTypeEnum)
  98. {
  99. return PartialView(new ResultModel<List<ApiModel>, ViewBagModel>
  100. {
  101. Data = GetToday(),
  102. ViewBag = new ViewBagModel
  103. {
  104. CzTypeEnum = czTypeEnum
  105. }
  106. });
  107. }
  108. }
  109. }