Esempio n. 1
0
        private async void SubmitQuestion()
        {
            Task task = Task.Run(async() =>
            {
                var _question = await SweetAlertMessage.InputDialog(type: "textarea", PlaceholderText: "Type your survey question here....");
                if (!string.IsNullOrEmpty(_question))
                {
                    var question = await QuestionRepository.AddQuestionAsync(new Coronassist.Web.Shared.Models.Question
                    {
                        SurveyQuestion = _question,
                        IsActive       = true,
                        SurveyId       = SurveyId
                    });

                    this.Survey.Questions.Add(question);
                    await SweetAlertMessage.SuccessMessage();
                    Open = false;
                    StateHasChanged();
                }
            });
        }