public ActionResult CreateTest(TestViewModel test)
        {
            var testFromDomain = _advancedMapper.MapTestViewModel(test);

            _highLevelTestManagementService.CreateTest(testFromDomain);
            return(RedirectToAction("TestManagement", "Admin"));
        }
Exemple #2
0
        public ActionResult CreateTest(TestViewModel test)
        {
            if (ModelState.IsValid)
            {
                if (test.TestTimeLimit == null)
                {
                    test.TestTimeLimit = new TimeSpan().ToString();
                }
                if (test.QuestionTimeLimit == null)
                {
                    test.QuestionTimeLimit = new TimeSpan().ToString();
                }
                var testFromDomain = _advancedMapper.MapTestViewModel(test);
                _highLevelTestManagementService.CreateTest(testFromDomain);
                if (testFromDomain != null)
                {
                    return(RedirectToAction("TestManagement", "Admin"));
                }

                return(HttpNotFound());
            }
            return(View(test));
        }
Exemple #3
0
        public void CreateTest(TestViewModel test)
        {
            var testFromDomain = _advancedMapper.MapTestViewModel(test);

            _highLevelTestManagementService.CreateTest(testFromDomain);
        }