0

private void Button_Clicked_1(object sender, EventArgs e) //Login Buttom
        {
            var dbpath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "UserDatabase.db"); 
            var db = new SQLiteConnection(dbpath);
            var myQuery = db.Table<RegUserTable>().Where(u => u.UserName.Equals(EntryUserName.Text) && u.Password.Equals(EntryPassword.Text)).Any(); 
            if (myQuery)
            {
                App.Current.MainPage = new NavigationPage(new HomePage());
            }
            else
            {
                var result = DisplayAlert("Error", "La contraseña o el usuario son incorrectos", "OK");
                Navigation.PushAsync(new LoginPage());

            }

        }
    }
}

Im using sqlite. I just want the aplication to shut down when the user fails the login 3 times

CarlosR
  • 1
  • 1
  • 1
    closing your app is generally considered bad UX - I'm pretty sure Apple explicitly prohibits it in App Store apps – Jason Dec 05 '22 at 23:55

0 Answers0