private async void enterpin() { while (result == "") { result = await DisplayPromptAsync("Pin", "Enter A Pin", "accept", "", initialValue : "", maxLength : 4, keyboard : Keyboard.Numeric); } Models.KidsLoc kt = new Models.KidsLoc(); kt.Id = result; kt.Master = "9999"; RealmManager.AddOrUpdate <Models.KidsLoc>(kt); }
private async void HomeClicked(object sender, EventArgs e) { Models.KidsLoc kt = RealmManager.All <Models.KidsLoc>().First(); result = await DisplayPromptAsync("Pin", "Enter A Pin", initialValue : "", maxLength : 4, keyboard : Keyboard.Numeric); if (result == kt.Id || result == kt.Master) { await Navigation.PopAsync(); } else { await DisplayAlert("Incorrect Pin", "Please Try Again", "ok"); } }