コード例 #1
0
        public virtual ActionResult Student04(StudentSurveyPost2WeeksViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

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

            return(RedirectToAction(MVC.FillPerfect.Feedback.SurveyCompleted(GetFpCompletedSurveyCount(model.FpUserId))));
        }
コード例 #2
0
        public virtual ActionResult Student04(string fpUserId)
        {
            var model = new StudentSurveyPost2WeeksViewModel {
                FpUserId = fpUserId
            };

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

            return(View(model));
        }