public IActionResult MemberAdd()
        {
            var _parent = _schoolServices.GetParent(HttpContext.Session.GetAuth().Key);

            ViewBag.parent = _parent;
            return(View(new MemberViewModel()));
        }
Exemplo n.º 2
0
        // GET: Parent
        public async Task <ActionResult> Index()
        {
            var userId = this.User.FindFirstValue(ClaimTypes.NameIdentifier);
            var parent = await _schoolService.GetParent(userId);

            ViewBag.teachers = await _schoolService.GetTeachersAsync();

            return(View(parent));
        }
Exemplo n.º 3
0
        // GET: Parent
        public async Task <ActionResult> Index()
        {
            if (ModelState.IsValid)
            {
                var userId = this.User.FindFirstValue(ClaimTypes.NameIdentifier);
                var parent = await _schoolService.GetParent(userId);

                return(View(parent));
            }
            else
            {
                return(View());
            }
        }