/**
         * <summary>
         * Display a form asking for which schools the applicant wants to enter their child.
         * </summary>
         * */
        public ActionResult SchoolSelection()
        {
            // Is the lottery closed?
            if (IsLotteryClosed()) // TODO implement this as an class-level annotation instead
            {
                return(RedirectToAction(actionName: "LotteryClosed"));
            }

            // Validate the session
            if (!IsActiveSession()) //TODO Do this with AOP/Annotations instead
            {
                return(RedirectToAction("Index"));
            }

            // Setup view variables
            var applicant = GetSessionApplicant();

            viewHelper.PrepareSchoolSelectionView(ViewBag, applicant);

            // Display the form
            return(View(applicant));
        }
Beispiel #2
0
 /**
  * <summary>
  * Prepares the view for editing an applicant by populating variables
  * in the ViewBag.
  * </summary>
  *
  * <param name="applicant">The applicant who's data should be populated into the view</param>
  **/
 private void PrepareEditApplicantView(Applicant applicant)
 {
     viewHelper.PrepareStudentInformationView(ViewBag, false);
     viewHelper.PrepareGuardianInformationView(ViewBag);
     viewHelper.PrepareSchoolSelectionView(ViewBag, applicant);
 }