TrendChartBLL.cs 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. using Common;
  2. using Interface;
  3. using Models;
  4. using Models.Entity.LotteryNumDB;
  5. using Services;
  6. using System;
  7. using System.Collections.Generic;
  8. using System.Linq;
  9. using System.Text;
  10. using System.Threading.Tasks;
  11. namespace Business.TrendChart
  12. {
  13. public static class TrendChartBLL
  14. {
  15. private static LotteryNumInterface services;
  16. static TrendChartBLL()
  17. {
  18. services= new LotteryService();
  19. }
  20. public static List<DT_Lottery> QueryAll()
  21. {
  22. return services.ToList<DT_Lottery>();
  23. }
  24. public static List<DT_TrendChart> QueryTrendChartAll()
  25. {
  26. return services.ToList<DT_TrendChart>();
  27. }
  28. public static List<DT_TrendChart> GetTrendChart(int cid,int tid)
  29. {
  30. List<EExpression> listexp = new List<EExpression>();
  31. listexp.Add(new EExpression("Cid", "=", cid));
  32. listexp.Add(new EExpression("Tid", "=", tid));
  33. List<DT_TrendChart> list = new List<DT_TrendChart>();
  34. try
  35. {
  36. list = services.GetList<DT_TrendChart>(null, listexp);
  37. }
  38. catch (Exception ee)
  39. {
  40. LogHelper.Error(typeof(TrendChartBLL), ee.Message + "GetTrendChart");
  41. }
  42. return list;
  43. }
  44. public static List<DT_TrendChart> GetTrendChart( List<int> cid,List<int> tid)
  45. {
  46. List<EExpression> listexp = new List<EExpression>();
  47. listexp.Add(new EExpression("Cid", EnumExpression.In, cid));
  48. listexp.Add(new EExpression("Tid", EnumExpression.In, tid));
  49. List<DT_TrendChart> list = new List<DT_TrendChart>();
  50. try
  51. {
  52. list = services.GetList<DT_TrendChart>(null, listexp);
  53. }
  54. catch (Exception ee)
  55. {
  56. LogHelper.Error(typeof(TrendChartBLL), ee.Message + "GetTrendChart");
  57. }
  58. return list;
  59. }
  60. /// <summary>
  61. /// 获取所有TDK
  62. /// </summary>
  63. /// <returns></returns>
  64. public static List<L_TDK> GetTDKList()
  65. {
  66. List<EExpression> listexp = new List<EExpression>();
  67. listexp.Add(new EExpression("type", "=", "1"));
  68. return services.GetList<L_TDK>(null, listexp);
  69. }
  70. }
  71. }