public IActionResult Registration(EmployeeViewModel employee, AuthDataViewModel authData)
        {
            if (ModelState.IsValid)
            {
                AuthenticationLogic.IsAuthenticated = true;
                _authentication.SetAuthentication(AuthenticationLogic.IsAuthenticated);
                _authentication.Register(employee, authData);

                return(RedirectToAction("Index", "Home"));
            }
            else
            {
                return(View("Registration"));
            }
        }
示例#2
0
        public IActionResult Index()
        {
            var skillViewModel = _mapperSkill.MapAll();

            ViewBag.IsAuthenticated = AuthenticationLogic.IsAuthenticated;
            ViewBag.CurrentUser     = AuthenticationLogic.CurrentUserId;
            _auth.SetAuthentication(AuthenticationLogic.IsAuthenticated);

            return(View(skillViewModel));
        }