예제 #1
0
        public ActionResult ChooseTermForTimetable()
        {
            TermPicker termPicker = new TermPicker();

            // for development only
            termPicker.TermOptions = dao.GetTermOptions(new DateTime(), new DateTime(9999, 12, 31));

            // for production
            //DateTime today = DateTime.Today;
            //DateTime fromDate = today.AddDays(-30);
            //DateTime toDate = today.AddMonths(5);
            //termPicker.TermOptions = dao.GetTermOptions(fromDate, toDate);

            return(View(termPicker));
        }
예제 #2
0
        public ActionResult EditProgramRegistration(int StudentId, int ProgramId)
        {
            ProgramRegistration model = new ProgramRegistration();

            model.StudentId      = StudentId;
            model.ProgramId      = ProgramId;
            model.ProgramOptions = dao.GetProgramOptions();

            DateTime today    = DateTime.Today;
            DateTime fromDate = today.AddDays(-30);
            DateTime toDate   = today.AddMonths(5);

            model.TermOptions = dao.GetTermOptions(fromDate, toDate);

            Session["TermOptions"]    = model.TermOptions;
            Session["ProgramOptions"] = model.ProgramOptions;

            return(View(model));
        }