[chore:] added ID to addres-sets (yes, there was no -_-)

This commit is contained in:
Elias Fierke
2025-10-09 10:22:22 +02:00
parent 63d430dd72
commit af8a74c2c3
4 changed files with 272 additions and 239 deletions

View File

@@ -22,7 +22,7 @@ public partial class MainWindow : Window
Settings.Load();
}
private async void StartAddressCheck(KasAddressList addresses)
private async void StartAddressCheck(int addresSetID)
{
//var addresses = DataImport.ImportKasAddressList(path); // Ihr Code hier
@@ -31,13 +31,18 @@ public partial class MainWindow : Window
progressWindow.Show(_instance);
var processor = new AddressCheck(progressWindow);
var result = await processor.Perform(addresses);
var result = await processor.Perform(addresSetID);
// foreach (var item in result)
// {
// }
progressWindow.Close();
new ResultWindow(result, addresses).Show();
new ResultWindow(result, addresSetID).Show();
//await MessageBox.Show(_instance, $"{result.Count} Einträge fehlerhaft.", "Fertig");
}
@@ -115,12 +120,12 @@ public partial class MainWindow : Window
return;
}
var set = new KasAddressList("");
foreach (var adset in Settings._instance.addressSets.addresses)
if (adset.Name == LstCustomerAdressSets.SelectedItem.ToString())
set = adset;
//var set = new KasAddressList("");
//foreach (var adset in Settings._instance.addressSets.addresses)
//if (adset.ID == KasAddressList.GetIDByAddressSetListItem(LstCustomerAdressSets.SelectedItem.ToString()))
StartAddressCheck(KasAddressList.GetIDByAddressSetListItem(LstCustomerAdressSets.SelectedItem.ToString()));
StartAddressCheck(set);
// var result = DataImport.ImportKasAddressList(filePath);
// if (result.Item1)
// {
@@ -379,7 +384,7 @@ public partial class MainWindow : Window
foreach (var k in Settings._instance.addressSets.addresses)
foreach (var customer in Settings._instance.customers.customers)
if (customer.ID == k.owner_id && customer.ID == customer_id)
LstCustomerAdressSets.Items.Add(k.Name);
LstCustomerAdressSets.Items.Add(k.ID + " - " + k.Name);
}
private void LstCustomerAdressSets_OnSelectionChanged(object? sender, SelectionChangedEventArgs e)