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.

EmailReceiveBLL.cs 3.8 KiB

4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. using Learun.Util;
  2. using System;
  3. using System.Collections.Generic;
  4. namespace Learun.Application.OA.Email.EmailReceive
  5. {
  6. /// <summary>
  7. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  8. /// Copyright (c) 2013-2017
  9. /// 创建人:陈彬彬
  10. /// 日 期:2018.06.04
  11. /// 描 述:邮件接收管理
  12. /// </summary>
  13. public class EmailReceiveBLL : EmailReceiveIBLL
  14. {
  15. private EmailReceiveService emailReceiveService = new EmailReceiveService();
  16. #region 获取数据
  17. /// <summary>
  18. /// 获取收取邮件数据
  19. /// </summary>
  20. /// <param name="pagination">分页参数</param>
  21. /// <param name="queryJson">关键词</param>
  22. /// <returns></returns>
  23. public IEnumerable<EmailReceiveEntity> GetReceiveList(Pagination pagination, string queryJson)
  24. {
  25. try
  26. {
  27. return emailReceiveService.GetReceiveList(pagination, queryJson);
  28. }
  29. catch (Exception ex)
  30. {
  31. if (ex is ExceptionEx)
  32. {
  33. throw;
  34. }
  35. else
  36. {
  37. throw ExceptionEx.ThrowBusinessException(ex);
  38. }
  39. }
  40. }
  41. /// <summary>
  42. /// 获取邮件接收实体
  43. /// </summary>
  44. /// <param name="keyValue">主键</param>
  45. /// <returns></returns>
  46. public EmailReceiveEntity GetReceiveEntity(string keyValue)
  47. {
  48. try
  49. {
  50. return emailReceiveService.GetReceiveEntity(keyValue);
  51. }
  52. catch (Exception ex)
  53. {
  54. if (ex is ExceptionEx)
  55. {
  56. throw;
  57. }
  58. else
  59. {
  60. throw ExceptionEx.ThrowBusinessException(ex);
  61. }
  62. }
  63. }
  64. /// <summary>
  65. /// 获取邮件接收个数
  66. /// </summary>
  67. /// <returns></returns>
  68. public int GetCount()
  69. {
  70. try
  71. {
  72. return emailReceiveService.GetCount();
  73. }
  74. catch (Exception ex)
  75. {
  76. if (ex is ExceptionEx)
  77. {
  78. throw;
  79. }
  80. else
  81. {
  82. throw ExceptionEx.ThrowBusinessException(ex);
  83. }
  84. }
  85. }
  86. #endregion
  87. #region 提交数据
  88. /// <summary>
  89. /// 删除
  90. /// </summary>
  91. /// <param name="keyValue">主键</param>
  92. public void DeleteEntity(string keyValue)
  93. {
  94. try
  95. {
  96. emailReceiveService.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. /// </summary>
  113. /// <param name="keyValue">主键值</param>
  114. /// <param name="receiveEntity">邮件接收实体</param>
  115. /// <returns></returns>
  116. public void SaveReceiveEntity(string keyValue, EmailReceiveEntity receiveEntity)
  117. {
  118. try
  119. {
  120. emailReceiveService.SaveReceiveEntity(keyValue, receiveEntity);
  121. }
  122. catch (Exception ex)
  123. {
  124. if (ex is ExceptionEx)
  125. {
  126. throw;
  127. }
  128. else
  129. {
  130. throw ExceptionEx.ThrowBusinessException(ex);
  131. }
  132. }
  133. }
  134. #endregion
  135. }
  136. }