示例#1
0
        public ResponseResult <List <UserResourcePermissionView> > RetrieveUserResourceList(ResourceQuery query)
        {
            var result = ResponseResult <List <UserResourcePermissionView> > .Default();

            try
            {
                var resourceService = new ResourceDataService();
                var permissionList  = resourceService.RetrieveUserResourceList(query.UserID);

                result = ResponseResult <List <UserResourcePermissionView> > .Success(permissionList);
            }
            catch (System.Exception ex)
            {
                result = ResponseResult <List <UserResourcePermissionView> > .Error(
                    string.Format("获取用户资源权限数据失败!{0}", ex.Message)
                    );
            }
            return(result);
        }