|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- using Learun.Util;
- using System;
- using System.Collections.Generic;
-
- namespace Learun.Application.OA.Email.EmailConfig
- {
- /// <summary>
- /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
- /// Copyright (c) 2013-2017
- /// 创建人:陈彬彬
- /// 日 期:2018.06.04
- /// 描 述:邮件配置管理
- /// </summary>
- public class EmailConfigBLL : EmailConfigIBLL
- {
- private EmailConfigService emailConfigService = new EmailConfigService();
-
- #region 获取数据
- /// <summary>
- /// 获取配置信息
- /// </summary>
- /// <param name="queryJson">关键词</param>
- /// <returns></returns>
- public IEnumerable<EmailConfigEntity> GetConfigList(string queryJson)
- {
- try
- {
- return emailConfigService.GetConfigList(queryJson);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- /// <summary>
- /// 获取邮件配置实体
- /// </summary>
- /// <param name="keyValue">主键</param>
- /// <returns></returns>
- public EmailConfigEntity GetConfigEntity(string keyValue)
- {
- try
- {
- return emailConfigService.GetConfigEntity(keyValue);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- /// <summary>
- /// 获取当前有效邮件配置实体
- /// </summary>
- /// <param name="keyValue">主键</param>
- /// <returns></returns>
-
- public EmailConfigEntity GetCurrentConfig()
- {
- try
- {
- return emailConfigService.GetCurrentConfig();
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- #endregion
-
- #region 提交数据
- /// <summary>
- /// 删除
- /// </summary>
- /// <param name="keyValue">主键</param>
- public void DeleteEntity(string keyValue)
- {
- try
- {
- emailConfigService.DeleteEntity(keyValue);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
- /// <summary>
- /// 保存(新增、修改)
- /// </summary>
- /// <param name="keyValue">主键值</param>
- /// <param name="configEntity">邮件配置实体</param>
- /// <returns></returns>
- public void SaveConfigEntity(string keyValue, EmailConfigEntity configEntity)
- {
- try
- {
- emailConfigService.SaveConfigEntity(keyValue, configEntity);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
- #endregion
- }
- }
|