private void SubmitAddItem(object sender, EventArgs e)
 {
     DependencyService.Get <IKeyboardHelper>().HideKeyboard();
     if (!string.IsNullOrEmpty(ItemEntry.Text) || !string.IsNullOrEmpty(Amount.Text))
     {
         SubmitAnim.Play();
     }
 }
Example #2
0
        private async void SubmitAddItem(object sender, EventArgs e)
        {
            DependencyService.Get <IKeyboardHelper>().HideKeyboard();

            if (string.IsNullOrEmpty(Item.Text) || string.IsNullOrEmpty(Amount.Text) || string.IsNullOrEmpty(ExpDate))
            {
                await App.Current.MainPage.DisplayAlert("Empty Values", "Please enter Item Name, Expiration Date, and Quantity.", "OK");
            }
            else
            {
                await FirebaseHelper.AddPantryItem(Item.Text, Amount.Text, ExpDate);

                SubmitAnim.Play();
            }
        }