Ejemplo 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));
        }
Ejemplo 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));
        }
Ejemplo 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());
            }
        }
Ejemplo n.º 4
0
        // GET: Teacher/Details/5
        public async Task <ActionResult> Details(int id)
        {
            var student = await _schoolService.GetStudent(id);

            return(View(student));
        }