Exemplo n.º 1
0
        private async Task UserPermissionInfo(int RoleId)
        {
            try
            {
                RestStatus status = await RestHub.UserPermissionsInfo(RoleId);

                if (status.HttpCode == System.Net.HttpStatusCode.OK)
                {
                    UserInfoDTO userInfoDTO = (UserInfoDTO)status.UserObject;
                    U.CanApprove = userInfoDTO.canApprove;
                    U.CanReject  = userInfoDTO.canReject;
                    U.CanSubmit  = userInfoDTO.canSubmit;
                }
                else
                {
                    AppErrorBox.ShowErrorMessage("Unable to load user permission", status.StatusMessage);
                }
            }
            catch (Exception ex)
            {
                Log.This(ex);
            }
        }