示例#1
0
        public async Task <ActionResult> ListTeacher(int scienseId)
        {
            ViewBag.science = await _scienseService.GetScienseByIdAsync(scienseId);

            ViewBag.listTeacher = await _teacherService.GetTeacherByScienseIdAsync(scienseId);

            return(View());
        }
示例#2
0
        public async Task <ActionResult> ProfileTeacher(int id)
        {
            var teacher = await _teacherService.GetTeacherByIdAysnc(id);

            var science = await _scienseService.GetScienseByIdAsync(teacher.SicenceID);

            var activityListByTeacher = await _teacherActitvityService.GetActivityByTeacherId(id);

            ViewBag.teacher      = teacher;
            ViewBag.science      = science;
            ViewBag.ActivityList = activityListByTeacher;
            ViewBag.ActivityId   = activityListByTeacher.Select(a => a.ActivityId).FirstOrDefault();

            return(View());
        }