public virtual ActionResult Student02(StudentSurveyPost5ViewModel model) { if (!ModelState.IsValid) { return(View(model)); } _context.FpSurveyResponses.Add(model.GetSurveyResponse); _context.SaveChanges(); return(RedirectToAction(MVC.FillPerfect.Feedback.SurveyCompleted(GetFpCompletedSurveyCount(model.FpUserId)))); }
public virtual ActionResult Student02(string fpUserId) { var model = new StudentSurveyPost5ViewModel { FpUserId = fpUserId }; if (HasUserFilledOutSurvey(model.QuestionId, fpUserId)) { return(RedirectToAction(MVC.FillPerfect.Feedback.SurveyCompleted(GetFpCompletedSurveyCount(fpUserId)))); } return(View(model)); }