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.

EmailConfigBLL.cs 3.8 KiB

4 vuotta sitten
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. using Learun.Util;
  2. using System;
  3. using System.Collections.Generic;
  4. namespace Learun.Application.OA.Email.EmailConfig
  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 EmailConfigBLL : EmailConfigIBLL
  14. {
  15. private EmailConfigService emailConfigService = new EmailConfigService();
  16. #region 获取数据
  17. /// <summary>
  18. /// 获取配置信息
  19. /// </summary>
  20. /// <param name="queryJson">关键词</param>
  21. /// <returns></returns>
  22. public IEnumerable<EmailConfigEntity> GetConfigList(string queryJson)
  23. {
  24. try
  25. {
  26. return emailConfigService.GetConfigList(queryJson);
  27. }
  28. catch (Exception ex)
  29. {
  30. if (ex is ExceptionEx)
  31. {
  32. throw;
  33. }
  34. else
  35. {
  36. throw ExceptionEx.ThrowBusinessException(ex);
  37. }
  38. }
  39. }
  40. /// <summary>
  41. /// 获取邮件配置实体
  42. /// </summary>
  43. /// <param name="keyValue">主键</param>
  44. /// <returns></returns>
  45. public EmailConfigEntity GetConfigEntity(string keyValue)
  46. {
  47. try
  48. {
  49. return emailConfigService.GetConfigEntity(keyValue);
  50. }
  51. catch (Exception ex)
  52. {
  53. if (ex is ExceptionEx)
  54. {
  55. throw;
  56. }
  57. else
  58. {
  59. throw ExceptionEx.ThrowBusinessException(ex);
  60. }
  61. }
  62. }
  63. /// <summary>
  64. /// 获取当前有效邮件配置实体
  65. /// </summary>
  66. /// <param name="keyValue">主键</param>
  67. /// <returns></returns>
  68. public EmailConfigEntity GetCurrentConfig()
  69. {
  70. try
  71. {
  72. return emailConfigService.GetCurrentConfig();
  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. emailConfigService.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="configEntity">邮件配置实体</param>
  115. /// <returns></returns>
  116. public void SaveConfigEntity(string keyValue, EmailConfigEntity configEntity)
  117. {
  118. try
  119. {
  120. emailConfigService.SaveConfigEntity(keyValue, configEntity);
  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. }