示例#1
0
        public async void ReadVenerdi()
        {
            var venerdi = await DatabaseVenerdiHelper.ReadVenerdi();

            VenerdiColl.Clear();
            foreach (var a in venerdi)
            {
                VenerdiColl.Add(a);
            }
        }
示例#2
0
        private async void Delete(object parameter)
        {
            bool result = await DatabaseVenerdiHelper.DeleteVenerdi(Venerdi);

            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 SaveVenerdi(object obj)
        {
            bool result = DatabaseVenerdiHelper.InsertVenerdi(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");
            }
        }