public async void ReadAttivita() { var activities = await DatabaseToDoHelper.ReadAttivita(); Activities.Clear(); foreach (var s in activities) { Activities.Add(s); } }
private async void Delete(object parameter) { bool result = await DatabaseToDoHelper.DeleteAttivita(Attivita); if (result) { await App.Current.MainPage.Navigation.PopAsync(); } else { await App.Current.MainPage.DisplayAlert("Error", "There was an error, please try again", "Ok"); } }
private void SaveAttivita(object obj) { bool result = DatabaseToDoHelper.InsertAttivita(new Model.Attivita { Name = Name, Description = Description, Source = Source, Scadenza = Scadenza }); if (result) { App.Current.MainPage.Navigation.PopAsync(); } else { App.Current.MainPage.DisplayAlert("Error", "Something went wrong, please try again", "Ok"); } }