Exemplo n.º 1
0
        public ActionResult RegisterClient(ClientRegistrationViewModel registrationViewModel)
        {
            if (ModelState.IsValid)
            {
                if (_loginManager.GetClientByClientName(registrationViewModel.ClientOrganization) != null)
                {
                    ModelState.AddModelError("ClientOrganization", "Client organization already exists!");
                    return(View());
                }

                _clientBLL.CreateClient(registrationViewModel);
                return(RedirectToAction("StaffInformation", "Staff"));
            }
            return(View());
        }