コード例 #1
0
        public ActionResult Assign()
        {
            var students = _psychologistManager.GetAllStudents();
            var surveys  = _psychologistManager.GetAllSurveys();

            AssignSurveyToStudentVM vm = new AssignSurveyToStudentVM
            {
                StudentsToAssign = new List <StudentToAssign>(),
                SurveysToAssign  = new List <Survey>(),
            };

            foreach (var student in students)
            {
                vm.StudentsToAssign.Add(new StudentToAssign
                {
                    Student  = student,
                    ToAssign = false,
                });
            }

            foreach (var survey in surveys)
            {
                vm.SurveysToAssign.Add(survey);
            }

            return(View(vm));
        }
コード例 #2
0
        public ActionResult RateSurveys()
        {
            var surveys = _psychologistManager.GetAllSurveys();

            return(View(surveys));
        }