Ejemplo n.º 1
0
        private async void BtnAdd_Clicked(object sender, EventArgs e)
        {
            await firebaseHelper.AddToilet(Convert.ToInt32(txtId.Text), txtName.Text, txtDescription.Text);

            txtId.Text          = string.Empty;
            txtName.Text        = string.Empty;
            txtDescription.Text = string.Empty;

            await DisplayAlert("Success", "Toilet Added Successfully", "OK");

            var allToilets = await firebaseHelper.GetAllToilets();

            lstToilets.ItemsSource = allToilets;
        }
Ejemplo n.º 2
0
        private async void BtnAddToilet_Clicked(object sender, EventArgs e)
        {
            await firebaseHelper.AddToilet(Convert.ToInt32(toiletId.Text), toiletName.Text, toiletDescription.Text, toiletLat.Text, toiletLong.Text);

            toiletId.Text          = string.Empty;
            toiletName.Text        = string.Empty;
            toiletDescription.Text = string.Empty;
            toiletLat.Text         = string.Empty;
            toiletLong.Text        = string.Empty;

            await DisplayAlert("Success", "Toilet Added Successfully", "OK");

            await Navigation.PushAsync(new MainPage());

            {
            }
        }