Ejemplo n.º 1
0
        public IActionResult GetTeacher(Guid guid)
        {
            var userId = Convert.ToInt32(User.Claims.Where(c => c.Type == ClaimTypes.Name).Select(c => c.Value)
                                         .SingleOrDefault());

            if (userId > 0)
            {
                var user = _kullaniciService.GetById(userId);

                ViewBag.YetkiId = user.YetkiId;
                ViewBag.UserId  = user.Id;
            }

            TeacherLessonCO model = new TeacherLessonCO();

            var teacher = _kullaniciService.GetByTeacher(guid);

            if (teacher == null)
            {
                return(View("Error"));
            }
            var lessons = _tutorLessonService.GetByLessons(guid);

            model.Kullanici   = teacher;
            model.TutorLesson = lessons;
            return(View(model));
        }
Ejemplo n.º 2
0
        public IActionResult GetTutorLessons()
        {
            var userId = Convert.ToInt32(User.Claims.Where(c => c.Type == ClaimTypes.Name).Select(c => c.Value)
                                         .SingleOrDefault());

            var user = _kullaniciService.GetById(userId);

            var tutorLessons = _tutorLessonService.GetByLessons(user.Guid);

            return(View(tutorLessons));
        }