141 lines
3.8 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Learun.Util;
using System;
using System.Collections.Generic;
namespace Learun.Application.OA.Email.EmailReceive
{
/// <summary>
/// 版 本 Learun-ADMS V6.1.6.0 敏捷开发框架
/// Copyright (c) 2013-2017 Hexagon PPM
/// 创建人:研发部
/// 日 期2018.06.04
/// 描 述:邮件接收管理
/// </summary>
public class EmailReceiveBLL : EmailReceiveIBLL
{
private EmailReceiveService emailReceiveService = new EmailReceiveService();
#region
/// <summary>
/// 获取收取邮件数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">关键词</param>
/// <returns></returns>
public IEnumerable<EmailReceiveEntity> GetReceiveList(Pagination pagination, string queryJson)
{
try
{
return emailReceiveService.GetReceiveList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 获取邮件接收实体
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public EmailReceiveEntity GetReceiveEntity(string keyValue)
{
try
{
return emailReceiveService.GetReceiveEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 获取邮件接收个数
/// </summary>
/// <returns></returns>
public int GetCount()
{
try
{
return emailReceiveService.GetCount();
}
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
{
emailReceiveService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 保存(新增、修改)
/// </summary>
/// <param name="keyValue">主键值</param>
/// <param name="receiveEntity">邮件接收实体</param>
/// <returns></returns>
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
}
}