using Learun.Util;
using System;
using System.Collections.Generic;
namespace Learun.Application.OA.Email.EmailReceive
{
///
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2017
/// 创建人:陈彬彬
/// 日 期:2018.06.04
/// 描 述:邮件接收管理
///
public class EmailReceiveBLL : EmailReceiveIBLL
{
private EmailReceiveService emailReceiveService = new EmailReceiveService();
#region 获取数据
///
/// 获取收取邮件数据
///
/// 分页参数
/// 关键词
///
public IEnumerable GetReceiveList(Pagination pagination, string queryJson)
{
try
{
return emailReceiveService.GetReceiveList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 获取邮件接收实体
///
/// 主键
///
public EmailReceiveEntity GetReceiveEntity(string keyValue)
{
try
{
return emailReceiveService.GetReceiveEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 获取邮件接收个数
///
///
public int GetCount()
{
try
{
return emailReceiveService.GetCount();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion
#region 提交数据
///
/// 删除
///
/// 主键
public void DeleteEntity(string keyValue)
{
try
{
emailReceiveService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 保存(新增、修改)
///
/// 主键值
/// 邮件接收实体
///
public void SaveReceiveEntity(string keyValue, EmailReceiveEntity receiveEntity)
{
try
{
emailReceiveService.SaveReceiveEntity(keyValue, receiveEntity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion
}
}