1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- using Lottomat.Application.Code;
- using Lottomat.Application.Entity.LotteryNumberManage;
- using Lottomat.Application.IService.LotteryNumberManage;
- using Lottomat.Data.Repository;
- using Lottomat.Util.Extension;
- using Lottomat.Util.WebControl;
- using Newtonsoft.Json.Linq;
- using System.Collections.Generic;
- using System.Linq;
- namespace Lottomat.Application.Service.LotteryNumberManage
- {
-
-
-
-
-
-
-
- public class LotteryGlossaryService : RepositoryFactory<LotteryGlossaryEntity>, ILotteryGlossaryService
- {
- #region 获取数据
-
-
-
-
-
-
- public IEnumerable<LotteryGlossaryEntity> GetPageList(Pagination pagination, string queryJson)
- {
- var expression = LinqExtensions.True<LotteryGlossaryEntity>();
- JObject queryParam = queryJson.ToJObject();
- if (queryParam != null)
- {
- if (!queryParam["Title"].IsEmpty())
- {
- string Title = queryParam["Title"].ToString();
- expression = expression.And(t => t.Title.Contains(Title));
- }
- }
- return this.BaseRepository(DatabaseLinksEnum.LotteryNumber).FindList(expression, pagination);
- }
-
-
-
-
-
- public IEnumerable<LotteryGlossaryEntity> GetList(string queryJson)
- {
- return this.BaseRepository(DatabaseLinksEnum.LotteryNumber).IQueryable().ToList();
- }
-
-
-
-
-
- public LotteryGlossaryEntity GetEntity(string keyValue)
- {
- return this.BaseRepository(DatabaseLinksEnum.LotteryNumber).FindEntity(keyValue);
- }
- #endregion
- #region 提交数据
-
-
-
-
- public void RemoveForm(string keyValue)
- {
- this.BaseRepository().Delete(keyValue);
- }
-
-
-
-
-
-
- public void SaveForm(string keyValue, LotteryGlossaryEntity entity)
- {
- if (!string.IsNullOrEmpty(keyValue))
- {
- entity.Modify(keyValue);
- this.BaseRepository().Update(entity);
- }
- else
- {
- entity.Create();
- this.BaseRepository().Insert(entity);
- }
- }
- #endregion
- }
- }
|