public async void ReadCorsi() { var corsi = await DatabaseCorsiHelper.ReadCorsi(); Corsi.Clear(); foreach (var c in corsi) { Corsi.Add(c); } }
private async void Delete(object parameter) { bool result = await DatabaseCorsiHelper.DeleteCorso(Corso); 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 SaveCorso(object obj) { bool result = DatabaseCorsiHelper.InsertCorso(new Model.Corso { Name = Name, NameProf = NameProf, EmailProf = EmailProf, NumCFU = NumCFU }); if (result) { App.Current.MainPage.Navigation.PopAsync(); } else { App.Current.MainPage.DisplayAlert("Error", "Something went wrong, please try again", "Ok"); } }