|
- 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 NewsBLL : NewsIBLL
- {
-
- private NewsService newsService = new NewsService();
-
- #region 获取数据
- /// <summary>
- /// 新闻列表
- /// </summary>
- /// <param name="pagination">分页参数</param>
- /// <param name="categoryId">类型</param>
- /// <param name="keyword">关键词</param>
- /// <returns></returns>
- public IEnumerable<NewsEntity> GetPageList(Pagination pagination,string keyword)
- {
- try
- {
- return newsService.GetPageList(pagination, keyword);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
- public IEnumerable<NewsEntity> GetAboutSchool()
- {
- try
- {
- return newsService.GetAboutSchool();
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
- public IEnumerable<NewsEntity> GetNews()
- {
- try
- {
- return newsService.GetNews();
- }
- 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 newsService.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
- {
- newsService.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
- {
- newsService.SaveEntity(keyValue, newsEntity);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- public void ChangeStatusByProcessId(string parameterProcessId, int p1)
- {
- try
- {
- newsService.ChangeStatusByProcessId(parameterProcessId, p1);
- }
- catch (Exception ex)
- {
- if (ex is ExceptionEx)
- {
- throw;
- }
- else
- {
- throw ExceptionEx.ThrowBusinessException(ex);
- }
- }
- }
-
- #endregion
- }
- }
|