async void OnNextClicked(object sender, System.EventArgs e) { RegisterUser user = CreateUser(); System.Diagnostics.Debug.WriteLine($"User= {user.username}"); if (!user.Equals(null)) { System.Diagnostics.Debug.WriteLine("Going to register Page 2"); await Navigation.PushAsync(new RegisterPage2(user)); } else { await DisplayAlert("Incomplete", "Please check the information entered. All fields are required.", "OK"); } }
//Perform the call to Save the object to DB async void OnSaveClicked(object sender, System.EventArgs e) { RegisterUser createdUser = CreateUser(user); if (!user.Equals(null)) { await _regServ.PostResponse(createdUser); await DisplayAlert( "Save", "Thank you for registering.", "OK"); await Navigation.PopToRootAsync(); } else { await DisplayAlert( "Error", "Some fields are missing. Please fill all fields mentioned", "OK"); } }