Esempio n. 1
0
        // GET: Teacher/Edit/5
        public async Task <ActionResult> EditStudentProfile(int id)
        {
            var studentFromDb = await _schoolService.GetStudent(id);

            var profileFromDb = studentFromDb.Profile;

            return(View(profileFromDb));
        }
Esempio n. 2
0
        // GET: Student
        public async Task <ActionResult> Index()
        {
            var userId  = this.User.FindFirstValue(ClaimTypes.NameIdentifier);
            var student = await _schoolService.GetStudent(userId);

            ViewBag.teachers = await _schoolService.GetTeachersAsync();

            return(View(student));
        }
Esempio n. 3
0
        // GET: Student
        public async Task <ActionResult> Index()
        {
            if (ModelState.IsValid)
            {
                var userId  = this.User.FindFirstValue(ClaimTypes.NameIdentifier);
                var student = await _schoolService.GetStudent(userId);

                return(View(student));
            }
            else
            {
                return(View());
            }
        }
Esempio n. 4
0
        // GET: Teacher/Details/5
        public async Task <ActionResult> Details(int id)
        {
            var student = await _schoolService.GetStudent(id);

            return(View(student));
        }