private QuestionAnswersModel CreateQuestionAnswersModel(QuestionAnswersDto question) { var model = new QuestionAnswersModel { Body = question.Body, Creationdate = question.Creationdate, Score = question.Score }; return(model); }
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)); }
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); }); }