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