using Lottomat.Application.Entity.BaseManage; using Lottomat.Application.IService.BaseManage; using Lottomat.Application.Service.BaseManage; using Lottomat.Util.WebControl; using System; using System.Linq; using System.Collections.Generic; using Lottomat.Cache.Factory; namespace Lottomat.Application.Busines.BaseManage { /// /// 版 本 /// Copyright (c) 2016-2017 /// 创建人:赵轶 /// 日 期:2015.11.4 14:31 /// 描 述:岗位管理 /// public class PostBLL { private IPostService service = new PostService(); /// /// 缓存key /// public string cacheKey = "PostCache"; #region 获取数据 /// /// 岗位列表 /// /// public IEnumerable GetList() { return service.GetList(); } /// /// 岗位列表 /// /// 分页 /// 查询参数 /// public IEnumerable GetPageList(Pagination pagination, string queryJson) { return service.GetPageList(pagination, queryJson); } /// /// 岗位列表(ALL) /// /// public List GetAllList() { return service.GetAllList().ToList(); } /// /// 岗位实体 /// /// 主键值 /// public RoleEntity GetEntity(string keyValue) { return service.GetEntity(keyValue); } #endregion #region 验证数据 /// /// 岗位编号不能重复 /// /// 编号 /// 主键 /// public bool ExistEnCode(string enCode, string keyValue) { return service.ExistEnCode(enCode, keyValue); } /// /// 岗位名称不能重复 /// /// 名称 /// 主键 /// public bool ExistFullName(string fullName, string keyValue) { return service.ExistFullName(fullName, keyValue); } #endregion #region 提交数据 /// /// 删除岗位 /// /// 主键 public void RemoveForm(string keyValue) { try { service.RemoveForm(keyValue); CacheFactory.Cache().RemoveCache(cacheKey); } catch (Exception) { throw; } } /// /// 保存岗位表单(新增、修改) /// /// 主键值 /// 岗位实体 /// public void SaveForm(string keyValue, RoleEntity postEntity) { try { service.SaveForm(keyValue, postEntity); CacheFactory.Cache().RemoveCache(cacheKey); } catch (Exception) { throw; } } #endregion } }