Esempio n. 1
0
        private async void DeleteSong(object sender, EventArgs e)
        {
            try
            {
                if (await DisplayAlert("Warning!", "Do you really want to delete it?", "Yes", "No"))
                {
                    if (await TableStorageService.DeleteSong(song))
                    {
                        await DisplayAlert("Success!", "Song deleted!", "OK");

                        await Navigation.PopAsync();
                    }
                    else
                    {
                        await DisplayAlert("Error!", "Song NOT deleted!", "OK");
                    }
                }
            }
            catch (Exception ex)
            {
                await DisplayAlert("Error!", "There was an error!", "OK");
            }
        }