예제 #1
0
        public IActionResult Crear(int scholarshipProgramUniversityId)
        {
            var universityId = _scholarshipProgramUniversity.GetUniversityIdByScholarshipProgramUniversityId(scholarshipProgramUniversityId);
            var model        = new SubjectMatterModel();

            model.ScholarshipProgramUniversityId = scholarshipProgramUniversityId;
            model.UniversityId = universityId;

            var teachers = _teacher.GetTeachersByUSerUniversityId(universityId);

            ViewBag.Teachers = new SelectList(TeachersByUniverityIdList(universityId), "TeacherId", "TeacherFullName");
            ViewBag.Status   = new SelectList(_status.Status, "StatusId", "StatusName");
            return(View(model));
        }
예제 #2
0
        public IActionResult Index(int universityId)
        {
            var model = new TeacherIndexViewModel();


            if (universityId != 0)
            {
                var teachersFromThisUniversity = _teacher.GetTeachersByUSerUniversityId(universityId);
                model.TeacherList    = teachersFromThisUniversity;
                model.UniversityId   = universityId;
                model.UniversityName = UniversityName(universityId);

                return(View(model));
            }


            //var teachers = _teacher.GetAll;
            model.TeacherList = _teacher.GetAll;

            return(View(model));
        }