/**
         * <summary>
         * Shows a form for student information.
         * </summary>
         * */
        public ActionResult StudentInformation()
        {
            // Is the lottery closed?
            if (IsLotteryClosed()) // TODO implement this as an class-level annotation instead
            {
                return(RedirectToAction(actionName: "LotteryClosed"));
            }

            // Add display variables to the ViewBag
            viewHelper.PrepareStudentInformationView(ViewBag);

            // Create an applicant in the database
            var applicant = GetSessionApplicant();

            return(View(applicant));
        }
Esempio n. 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);
 }