Exemplo n.º 1
0
        public IActionResult Index(TeacherSubmitDTO data)
        {
            var            SClassDTO = new StudentClassesDTO();
            var            helper    = new ExcelHelper();
            List <HClass>  classes   = helper.GetAllClassesForTeacher(teacherName); //sub out data.Teacher for teacherName if you want hard-coded value
            List <Student> students  = helper.GetStudentsForClass(data.ClassRef);

            SClassDTO.classes  = classes;
            SClassDTO.students = students;
            return(View(SClassDTO));
        }
Exemplo n.º 2
0
        public IActionResult Index()
        {
            var           helper    = new ExcelHelper();
            var           SClassDTO = new StudentClassesDTO();
            List <HClass> classes   = helper.GetAllClassesForTeacher(teacherName);

            SClassDTO.classes = classes;

            SClassDTO.SelectedClass = classes[0];
            List <Student> students = helper.GetStudentsForClass(SClassDTO.SelectedClass.Name);

            SClassDTO.students = students;
            return(View(SClassDTO));
        }