119 lines
3.1 KiB
C#
119 lines
3.1 KiB
C#
using Learun.Util;
|
||
using System;
|
||
using System.Collections.Generic;
|
||
|
||
namespace Learun.Application.OA
|
||
{
|
||
/// <summary>
|
||
/// 版 本 PIT-ADMS V7.0.3 敏捷开发框架
|
||
/// Copyright (c) 2013-2018 Hexagon PPM
|
||
/// 创建人:研发部
|
||
/// 日 期:2017.04.17
|
||
/// 描 述:公告管理
|
||
/// </summary>
|
||
public class NoticeBLL : NoticeIBLL
|
||
{
|
||
private NoticeService noticeService = new NoticeService();
|
||
|
||
#region 获取数据
|
||
/// <summary>
|
||
/// 公告列表
|
||
/// </summary>
|
||
/// <param name="pagination">分页参数</param>
|
||
/// <param name="keyword">关键词</param>
|
||
/// <returns></returns>
|
||
public IEnumerable<NewsEntity> GetPageList(Pagination pagination, string keyword)
|
||
{
|
||
try
|
||
{
|
||
return noticeService.GetPageList(pagination, keyword);
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
if (ex is ExceptionEx)
|
||
{
|
||
throw;
|
||
}
|
||
else
|
||
{
|
||
throw ExceptionEx.ThrowBusinessException(ex);
|
||
}
|
||
}
|
||
}
|
||
/// <summary>
|
||
/// 公告实体
|
||
/// </summary>
|
||
/// <param name="keyValue">主键值</param>
|
||
/// <returns></returns>
|
||
public NewsEntity GetEntity(string keyValue)
|
||
{
|
||
try
|
||
{
|
||
return noticeService.GetEntity(keyValue);
|
||
}
|
||
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
|
||
{
|
||
noticeService.DeleteEntity(keyValue);
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
if (ex is ExceptionEx)
|
||
{
|
||
throw;
|
||
}
|
||
else
|
||
{
|
||
throw ExceptionEx.ThrowBusinessException(ex);
|
||
}
|
||
}
|
||
}
|
||
/// <summary>
|
||
/// 保存(新增、修改)
|
||
/// </summary>
|
||
/// <param name="keyValue">主键值</param>
|
||
/// <param name="newsEntity">公告实体</param>
|
||
/// <returns></returns>
|
||
public void SaveEntity(string keyValue, NewsEntity newsEntity)
|
||
{
|
||
try
|
||
{
|
||
noticeService.SaveEntity(keyValue, newsEntity);
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
if (ex is ExceptionEx)
|
||
{
|
||
throw;
|
||
}
|
||
else
|
||
{
|
||
throw ExceptionEx.ThrowBusinessException(ex);
|
||
}
|
||
}
|
||
|
||
}
|
||
#endregion
|
||
}
|
||
}
|