示例#1
0
        public async Task <IActionResult> AddResponseUser(long requestId, string userId,
                                                          string message)
        {
            Result response;

            if (string.IsNullOrEmpty(userId))
            {
                response = new Result(ApplicationResources.UserInterface.Common.UserDoNotExist);
            }
            else
            {
                var user = await _userManager.FindByIdAsync(userId);

                if (user != null)
                {
                    response = await _requestService.AddResponseToRequestAsync(requestId,
                                                                               user.Id, user.UserName, message, false);
                }
                else
                {
                    response = new Result(ApplicationResources.UserInterface.Common.UserDoNotExist);
                }
            }

            return(Json(response));
        }