예제 #1
0
        /// <summary>
        /// Helps display the summary of student compositions for all school years at usf
        /// </summary>
        /// <returns></returns>
        public ActionResult History(int id = 0)
        {
            Business.StudentComposition      stuComp = new Business.StudentComposition();
            List <Models.StudentComposition> pAvailableStudentCompostions = new List <Models.StudentComposition>();

            if (id > 0)
            {
                Models.StudentComposition vStudentCompositionByYr = new Models.StudentComposition();
                vStudentCompositionByYr = stuComp.GetStudentCompositionBySchYrFromDb(id);
                pAvailableStudentCompostions.Add(vStudentCompositionByYr);
            }
            else
            {
                pAvailableStudentCompostions = stuComp.GetStudentCompositionByYrAll();
            }

            DistributedInformationSystems.Business.SchoolYear pSchYr = new Business.SchoolYear();
            List <Models.SchoolYear> AvailableSchoolYears            = pSchYr.GetSchoolYears();

            HistoryViewModel demoHistory = new HistoryViewModel();

            demoHistory.StudentCompHistory    = pAvailableStudentCompostions;
            demoHistory.pAvailableSchoolYears = AvailableSchoolYears;

            return(View(demoHistory));
        }
예제 #2
0
        public ActionResult GenerateData()
        {
            GenerateDataViewModel generateData = new GenerateDataViewModel();

            Business.StudentComposition      stuComp = new Business.StudentComposition();
            List <Models.StudentComposition> pAvailableStudentCompostions = new List <Models.StudentComposition>();

            pAvailableStudentCompostions = stuComp.GetStudentCompositionByYrAll();
            if (pAvailableStudentCompostions.Count > 0)
            {
                generateData.RecordsAvailable = true;
            }
            return(View(generateData));
        }