1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- using LeaRun.Application.Entity.PublicInfoManage;
- using LeaRun.Application.IService.PublicInfoManage;
- using LeaRun.Application.Service.PublicInfoManage;
- using LeaRun.Util;
- using LeaRun.Util.WebControl;
- using System;
- using System.Collections.Generic;
- namespace LeaRun.Application.Busines.PublicInfoManage
- {
- /// <summary>
- /// 版 本 6.1
- /// Copyright (c) 2013-2016 上海力软信息技术有限公司
- /// 创建人:佘赐雄
- /// 日 期:2015.12.7 16:40
- /// 描 述:电子公告
- /// </summary>
- public class NoticeBLL
- {
- private INoticeService service = new NoticeService();
- #region 获取数据
- /// <summary>
- /// 公告列表
- /// </summary>
- /// <param name="pagination">分页</param>
- /// <param name="queryJson">查询参数</param>
- /// <returns></returns>
- public IEnumerable<NewsEntity> GetPageList(Pagination pagination, string queryJson)
- {
- return service.GetPageList(pagination, queryJson);
- }
- /// <summary>
- /// 公告实体
- /// </summary>
- /// <param name="keyValue">主键值</param>
- /// <returns></returns>
- public NewsEntity GetEntity(string keyValue)
- {
- NewsEntity newsEntity = service.GetEntity(keyValue);
- newsEntity.NewsContent = WebHelper.HtmlDecode(newsEntity.NewsContent);
- return newsEntity;
- }
- #endregion
- #region 提交数据
- /// <summary>
- /// 删除公告
- /// </summary>
- /// <param name="keyValue">主键</param>
- public void RemoveForm(string keyValue)
- {
- try
- {
- service.RemoveForm(keyValue);
- }
- catch (Exception)
- {
- throw;
- }
- }
- /// <summary>
- /// 保存公告表单(新增、修改)
- /// </summary>
- /// <param name="keyValue">主键值</param>
- /// <param name="newsEntity">公告实体</param>
- /// <returns></returns>
- public void SaveForm(string keyValue, NewsEntity newsEntity)
- {
- try
- {
- newsEntity.NewsContent = WebHelper.HtmlEncode(newsEntity.NewsContent);
- service.SaveForm(keyValue, newsEntity);
- }
- catch (Exception)
- {
- throw;
- }
- }
- #endregion
- }
- }
|