예제 #1
0
 private void SubmitAddItem(object sender, EventArgs e)
 {
     DependencyService.Get <IKeyboardHelper>().HideKeyboard();
     if (!string.IsNullOrEmpty(ItemEntry.Text) || !string.IsNullOrEmpty(Amount.Text))
     {
         SubmitAnim.Play();
     }
 }
예제 #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();
            }
        }