コード例 #1
0
        public async void ReadAppelli()
        {
            var appelli = await DatabaseAppelliHelper.ReadAppelli();

            Appelli.Clear();
            foreach (var a in appelli)
            {
                Appelli.Add(a);
            }
        }
コード例 #2
0
        private async void Update(object parameter)
        {
            bool result = await DatabaseAppelliHelper.UpdateAppello(Appello);

            if (result)
            {
                await App.Current.MainPage.Navigation.PopAsync();
            }
            else
            {
                await App.Current.MainPage.DisplayAlert("Error", "There was an error, please try again", "Ok");
            }
        }
コード例 #3
0
        private void SaveAppello(object obj)
        {
            bool result = DatabaseAppelliHelper.InsertAppello(new Model.Appello
            {
                Name = Name,
                Date = Date
            });

            if (result)
            {
                App.Current.MainPage.Navigation.PopAsync();
            }
            else
            {
                App.Current.MainPage.DisplayAlert("Error", "Something went wrong, please try again", "Ok");
            }
        }