Ejemplo n.º 1
0
        public virtual ActionResult Student01(string fpUserId)
        {
            var model = new StudentSurveyPost3ViewModel { FpUserId = fpUserId };
            if (HasUserFilledOutSurvey(model.QuestionId, fpUserId))
                return RedirectToAction(MVC.FillPerfect.Feedback.SurveyCompleted(GetFpCompletedSurveyCount(fpUserId)));

            return View(model);
        }
Ejemplo n.º 2
0
        public virtual ActionResult Student01(StudentSurveyPost3ViewModel model)
        {
            if (!ModelState.IsValid)
                return View(model);

            _context.FpSurveyResponses.Add(model.CreateSurveyResponse);
            _context.SaveChanges();

            return RedirectToAction(MVC.FillPerfect.Feedback.SurveyCompleted(GetFpCompletedSurveyCount(model.FpUserId)));
        }
Ejemplo n.º 3
0
        public virtual ActionResult Student01(StudentSurveyPost3ViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            _context.FpSurveyResponses.Add(model.CreateSurveyResponse);
            _context.SaveChanges();

            return(RedirectToAction(MVC.FillPerfect.Feedback.SurveyCompleted(GetFpCompletedSurveyCount(model.FpUserId))));
        }
Ejemplo n.º 4
0
        public virtual ActionResult Student01(string fpUserId)
        {
            var model = new StudentSurveyPost3ViewModel {
                FpUserId = fpUserId
            };

            if (HasUserFilledOutSurvey(model.QuestionId, fpUserId))
            {
                return(RedirectToAction(MVC.FillPerfect.Feedback.SurveyCompleted(GetFpCompletedSurveyCount(fpUserId))));
            }

            return(View(model));
        }