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.

CommunityInfoBLL.cs 4.7 KiB

4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. using Learun.Util;
  2. using System;
  3. using System.Data;
  4. using System.Collections.Generic;
  5. namespace Learun.Application.TwoDevelopment.PersonnelManagement
  6. {
  7. /// <summary>
  8. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  9. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  10. /// 创 建:超级管理员
  11. /// 日 期:2020-01-04 11:47
  12. /// 描 述:社团管理
  13. /// </summary>
  14. public class CommunityInfoBLL : CommunityInfoIBLL
  15. {
  16. private CommunityInfoService communityInfoService = new CommunityInfoService();
  17. #region 获取数据
  18. /// <summary>
  19. /// 获取页面显示列表分页数据
  20. /// <summary>
  21. /// <param name="pagination">分页参数</param>
  22. /// <param name="queryJson">查询参数</param>
  23. /// <returns></returns>
  24. public IEnumerable<CommunityInfoEntity> GetPageList(Pagination pagination, string queryJson)
  25. {
  26. try
  27. {
  28. return communityInfoService.GetPageList(pagination, queryJson);
  29. }
  30. catch (Exception ex)
  31. {
  32. if (ex is ExceptionEx)
  33. {
  34. throw;
  35. }
  36. else
  37. {
  38. throw ExceptionEx.ThrowBusinessException(ex);
  39. }
  40. }
  41. }
  42. /// <summary>
  43. /// 获取页面显示列表数据
  44. /// <summary>
  45. /// <param name="queryJson">查询参数</param>
  46. /// <returns></returns>
  47. public IEnumerable<CommunityInfoEntity> GetList(string queryJson)
  48. {
  49. try
  50. {
  51. return communityInfoService.GetList(queryJson);
  52. }
  53. catch (Exception ex)
  54. {
  55. if (ex is ExceptionEx)
  56. {
  57. throw;
  58. }
  59. else
  60. {
  61. throw ExceptionEx.ThrowBusinessException(ex);
  62. }
  63. }
  64. }
  65. /// <summary>
  66. /// 获取CommunityInfo表实体数据
  67. /// <param name="keyValue">主键</param>
  68. /// <summary>
  69. /// <returns></returns>
  70. public CommunityInfoEntity GetCommunityInfoEntity(string keyValue)
  71. {
  72. try
  73. {
  74. return communityInfoService.GetCommunityInfoEntity(keyValue);
  75. }
  76. catch (Exception ex)
  77. {
  78. if (ex is ExceptionEx)
  79. {
  80. throw;
  81. }
  82. else
  83. {
  84. throw ExceptionEx.ThrowBusinessException(ex);
  85. }
  86. }
  87. }
  88. /// <summary>
  89. /// 获取CommunityInfo表实体数据
  90. /// <param name="keyValue">主键</param>
  91. /// <summary>
  92. /// <returns></returns>
  93. public CommunityInfoEntity GetCommunityInfoEntityByCode(string code)
  94. {
  95. try
  96. {
  97. return communityInfoService.GetCommunityInfoEntityByCode(code);
  98. }
  99. catch (Exception ex)
  100. {
  101. if (ex is ExceptionEx)
  102. {
  103. throw;
  104. }
  105. else
  106. {
  107. throw ExceptionEx.ThrowBusinessException(ex);
  108. }
  109. }
  110. }
  111. #endregion
  112. #region 提交数据
  113. /// <summary>
  114. /// 删除实体数据
  115. /// <param name="keyValue">主键</param>
  116. /// <summary>
  117. /// <returns></returns>
  118. public void DeleteEntity(string keyValue)
  119. {
  120. try
  121. {
  122. communityInfoService.DeleteEntity(keyValue);
  123. }
  124. catch (Exception ex)
  125. {
  126. if (ex is ExceptionEx)
  127. {
  128. throw;
  129. }
  130. else
  131. {
  132. throw ExceptionEx.ThrowBusinessException(ex);
  133. }
  134. }
  135. }
  136. /// <summary>
  137. /// 保存实体数据(新增、修改)
  138. /// <param name="keyValue">主键</param>
  139. /// <summary>
  140. /// <returns></returns>
  141. public void SaveEntity(UserInfo userInfo, string keyValue, CommunityInfoEntity entity)
  142. {
  143. try
  144. {
  145. communityInfoService.SaveEntity(userInfo, keyValue, entity);
  146. }
  147. catch (Exception ex)
  148. {
  149. if (ex is ExceptionEx)
  150. {
  151. throw;
  152. }
  153. else
  154. {
  155. throw ExceptionEx.ThrowBusinessException(ex);
  156. }
  157. }
  158. }
  159. #endregion
  160. }
  161. }