Beispiel #1
0
        private async void DeleteAsync()
        {
            ContentDialog Delete = new ContentDialog
            {
                BorderBrush       = new SolidColorBrush(Colors.Black),
                BorderThickness   = new Thickness(1.5),
                Title             = "Delete Envelope",
                Content           = "Are you sure want to Delete " + SelectedEnvelope.Name + " Envelope?",
                CloseButtonText   = "No",
                PrimaryButtonText = "Yes"
            };
            ContentDialogResult res = await Delete.ShowAsync();

            if (res == ContentDialogResult.Primary)
            {
                var  service = new EnvelopeManager();
                bool result  = await service.DeleteEnvelopeConfirmedAsync(SelectedEnvelope.Id);
                await LoadAsync();
            }
        }
Beispiel #2
0
        private async void DeleteConfirmation()
        {
            ContentDialog Delete = new ContentDialog
            {
                BorderBrush       = new SolidColorBrush(Colors.Black),
                BorderThickness   = new Thickness(1.5),
                Title             = "Delete Envelope",
                Content           = "Are you sure want to Delete " + EnvelopeName + " Envelope?",
                CloseButtonText   = "No",
                PrimaryButtonText = "Yes"
            };
            ContentDialogResult res = await Delete.ShowAsync();

            if (res == ContentDialogResult.Primary)
            {
                var  service = new EnvelopeManager();
                bool result  = await service.DeleteEnvelopeConfirmedAsync(envelopeID);

                NavigationService.Navigate(typeof(EnvelopePage), accID);
            }
        }