From d9ee3e2fc95b5b58c19c7ae71941c516f40de95a Mon Sep 17 00:00:00 2001 From: Elias Fierke Date: Mon, 27 Apr 2026 17:39:08 +0200 Subject: [PATCH] [chore:] deleting address sets --- MainWindow.axaml | 8 ++++++++ MainWindow.axaml.cs | 27 +++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/MainWindow.axaml b/MainWindow.axaml index 10bf928..006f2b5 100644 --- a/MainWindow.axaml +++ b/MainWindow.axaml @@ -78,6 +78,14 @@ + + + + + + + diff --git a/MainWindow.axaml.cs b/MainWindow.axaml.cs index 0f586e1..4f1a3cf 100644 --- a/MainWindow.axaml.cs +++ b/MainWindow.axaml.cs @@ -914,4 +914,31 @@ public partial class MainWindow : Window MessageBox.Show(this, ex.StackTrace, "Fehler"); } } + + private async void MnIAdSetDelete_OnClick(object? sender, RoutedEventArgs e) + { + if (LstCustomerAdressSets.SelectedItems.Count > 0) + try + { + var result = await MessageBox.Show(this, "Wirklich löschen?", "Wirklich?", MessageBoxButton.YesNo); + if (result != null) + { + // var id = KasAddressList.GetIDByAddressSetListItem(LstCustomerAdressSets.SelectedItems[0] + // .ToString()); + // var cus_id = Customer.GetIDByCustomerListItem(LstCustomers.SelectedItems[0].ToString()); + // foreach (var set in Settings._instance.addressSets.addresses) + // if (set.ID == id) + // { + // set.Name = result; + // Settings.Save(); + // RefreshAddressSetListItems(cus_id); + // break; + // } + } + } + catch (Exception ex) + { + MessageBox.Show(this, ex.StackTrace, "Fehler"); + } + } } \ No newline at end of file