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.
 
 
 
 
 
 

174 lines
4.7 KiB

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