123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- using Lottomat.Application.Entity.AttachmentManage;
- using Lottomat.Application.IService.AttachmentManage;
- using Lottomat.Data.Repository;
- using Lottomat.Util.WebControl;
- using System.Collections.Generic;
- using System.Linq;
- namespace Lottomat.Application.Service.AttachmentManage
- {
-
-
-
-
-
-
-
- public class AttachmentService : RepositoryFactory<AttachmentEntity>, AttachmentIService
- {
- #region 获取数据
-
-
-
-
-
-
- public IEnumerable<AttachmentEntity> GetPageList(Pagination pagination, string queryJson)
- {
- return this.BaseRepository().FindList(pagination);
- }
-
-
-
-
-
- public IEnumerable<AttachmentEntity> GetList(string queryJson)
- {
- return this.BaseRepository().IQueryable().ToList();
- }
-
-
-
-
-
- public AttachmentEntity GetEntity(string keyValue)
- {
- return this.BaseRepository().FindEntity(keyValue);
- }
- #endregion
- #region 提交数据
-
-
-
-
- public void RemoveForm(string keyValue)
- {
- this.BaseRepository().Delete(keyValue);
- }
-
-
-
-
-
-
- public void SaveForm(string keyValue, AttachmentEntity entity)
- {
- if (!string.IsNullOrEmpty(keyValue))
- {
- entity.Modify(keyValue);
- this.BaseRepository().Update(entity);
- }
- else
- {
- entity.Create();
- this.BaseRepository().Insert(entity);
- }
- }
-
-
-
-
-
- public AttachmentEntity AddOne(AttachmentEntity entity)
- {
- entity.Create();
- int rel = this.BaseRepository().Insert(entity);
- return entity;
- }
- #endregion
- }
- }
|