コード例 #1
0
        public async Task OnDeleteClick()
        {
            var cmd    = new SurveyDefinitionRemoveSurveyItemCmd(survey.SurveyId, section.SectionId);
            var result = await SurveyClient.DeleteSurveyItem(cmd);

            if (result.Result == CommandSubmitExecutionResult.OK)
            {
                UriHelper.NavigateTo($"editsurvey/");
            }
            else
            {
                ValidationMessage = result.Messages.FirstOrDefault();
            }
        }
コード例 #2
0
        public async Task DeleteQuestion(SurveyQuestionEditDTO question)
        {
            var cmd    = new SurveyDefinitionRemoveSurveyItemCmd(survey.SurveyId, question.QuestionId);
            var result = await SurveyClient.DeleteSurveyItem(cmd);

            string m = result.Messages.FirstOrDefault();

            Console.WriteLine($"Delete Question : {result.Result} - {m} ");
            if (result.Result == CommandSubmitExecutionResult.OK)
            {
                survey = result.EntityQry;
                StateHasChanged();
            }
        }