using Learun.Util; using System; using System.Collections.Generic; namespace Learun.Application.OA { /// /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 /// Copyright (c) 2013-2018 北京泉江科技有限公司 /// 创建人:陈彬彬 /// 日 期:2017.04.17 /// 描 述:公告管理 /// public class NoticeBLL : NoticeIBLL { private NoticeService noticeService = new NoticeService(); #region 获取数据 /// /// 公告列表 /// /// 分页参数 /// 关键词 /// public IEnumerable 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 NewsEntity GetEntity(string keyValue) { try { return noticeService.GetEntity(keyValue); } catch (Exception ex) { if (ex is ExceptionEx) { throw; } else { throw ExceptionEx.ThrowBusinessException(ex); } } } #endregion #region 提交数据 /// /// 删除 /// /// 主键 public void DeleteEntity(string keyValue) { try { noticeService.DeleteEntity(keyValue); } catch (Exception ex) { if (ex is ExceptionEx) { throw; } else { throw ExceptionEx.ThrowBusinessException(ex); } } } /// /// 保存(新增、修改) /// /// 主键值 /// 公告实体 /// 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 扩展数据 /// /// 公告列表 /// /// 关键词 /// public IEnumerable 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 } }