123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- using LeaRun.Application.Entity.BaseManage;
- using LeaRun.Application.IService.BaseManage;
- using LeaRun.Application.Service.BaseManage;
- using LeaRun.Cache.Factory;
- using LeaRun.Util.WebControl;
- using System;
- using System.Collections.Generic;
- namespace LeaRun.Application.Busines.BaseManage
- {
- /// <summary>
- /// 版 本
- /// Copyright (c) 2013-2016 上海力软信息技术有限公司
- /// 创建人:佘赐雄
- /// 日 期:2015.11.4 14:31
- /// 描 述:职位管理
- /// </summary>
- public class JobBLL
- {
- private IJobService service = new JobService();
- /// <summary>
- /// 缓存key
- /// </summary>
- public string cacheKey = "JobCache";
- #region 获取数据
- /// <summary>
- /// 职位列表
- /// </summary>
- /// <returns></returns>
- public IEnumerable<RoleEntity> GetList()
- {
- return service.GetList();
- }
- /// <summary>
- /// 职位列表
- /// </summary>
- /// <param name="pagination">分页</param>
- /// <param name="queryJson">查询参数</param>
- /// <returns></returns>
- public IEnumerable<RoleEntity> GetPageList(Pagination pagination, string queryJson)
- {
- return service.GetPageList(pagination, queryJson);
- }
- /// <summary>
- /// 职位实体
- /// </summary>
- /// <param name="keyValue">主键值</param>
- /// <returns></returns>
- public RoleEntity GetEntity(string keyValue)
- {
- return service.GetEntity(keyValue);
- }
- #endregion
- #region 验证数据
- /// <summary>
- /// 职位编号不能重复
- /// </summary>
- /// <param name="enCode">编号</param>
- /// <param name="keyValue">主键</param>
- /// <returns></returns>
- public bool ExistEnCode(string enCode, string keyValue)
- {
- return service.ExistEnCode(enCode, keyValue);
- }
- /// <summary>
- /// 职位名称不能重复
- /// </summary>
- /// <param name="fullName">名称</param>
- /// <param name="keyValue">主键</param>
- /// <returns></returns>
- public bool ExistFullName(string fullName, string keyValue)
- {
- return service.ExistFullName(fullName, keyValue);
- }
- #endregion
- #region 提交数据
- /// <summary>
- /// 删除职位
- /// </summary>
- /// <param name="keyValue">主键</param>
- public void RemoveForm(string keyValue)
- {
- try
- {
- service.RemoveForm(keyValue);
- CacheFactory.Cache().RemoveCache(cacheKey);
- }
- catch (Exception)
- {
- throw;
- }
- }
- /// <summary>
- /// 保存职位表单(新增、修改)
- /// </summary>
- /// <param name="keyValue">主键值</param>
- /// <param name="jobEntity">职位实体</param>
- /// <returns></returns>
- public void SaveForm(string keyValue, RoleEntity jobEntity)
- {
- try
- {
- service.SaveForm(keyValue, jobEntity);
- CacheFactory.Cache().RemoveCache(cacheKey);
- }
- catch (Exception)
- {
- throw;
- }
- }
- #endregion
- }
- }
|