123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- using Lottomat.Application.Entity.InformationManage;
- using Lottomat.Application.IService.InformationManage;
- using Lottomat.Application.Service.InformationManage;
- using Lottomat.Util.WebControl;
- using System.Collections.Generic;
- using System;
- using System.Linq.Expressions;
- namespace Lottomat.Application.Busines.InformationManage
- {
- /// <summary>
- /// 版 本 1.0
- /// Copyright (c) 2016-2017
- /// 创 建:超级管理员
- /// 日 期:2018-01-05 14:54
- /// 描 述:广告管理
- /// </summary>
- public class AdvertisementBLL
- {
- private IAdvertisementService service = new AdvertisementService();
- #region 获取数据
- /// <summary>
- /// 获取列表
- /// </summary>
- /// <param name="pagination">分页</param>
- /// <param name="queryJson">查询参数</param>
- /// <returns>返回分页列表</returns>
- public IEnumerable<AdvertisementEntity> GetPageList(Pagination pagination, string queryJson)
- {
- return service.GetPageList(pagination, queryJson);
- }
- /// <summary>
- /// 获取列表
- /// </summary>
- /// <param name="query">查询参数</param>
- /// <returns>返回列表</returns>
- public IEnumerable<AdvertisementEntity> GetList(Expression<Func<AdvertisementEntity, bool>> query)
- {
- return service.GetList(query);
- }
- /// <summary>
- /// 获取实体
- /// </summary>
- /// <param name="keyValue">主键值</param>
- /// <returns></returns>
- public AdvertisementEntity GetEntity(string keyValue)
- {
- return service.GetEntity(keyValue);
- }
- /// <summary>
- /// 获取实体
- /// </summary>
- /// <param name="query">条件</param>
- /// <returns></returns>
- public AdvertisementEntity GetEntity(Expression<Func<AdvertisementEntity, bool>> query)
- {
- return service.GetEntity(query);
- }
- #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="entity">实体对象</param>
- /// <returns></returns>
- public void SaveForm(string keyValue, AdvertisementEntity entity)
- {
- try
- {
- service.SaveForm(keyValue, entity);
- }
- catch (Exception e)
- {
- Console.WriteLine(e.Message);
- throw;
- }
- }
- #endregion
- }
- }
|