Exemplo n.º 1
0
 public ActionResult Register(RegisterVM registerVm)
 {
     Boolean success = UserBL.RegisterUser(registerVm);
     if (success)
     {
         return RedirectToAction("Login", "User");
     }
     return View();
 }
Exemplo n.º 2
0
        public static Boolean RegisterUser(RegisterVM registerVm)
        {
            UserMapper userMapper = new UserMapper();
            Samsung_User newUser = new Samsung_User(registerVm.FirstName, registerVm.LastName, registerVm.Zipcode,
                registerVm.DateOfBirth, registerVm.EmailAddress, registerVm.Password);

            Boolean succes = userMapper.CheckUserExistence(newUser);

            if (!succes)
            {
                userMapper.AddUser(newUser);
                return true;
            }
            return false;
        }