public async void ReadMartedi() { var martedi = await DatabaseMartediHelper.ReadMartedi(); MartediColl.Clear(); foreach (var a in martedi) { MartediColl.Add(a); } }
private async void Delete(object parameter) { bool result = await DatabaseMartediHelper.DeleteMartedi(Martedi); 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 SaveMartedi(object obj) { bool result = DatabaseMartediHelper.InsertMartedi(new Model.Evento { Name = Name, Luogo = Luogo, OraI = OraI, OraF = OraF }); if (result) { App.Current.MainPage.Navigation.PopAsync(); } else { App.Current.MainPage.DisplayAlert("Error", "Something went wrong, please try again", "Ok"); } }