12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- using System;
- using Lottomat.Application.Entity.InformationManage;
- using Lottomat.Application.IService.InformationManage;
- using Lottomat.Data.Repository;
- using Lottomat.Util.WebControl;
- using System.Collections.Generic;
- using System.Linq;
- using System.Linq.Expressions;
- namespace Lottomat.Application.Service.InformationManage
- {
- /// <summary>
- /// 版 本 1.0
- /// Copyright (c) 2016-2017
- /// 创 建:超级管理员
- /// 日 期:2017-10-26 10:53
- /// 描 述:彩吧走势图
- /// </summary>
- public class TrendChartService : RepositoryFactory<TrendChartEntity>, ITrendChartService
- {
- private ITrendChartService _trendChartServiceImplementation;
- #region 获取数据
- /// <summary>
- /// 获取列表
- /// </summary>
- /// <param name="pagination">分页</param>
- /// <param name="queryJson">查询参数</param>
- /// <returns>返回分页列表</returns>
- public IEnumerable<TrendChartEntity> GetPageList(Pagination pagination, string queryJson)
- {
- return this.BaseRepository().FindList(pagination);
- }
- public IEnumerable<TrendChartEntity> GetList(Expression<Func<TrendChartEntity, bool>> condition)
- {
- return this.BaseRepository().FindList(condition);
- }
- /// <summary>
- /// 获取列表
- /// </summary>
- /// <param name="queryJson">查询参数</param>
- /// <returns>返回列表</returns>
- public IEnumerable<TrendChartEntity> GetList(string queryJson)
- {
- return this.BaseRepository().IQueryable().ToList();
- }
- /// <summary>
- /// 获取实体
- /// </summary>
- /// <param name="keyValue">主键值</param>
- /// <returns></returns>
- public TrendChartEntity GetEntity(string keyValue)
- {
- return this.BaseRepository().FindEntity(keyValue);
- }
- #endregion
- #region 提交数据
- /// <summary>
- /// 删除数据
- /// </summary>
- /// <param name="keyValue">主键</param>
- public void RemoveForm(string keyValue)
- {
- this.BaseRepository().Delete(keyValue);
- }
- /// <summary>
- /// 保存表单(新增、修改)
- /// </summary>
- /// <param name="keyValue">主键值</param>
- /// <param name="entity">实体对象</param>
- /// <returns></returns>
- public void SaveForm(string keyValue, TrendChartEntity entity)
- {
- if (!string.IsNullOrEmpty(keyValue))
- {
- entity.Modify(keyValue);
- this.BaseRepository().Update(entity);
- }
- else
- {
- entity.Create();
- this.BaseRepository().Insert(entity);
- }
- }
- #endregion
- }
- }
|