public HomePageVM() { client = new FirebaseClient("https://chachadelice-13c0e.firebaseio.com/"); FoodItems = new ObservableCollection <FoodItem>(); var BDs = new BDservices(); NombreDelementDansLaList = BDs.countElementInBD(); GetFoodItems(); GoToAchatList = new Command(async() => await GoToAchatListAsync()); }
private async void AjoutAchatCart() { if (NombreDeCommand == 0) { await Application.Current.MainPage.DisplayAlert(";)", "Votre commande ne peut pas être nulle", "Ajouter une command"); } else { var AjoutAchat = new BDservices(); AjoutAchat.AjoutCommand(SelectedFood, NombreDeCommand); await Application.Current.MainPage.DisplayAlert("Operation reussie", "Votre commande a bien été enregistrée dans la liste d'achat", "ok"); } }
void removeItemInBD() { var BS = new BDservices(); BS.removeElementInBD(); }