コード例 #1
0
        private QuestionAnswersModel CreateQuestionAnswersModel(QuestionAnswersDto question)
        {
            var model = new QuestionAnswersModel
            {
                Body         = question.Body,
                Creationdate = question.Creationdate,
                Score        = question.Score
            };

            return(model);
        }
コード例 #2
0
        public async Task <IActionResult> QuestionAnswers(int id)
        {
            QuestionAnswersModel model = new QuestionAnswersModel();

            var test = await TestService.Test_GetAsync(id, true);

            model.TestId    = id;
            model.TestName  = test.Name;
            model.Questions = test.TestQuestions.Where(n => n.IsActive).ToList();

            return(View(model));
        }
コード例 #3
0
        public void AnswersAddSuccess(QuestionAnswersModel model)
        {
            handler.Post(() =>
            {
                if (dialog.IsShowing)
                {
                    dialog.Dismiss();
                }
                txtContent.Text = "";
                Toast.MakeText(this, Resources.GetString(Resource.String.addstatus_success), ToastLength.Short).Show();

                SetResult(Result.Ok);
                ActivityCompat.FinishAfterTransition(this);
            });
        }