예제 #1
0
        public ActionResult TestingUrlManagement()
        {
            var testingsList = _getInfoService.GetAllTestingUrls();

            var parsedTestingsList = testingsList.Select(t => _advancedMapper.MapTestingUrl(t)).ToList();

            return(View(parsedTestingsList));
        }
예제 #2
0
        public ActionResult Quiz(string guid)
        {
            var testUrlDomain = _getInfoService.GetTestingUrlByGuid(guid);
            var error         = _advancedLogicService.CheckTestingUrlForAvailability(testUrlDomain);

            if (!string.IsNullOrEmpty(error))
            {
                return(View("TestingErrorView", (object)error));
            }
            //if all is ok
            var testUrl = _advancedMapper.MapTestingUrl(testUrlDomain);
            var model   = new ModelAndInfo <TestingUrlViewModel>
            {
                TransferModel = testUrl,
                Guid          = guid
            };

            CurrentTest = new TestPassingViewModel()
            {
                TestingStartDateTime = DateTime.Now.ToString(),
                Interviewee          = testUrl.Interviewee,
                TestingGuid          = testUrl.TestGuid
            };
            return(View(model));
        }
예제 #3
0
        public JsonResult GetAllTestingUrls()
        {
            var testingsList = _getInfoService.GetAllTestingUrls();

            var parsedTestingsList = testingsList.Select(t => _advancedMapper.MapTestingUrl(t)).ToList();

            return(Json(parsedTestingsList, JsonRequestBehavior.AllowGet));
        }
예제 #4
0
        //public JsonResult GetAllTestingUrls()
        public IEnumerable <TestingUrlViewModel> GetAllTestingUrls()
        {
            var testingsList = _getInfoService.GetAllTestingUrls();

            var parsedTestingsList = testingsList.Select(t => _advancedMapper.MapTestingUrl(t)).ToList();

            return(parsedTestingsList);
            //return Json(parsedTestingsList, JsonRequestBehavior.AllowGet);
        }
예제 #5
0
        public ActionResult TestingUrlManagement()
        {
            var testingsList       = _getInfoService.GetAllTestingUrls();
            var parsedTestingsList = testingsList.Select(t => _advancedMapper.MapTestingUrl(t)).ToList();

            foreach (var test in parsedTestingsList)
            {
                test.UrlInstance = CreateUrlLink(test.Guid);
            }
            return(View(parsedTestingsList));
        }
예제 #6
0
        public ActionResult Quiz(string guid)
        {
            var testUrlDomain = _getInfoService.GetTestingUrlByGuid(guid);
            var error         = _advancedLogicService.CheckTestingUrlForAvailability(testUrlDomain);

            if (!string.IsNullOrEmpty(error))
            {
                return(View("TestingErrorView", (object)error));
            }
            //if all is ok
            var testUrl = _advancedMapper.MapTestingUrl(testUrlDomain);

            return(View(testUrl));
        }