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