AppKeyBLL.cs 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. using Lottomat.Application.Entity.SystemManage;
  2. using Lottomat.Application.IService.SystemManage;
  3. using Lottomat.Application.Service.SystemManage;
  4. using Lottomat.Util.WebControl;
  5. using System.Collections.Generic;
  6. using System;
  7. using System.Linq.Expressions;
  8. using Lottomat.Application.Code;
  9. namespace Lottomat.Application.Busines.SystemManage
  10. {
  11. /// <summary>
  12. /// 版 本 1.0
  13. /// Copyright (c) 2016-2017
  14. /// 创 建:超级管理员
  15. /// 日 期:2017-10-25 16:17
  16. /// 描 述:系统接口密钥管理
  17. /// </summary>
  18. public class AppKeyBLL
  19. {
  20. private IAppKeyService service = new AppKeyService();
  21. #region 获取数据
  22. /// <summary>
  23. /// 获取列表
  24. /// </summary>
  25. /// <param name="pagination">分页</param>
  26. /// <param name="queryJson">查询参数</param>
  27. /// <returns>返回分页列表</returns>
  28. public IEnumerable<AppKeyEntity> GetPageList(Pagination pagination, string queryJson)
  29. {
  30. return service.GetPageList(pagination, queryJson);
  31. }
  32. /// <summary>
  33. /// 获取列表
  34. /// </summary>
  35. /// <param name="queryJson">查询参数</param>
  36. /// <returns>返回列表</returns>
  37. public IEnumerable<AppKeyEntity> GetList(string queryJson)
  38. {
  39. return service.GetList(queryJson);
  40. }
  41. /// <summary>
  42. /// 获取实体
  43. /// </summary>
  44. /// <param name="keyValue">主键值</param>
  45. /// <returns></returns>
  46. public AppKeyEntity GetEntity(string keyValue)
  47. {
  48. return service.GetEntity(keyValue);
  49. }
  50. public AppKeyEntity GetEntity(Expression<Func<AppKeyEntity, bool>> condition)
  51. {
  52. return service.GetEntity(condition);
  53. }
  54. #endregion
  55. #region 提交数据
  56. /// <summary>
  57. /// 删除数据
  58. /// </summary>
  59. /// <param name="keyValue">主键</param>
  60. public void RemoveForm(string keyValue)
  61. {
  62. try
  63. {
  64. service.RemoveForm(keyValue);
  65. }
  66. catch (Exception)
  67. {
  68. throw;
  69. }
  70. }
  71. /// <summary>
  72. /// 保存表单(新增、修改)
  73. /// </summary>
  74. /// <param name="keyValue">主键值</param>
  75. /// <param name="entity">实体对象</param>
  76. /// <returns></returns>
  77. public void SaveForm(string keyValue, AppKeyEntity entity)
  78. {
  79. try
  80. {
  81. service.SaveForm(keyValue, entity);
  82. }
  83. catch (Exception)
  84. {
  85. throw;
  86. }
  87. }
  88. #endregion
  89. }
  90. }