Exemplo n.º 1
0
        private async void SignInBtn_Clicked(object sender, EventArgs e)
        {
            YostocksApiServices apiService = new YostocksApiServices();
            bool response = await apiService.LoginUser(EntEmail.Text, EntPassword.Text);

            if (!response)
            {
                await DisplayAlert("Error", "Wrong Username or Password", "Cancel");
            }
            else if (response)
            {
                Navigation.InsertPageBefore(new ParentTabbedPage(), this);
                await Navigation.PopAsync();
            }
        }
Exemplo n.º 2
0
        private async void BtnSignUp_Clicked(object sender, EventArgs e)
        {
            YostocksApiServices service = new YostocksApiServices();

            bool response = await service.RegisterUser(EntEmail.Text, EntPassword.Text, EntConfirmPassword.Text);

            if (!response)
            {
                await DisplayAlert("Alert", "Something wrong...\n perhaps your account already exists?", "Cancel");
            }
            else
            {
                await DisplayAlert("Hi", "Your account has been created", "Ok");

                await Navigation.PopToRootAsync();
            }
        }