async void Register_Clicked(System.Object sender, System.EventArgs e) { string uid = await auth.CreateNewUser(EmailInput.Text, PasswordInput.Text); InsertFireBase service = new InsertFireBase(); if (uid != "") { //service.AddPerson(uid,) } else { await DisplayAlert("Error", "E-mail or password are incorrect. Try again!", "OK"); } }
private async void Save() { if (string.IsNullOrEmpty(Name) || string.IsNullOrEmpty(LastName) || string.IsNullOrEmpty(Email) || string.IsNullOrEmpty(Gender) || string.IsNullOrEmpty(Document)) { await dialogService.ShowMessage("Error", "Completa todos los espacios antes de comenzar"); return; } if (Password.Equals(RepeatPassword)) { await dialogService.ShowMessage("Ups", "Las contaseñas no coinciden"); return; } if (!CrossConnectivity.Current.IsConnected) { await dialogService.ShowMessage("Ups", "Parece que no tienes conexión a internet"); } var passwordEncrypt = encryptService.Encrypt(Password); string uid = await auth.CreateNewUser(Email, passwordEncrypt); InsertFireBase service = new InsertFireBase(); if (uid != "") { await service.AddClient(uid, Name, Role, LastName, Mobile, Address, Birth, Email, Document, Gender, Verification, true); await navigationService.Navigate("Principal"); } else { await dialogService.ShowMessage("Error", "Hubo un error en el camino, intentalo nuevamente"); } }