Ejemplo n.º 1
0
        async Task <(bool, SurveyResponseDTO)> SaveRatingResponse()
        {
            //validation necessary - will always be in range of values?
            var cmd = new SurveyResponseRatingResponseCmd(SurveyResponse.SurveyResponseId,
                                                          Response.Question.QuestionId,
                                                          RatingAnswer);
            var response = await SurveyResponseClient.RatingResponse(cmd);

            if (response.Result == CommandSubmitExecutionResult.Fail)
            {
                ValidationMessage = response.Messages.FirstOrDefault();
                return(false, null);
            }
            return(true, response.EntityQry);
        }
Ejemplo n.º 2
0
        public async Task <CommandSubmitResult <SurveyResponseDTO> > RatingResponse(SurveyResponseRatingResponseCmd cmd)
        {
            string url = $"{_baseUrl}addratingresponse";

            return(await PostCmd(cmd, url));
        }