[chore:] implemented address repair access

This commit is contained in:
2026-07-27 13:30:57 +02:00
parent 15d1a26251
commit e725cac742
2 changed files with 34 additions and 2 deletions
+33 -1
View File
@@ -135,6 +135,26 @@ public partial class MainWindow : Window
//await MessageBox.Show(_instance, $"{result.Count} Einträge fehlerhaft.", "Fertig");
}
private async void StartAddressRepairer(KasAddressList set)
{
//var addresses = DataImport.ImportKasAddressList(path); // Ihr Code hier
var progressWindow = new ProgressWindow();
progressWindow.Show(_instance);
var processor = new AddressRepair(progressWindow);
await processor.Perform(set);
// foreach (var item in result)
// {
// }
progressWindow.Close();
Settings.Save();
//await MessageBox.Show(_instance, $"{result.Count} Einträge fehlerhaft.", "Fertig");
}
private void MnuExit_OnClick(object? sender, RoutedEventArgs e)
{
@@ -704,7 +724,7 @@ public partial class MainWindow : Window
if (pers.PersonError != null)
{
BtnShorten.IsEnabled = true;
// BtnRepair.IsEnabled = true;
BtnRepair.IsEnabled = true;
break;
}
else
@@ -1346,4 +1366,16 @@ public partial class MainWindow : Window
{
PopulateNavTree();
}
private void BtnRepair_OnClick(object? sender, RoutedEventArgs e)
{
MakeCalcManVisible();
if (LstCustomerAdressSets.SelectedIndex == -1)
{
MessageBox.Show(null, "Bitte zunächst ein Adress-Set auswählen", "Kein Adress-Set ausgewählt");
return;
}
StartAddressRepairer((KasAddressList)LstCustomerAdressSets.SelectedItem);
}
}