Esempio n. 1
0
        public Response <List <string> > LoadForUser(string userId)
        {
            var result = new Response <List <string> > ();

            try {
                result.Result = _revelanceManagerApp.Get(Define.USERROLE, true, userId);
            } catch (Exception e) {
                result.Code    = 500;
                result.Message = e.InnerException?.Message ?? e.Message;
            }

            return(result);
        }
Esempio n. 2
0
        /// <summary>
        /// 加载用户的角色
        /// </summary>
        public string LoadForUser(string userId)
        {
            try
            {
                var result = new Response <List <string> >
                {
                    Result = _revelanceManagerApp.Get(Define.USERROLE, true, userId)
                };
                return(JsonHelper.Instance.Serialize(result));
            }
            catch (Exception e)
            {
                Result.Code    = 500;
                Result.Message = e.InnerException?.Message ?? e.Message;
            }

            return(JsonHelper.Instance.Serialize(Result));
        }