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