Exemplo n.º 1
0
        public static void AddUser(RegisterVM registerVm)
        {
            UserMapper userMapper = new UserMapper();
            Nike_User newUser = new Nike_User(registerVm.FirstName, registerVm.LastName, registerVm.ScreenName, registerVm.Gender,
                registerVm.Zipcode, registerVm.EmailAddress, registerVm.DateOfBirth, registerVm.Password);

            userMapper.addUser(newUser);
        }
Exemplo n.º 2
0
        public ActionResult Register(RegisterVM registerVm)
        {
            if (UserBL.registerUser(registerVm)) 
            {

                return RedirectToAction("Index", "Home");
            }
            return View();
        }
Exemplo n.º 3
0
        public static Boolean registerUser(RegisterVM registerVm)
        {
            UserMapper userMapper = new UserMapper();
            Nike_User newUser = new Nike_User(registerVm.FirstName, registerVm.LastName, registerVm.ScreenName, registerVm.Gender,
                registerVm.Zipcode, registerVm.EmailAddress, registerVm.DateOfBirth, registerVm.Password);

            Boolean succes = userMapper.checkUserExists(newUser);
            if (!succes)
            {
                userMapper.addUser(newUser);
                return true;
            }
            return false;
        }