public ActionResult CreateQuestion(string testGuid, QuestionViewModel question) { var testQuestion = _mapper.Map <TestQuestion>(question); _lowLevelTestManagementService.CreateQuestionForTest(testGuid, testQuestion); return(RedirectToAction("TestManagement", "Admin")); }
public ActionResult CreateQuestion(string testGuid, QuestionViewModel question) { if (ModelState.IsValid) { if (testGuid != null && question != null) { var testQuestion = _mapper.Map <TestQuestion>(question); _lowLevelTestManagementService.CreateQuestionForTest(testGuid, testQuestion); return(RedirectToAction("GetQuestionsByTestGuid", "Testing", new { TestGuid = testGuid })); } return(HttpNotFound()); } return(View(question)); }
public ActionResult CreateQuestion(string testGuid, ModelAndInfo <QuestionViewModel> model) { if (ModelState.IsValid) { if (testGuid != null) { var testQuestion = _mapper.Map <TestQuestion>(model.TransferModel); _lowLevelTestManagementService.CreateQuestionForTest(testGuid, testQuestion); return(RedirectToAction(actionName: "GetQuestionsByTestGuid", controllerName: "Test", routeValues: new { TestGuid = testGuid })); } return(HttpNotFound()); } return(View(model)); }
public void CreateQuestion(string testGuid, QuestionViewModel question) { var testQuestion = _mapper.Map <TestQuestion>(question); _lowLevelTestManagementService.CreateQuestionForTest(testGuid, testQuestion); }