|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226 |
- using Learun.Util;
- using System;
- using System.Collections.Generic;
-
- namespace Learun.Application.OA
- {
- /// <summary>
- /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
- /// Copyright (c) 2013-2018 北京泉江科技有限公司
- /// 创建人:陈彬彬
- /// 日 期: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);
- }
- }
- }
-
- public IEnumerable<NewsEntity> GetPageListRevert(Pagination pagination, string keyword)
- {
- try
- {
- return noticeService.GetPageListRevert(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);
- }
- }
- }
-
- public void RecycleForm(string keyValue,string status)
- {
- try
- {
- noticeService.RecycleForm(keyValue,status);
- }
- 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
- #region 扩展数据
-
- /// <summary>
- /// 公告列表
- /// </summary>
- /// <param name="keyword">关键词</param>
- /// <returns></returns>
- public IEnumerable<NewsEntity> GetList(string keyword, string userId, string categoryId = null)
- {
- try
- {
- return noticeService.GetList(keyword, userId, categoryId);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- #endregion
-
- #region 流程
- public void ChangeStatusById(string keyValue, int status, string processId)
- {
- try
- {
- noticeService.ChangeStatusById(keyValue, status, processId);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- public NewsEntity GetEntityByProcessId(string processId)
- {
- try
- {
- return noticeService.GetEntityByProcessId(processId);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- #endregion
- }
- }
|