Exemplo n.º 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;
            }
        }
Exemplo n.º 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);
        }