You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DbDraftBLL.cs 3.7 KiB

4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. using Learun.Util;
  2. using System;
  3. using System.Collections.Generic;
  4. namespace Learun.Application.Base.SystemModule
  5. {
  6. /// <summary>
  7. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  8. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  9. /// 创 建:超级管理员
  10. /// 日 期:2018-03-15 12:03
  11. /// 描 述:数据表草稿类
  12. /// </summary>
  13. public class DbDraftBLL : DbDraftIBLL
  14. {
  15. private DbDraftService dbDraftService = new DbDraftService();
  16. #region 获取数据
  17. /// <summary>
  18. /// 获取列表数据
  19. /// <summary>
  20. /// <returns></returns>
  21. public IEnumerable<DbDraftEntity> GetList(string queryJson)
  22. {
  23. try
  24. {
  25. return dbDraftService.GetList(queryJson);
  26. }
  27. catch (Exception ex)
  28. {
  29. if (ex is ExceptionEx)
  30. {
  31. throw;
  32. }
  33. else
  34. {
  35. throw ExceptionEx.ThrowBusinessException(ex);
  36. }
  37. }
  38. }
  39. /// <summary>
  40. /// 获取列表分页数据
  41. /// <param name="pagination">分页参数</param>
  42. /// <summary>
  43. /// <returns></returns>
  44. public IEnumerable<DbDraftEntity> GetPageList(Pagination pagination, string queryJson)
  45. {
  46. try
  47. {
  48. return dbDraftService.GetPageList(pagination, queryJson);
  49. }
  50. catch (Exception ex)
  51. {
  52. if (ex is ExceptionEx)
  53. {
  54. throw;
  55. }
  56. else
  57. {
  58. throw ExceptionEx.ThrowBusinessException(ex);
  59. }
  60. }
  61. }
  62. /// <summary>
  63. /// 获取实体数据
  64. /// <param name="keyValue">主键</param>
  65. /// <summary>
  66. /// <returns></returns>
  67. public DbDraftEntity GetEntity(string keyValue)
  68. {
  69. try
  70. {
  71. return dbDraftService.GetEntity(keyValue);
  72. }
  73. catch (Exception ex)
  74. {
  75. if (ex is ExceptionEx)
  76. {
  77. throw;
  78. }
  79. else
  80. {
  81. throw ExceptionEx.ThrowBusinessException(ex);
  82. }
  83. }
  84. }
  85. #endregion
  86. #region 提交数据
  87. /// <summary>
  88. /// 删除实体数据
  89. /// <param name="keyValue">主键</param>
  90. /// <summary>
  91. /// <returns></returns>
  92. public void DeleteEntity(string keyValue)
  93. {
  94. try
  95. {
  96. dbDraftService.DeleteEntity(keyValue);
  97. }
  98. catch (Exception ex)
  99. {
  100. if (ex is ExceptionEx)
  101. {
  102. throw;
  103. }
  104. else
  105. {
  106. throw ExceptionEx.ThrowBusinessException(ex);
  107. }
  108. }
  109. }
  110. /// <summary>
  111. /// 保存实体数据(新增、修改)
  112. /// <param name="keyValue">主键</param>
  113. /// <summary>
  114. /// <returns></returns>
  115. public void SaveEntity(string keyValue, DbDraftEntity entity)
  116. {
  117. try
  118. {
  119. dbDraftService.SaveEntity(keyValue, entity);
  120. }
  121. catch (Exception ex)
  122. {
  123. if (ex is ExceptionEx)
  124. {
  125. throw;
  126. }
  127. else
  128. {
  129. throw ExceptionEx.ThrowBusinessException(ex);
  130. }
  131. }
  132. }
  133. #endregion
  134. }
  135. }