private async void OnNavigateToLoginPage() { if (Validator.AllFieldsIsNullOrEmpty(UserPassword, ConfirmPassword)) { if (Validator.PasswordValidator(UserPassword)) { if (Validator.ConfirmPassowrdValidator(UserPassword, ConfirmPassword)) { userModel.Password = UserPassword; _userModelServices.AddUser(userModel); NavigationParameters userEmail = new NavigationParameters(); userEmail.Add("UserEmail", userModel.Email); await NavigationService.NavigateAsync(nameof(LogInView), userEmail); } else { ConfirmPasswordError = "Password missmatch"; ErrorColorBorder = Color.FromHex("#F24545"); } } else { PasswordError = "Password not correct"; EntryPasswordBorder = Color.FromHex("#F24545"); } } else { await _pageDialogService.DisplayAlertAsync("Error", "Fill all fields.", "Ok"); } }
public int AddUser(UserModel userModel) { return(userModelService.AddUser(userModel)); }