Пример #1
0
        public async void ReadMartedi()
        {
            var martedi = await DatabaseMartediHelper.ReadMartedi();

            MartediColl.Clear();
            foreach (var a in martedi)
            {
                MartediColl.Add(a);
            }
        }
Пример #2
0
        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");
            }
        }
Пример #3
0
        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");
            }
        }