Пример #1
0
        private async void SubmitButton_Clicked(object sender, EventArgs e)
        {
            if (string.IsNullOrWhiteSpace(userNameEntry.Text) || string.IsNullOrWhiteSpace(passwordEntry.Text))
            {
                await DisplayAlert("Log In", "Enter Login and Password", "OK");
            }
            else
            {
                IvalidateUser validator = new ValidateUser();

                bool result = await validator.AuthenticationUser(userNameEntry.Text, passwordEntry.Text);

                if (result)
                {
                    await DisplayAlert("Log In", "Login is successful", "OK");

                    await Navigation.PushAsync(new UsersViewPage());
                }
                else
                {
                    await DisplayAlert("Log In", "Login or password is incorected", "OK");
                }
            }
        }