예제 #1
0
        /// <summary>
        /// clear role resource
        /// </summary>
        /// <param name="entity"></param>
        public void ClearRoleResourceList(RoleResourceEntity entity)
        {
            int roleID = entity.RoleID;

            try
            {
                var param = new DynamicParameters();
                param.Add("@roleID", roleID);
                QuickRepository.ExecuteProc("dbo.pr_sys_RoleResourceListClear", param);
            }
            catch (System.Exception ex)
            {
                throw;
            }
        }
예제 #2
0
        public ResponseResult ClearRoleResourceList(RoleResourceEntity entity)
        {
            var result = ResponseResult.Default();

            try
            {
                var resourceService = new PermissionService();
                resourceService.ClearRoleResourceList(entity);

                result = ResponseResult.Success();
            }
            catch (System.Exception ex)
            {
                result = ResponseResult.Error(string.Format("清除角色资源授权数据失败!{0}", ex.Message));
            }
            return(result);
        }