コード例 #1
0
        public String RoleUser()
        {
            IUserService Us = new UserService();
            User         u  = new User();
            var          id = Int16.Parse(User.Identity.GetUserId());

            return(Ps.Get(t => t.Id == id).Role);
        }
コード例 #2
0
        public Result <List <President> > Get()
        {
            var result = new Result <List <President> >();

            try
            {
                result.Data = _presidentService.Get();
                return(result);
            }
            catch (Exception ex)
            {
                log.Error(string.Concat("Get() President application Error:: ", ex.Message, ex.StackTrace));
                result.Error.Code    = ErrorCodes.InternalError;
                result.Error.Message = string.Concat(ErrorMessage.InternalError, " :: ", ex.Message);
                result.Error.Type    = ErrorTypes.Error;
                return(result);
            }
        }