private void deleteAttachmentButton_Click(object sender, RoutedEventArgs e)
 {
     if (attachmentsListView.SelectedItem != null)
     {
         string selectedAttachment = "";
         selectedAttachment = attachmentsListView.SelectedItem.ToString();
         if (selectedAttachment != "")
         {
             if (selectedPayment == null)
             {
                 attachments.Remove(selectedAttachment);
                 attachmentsListView.ItemsSource = null;
                 attachmentsListView.ItemsSource = attachments;
             }
             else
             {
                 selectedPayment.DeleteAttachment(selectedAttachment);
                 attachmentsListView.ItemsSource = null;
                 attachmentsListView.ItemsSource = selectedPayment.Attachments;
             }
         }
     }
 }