TrendChartBLL.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using Interface;
  2. using Models;
  3. using Models.Entity.LottomatBaseDB;
  4. using Services;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Web;
  9. namespace Business.TK
  10. {
  11. public static class TrendChartBLL
  12. {
  13. private static ZXInterface services;
  14. static TrendChartBLL()
  15. {
  16. services = new ZXServic();
  17. }
  18. public static List<Base_TrendChart> GetList(int page, int rows, Dictionary<string, Object> queryParam, out int count, string order = null, bool isDesc = true)
  19. {
  20. List<EExpression> listexp = new List<EExpression>();
  21. if (queryParam.Keys.Count > 0)
  22. {
  23. if (queryParam.ContainsKey("CategoryId"))
  24. {
  25. string CategoryId = queryParam["CategoryId"].ToString();
  26. listexp.Add(new EExpression("CategoryId", "=", CategoryId));
  27. }
  28. if (queryParam.ContainsKey("EqTitle"))
  29. {
  30. string Title = queryParam["EqTitle"].ToString();
  31. listexp.Add(new EExpression("Title", "=", Title));
  32. }
  33. if (queryParam.ContainsKey("LikeTitle")&& (!queryParam.ContainsKey("EqTitle")))
  34. {
  35. string Title = queryParam["LikeTitle"].ToString();
  36. listexp.Add(new EExpression("Title", EnumExpression.like, "%"+Title+"%"));
  37. }
  38. }
  39. var data = services.GetList<Base_TrendChart>(page,rows,order, listexp,isDesc);
  40. count = services.GetPageListCount<Base_TrendChart>(listexp);
  41. return data;
  42. }
  43. public static List<Base_TrendChart> GetList(string order,List<EExpression> list,bool isdesc=false)
  44. {
  45. return services.GetList<Base_TrendChart>(order, list, isdesc);
  46. }
  47. }
  48. }