async Task <(bool, SurveyResponseDTO)> SaveSingleChoiceResponse() { if (SingleOptionAnswer == Guid.Empty) { ValidationMessage = "Please select a response"; return(false, null); } var cmd = new SurveyResponseSingleOptionResponseCmd(SurveyResponse.SurveyResponseId, Response.Question.QuestionId, SingleOptionAnswer); var response = await SurveyResponseClient.SingleOptionResponse(cmd); if (response.Result == CommandSubmitExecutionResult.Fail) { ValidationMessage = response.Messages.FirstOrDefault(); return(false, null); } return(true, response.EntityQry); }
public async Task <CommandSubmitResult <SurveyResponseDTO> > SingleOptionResponse(SurveyResponseSingleOptionResponseCmd cmd) { string url = $"{_baseUrl}addsingleoptionresponse"; return(await PostCmd(cmd, url)); }