Example #1
0
 public SysUserInfoBLL(ISysUserInfoDAL sysUserInfoDAL, ISysRoleBLL sysRoleBLL, ILogger <SysUserInfoBLL> logger, ICurrencyClient client, IBaseDAL baseDAL) : base(baseDAL)
 {
     _sysUserInfoDAL = sysUserInfoDAL;
     _sysRoleBLL     = sysRoleBLL;
     _logger         = logger;
     _client         = client;
 }
Example #2
0
 public SysPermissionBLL(ISysUserInfoBLL sysUserInfoBLL, ISysRoleBLL sysRoleBLL, ISysUserInfoDAL sysUserInfoDAL, ISysRoleDAL sysRoleDAL, IBaseDAL baseDAL) : base(baseDAL)
 {
     _sysUserInfoBLL = sysUserInfoBLL;
     _sysRoleBLL     = sysRoleBLL;
     _sysUserInfoDAL = sysUserInfoDAL;
     _sysRoleDAL     = sysRoleDAL;
 }
Example #3
0
 /// <summary>
 /// 根据关键字段的值获取记录
 /// </summary>
 /// <param name="Id">关键字段的值</param>
 /// <returns>符合查询条件的记录</returns>
 public SysRole GetSysRoleById(string Id)
 {
     using (ISysRoleBLL SysRoleBLL = BLLContainer.Resolve <ISysRoleBLL>())
     {
         SysRole model = SysRoleBLL.GetFirstOrDefault(Id);
         return(model);
     }
 }
Example #4
0
        /// <summary>
        /// 返回记录总数 配合分页查询用
        /// </summary>
        /// <param name="sWhere">查询条件;多条件是目前只支持 and;表达式 System.Linq.Dynamic的形式</param>
        /// <returns>符合查询条件的记录数</returns>
        public int GetSysRoleCount(string sWhere)
        {
            Expression <Func <SysRole, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <SysRole>(sWhere);

            using (ISysRoleBLL SysRoleBLL = BLLContainer.Resolve <ISysRoleBLL>())
            {
                return(SysRoleBLL.GetCount(whereLamda));
            }
        }
Example #5
0
 public HomeController(ISysUserInfoBLL sysUserInfoBLL, ISysRoleBLL sysRoleBLL, ISysPermissionBLL sysPermissionBLL,
                       ILogger <HomeController> logger, ICurrencyClient client)
 {
     _sysUserInfoBLL   = sysUserInfoBLL;
     _sysRoleBLL       = sysRoleBLL;
     _sysPermissionBLL = sysPermissionBLL;
     _logger           = logger;
     _client           = client;
 }
Example #6
0
        /// <summary>
        /// 根据查询条件获取记录
        /// </summary>
        /// <param name="sWhere">查询条件;多条件是目前只支持 and;表达式 System.Linq.Dynamic的形式</param>
        /// <returns>符合查询条件的List</returns>
        public List <SysRole> GetSysRoles(string sWhere)
        {
            Expression <Func <SysRole, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <SysRole>(sWhere);

            using (ISysRoleBLL SysRoleBLL = BLLContainer.Resolve <ISysRoleBLL>())
            {
                List <SysRole> models = SysRoleBLL.GetModels(whereLamda);
                return(models);
            }
        }
Example #7
0
 /// <summary>
 /// 修改
 /// </summary>
 /// <param name="mSysRole">模型</param>
 /// <returns>是否成功</returns>
 public bool UpdateSysRole(SysRole mSysRole)
 {
     if (mSysRole == null)
     {
         return(false);
     }
     using (ISysRoleBLL SysRoleBLL = BLLContainer.Resolve <ISysRoleBLL>())
     {
         return(SysRoleBLL.Update(mSysRole));
     }
 }
Example #8
0
 /// <summary>
 /// 按照关键字段删除
 /// </summary>
 /// <param name="Id">关键字段</param>
 /// <returns>是否成功</returns>
 public bool DelSysRole(string Id)
 {
     using (ISysRoleBLL SysRoleBLL = BLLContainer.Resolve <ISysRoleBLL>())
     {
         try
         {
             SysRole item = SysRoleBLL.GetFirstOrDefault(Id);
             return(SysRoleBLL.Delete(item));
         }
         catch { return(false); }
     }
 }
Example #9
0
 /// <summary>
 /// 按照关键字段删除
 /// </summary>
 /// <param name="Ids">关键字段数组</param>
 /// <returns>是否成功</returns>
 public bool DelSysRoles(string[] Ids)
 {
     using (ISysRoleBLL SysRoleBLL = BLLContainer.Resolve <ISysRoleBLL>())
     {
         try
         {
             List <SysRole> entitys = new List <SysRole>();
             foreach (string id in Ids)
             {
                 SysRole item = SysRoleBLL.GetFirstOrDefault(id);
                 entitys.Add(item);
             }
             return(SysRoleBLL.Delete(entitys));
         }
         catch { return(false); }
     }
 }
Example #10
0
        /// <summary>
        /// 分页查询
        /// </summary>
        /// <param name="pageSize">单页的记录数</param>
        /// <param name="pageIndex">页码</param>
        /// <param name="isAsc">是否正序排序</param>
        /// <param name="orderField">排序字段 为空时默认为 CREATION_DATE </param>
        /// <param name="sWhere">查询条件;多条件是目前只支持 and;表达式 System.Linq.Dynamic的形式</param>
        /// <returns>符合查询条件的List结果</returns>
        public List <SysRole> GetSysRoleByPage(int pageSize, int pageIndex, bool isAsc, string orderField, string sWhere)
        {
            string orderStr = "";

            if (string.IsNullOrEmpty(orderField))
            {
                orderStr = "CREATION_DATE";
            }
            else
            {
                orderStr = orderField;
            }
            Expression <Func <SysRole, bool> > whereLamda = SerializerHelper.ConvertParamWhereToLinq <SysRole>(sWhere);

            using (ISysRoleBLL SysRoleBLL = BLLContainer.Resolve <ISysRoleBLL>())
            {
                List <SysRole> models = SysRoleBLL.GetModelsByPage(pageSize, pageIndex, isAsc, orderStr, whereLamda);
                return(models);
            }
        }
 public SysRoleController(ISysRoleBLL SysRoleBLL, ISysLogBLL SysLogBLL)
 {
     this.m_BLL = SysRoleBLL;
     this.m_Log = SysLogBLL;
 }
Example #12
0
 public RoleController(ISysRoleBLL sysRoleBLL, UserAccount userAccount, ISysMenuBLL sysMenuBLL)
 {
     _sysRoleBLL  = sysRoleBLL;
     _userAccount = userAccount;
     _sysMenuBLL  = sysMenuBLL;
 }
Example #13
0
 /// <summary>
 /// 用于实例化父级,sysAuthorityDAL
 /// </summary>
 /// <param name="sysAuthorityDAL"></param>
 public SysAuthorityBLL(ISysAuthorityDAL sysAuthorityDAL, ISysRoleBLL sysRoleBLL) : base(sysAuthorityDAL)
 {
     this.sysAuthorityDAL = sysAuthorityDAL;
     this.sysRoleBLL      = sysRoleBLL;
 }
 public SysRightController(ISysRightBLL SysRightBLL, ISysRoleBLL SysRoleBLL, ISysModuleBLL SysModuleBLL)
 {
     this.sysRightBLL = SysRightBLL;
     this.sysRoleBLL = SysRoleBLL;
     this.sysModuleBLL = SysModuleBLL;
 }