[chore:] implemented address repair access
This commit is contained in:
+1
-1
@@ -154,7 +154,7 @@
|
||||
<TextBlock TextWrapping="Wrap" FontSize="9" Text="Generiert Versandetiketten und Bundleitzettel" HorizontalAlignment="Stretch" TextAlignment="Left"></TextBlock>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button Width="250" IsEnabled="False"
|
||||
<Button Width="250" IsEnabled="False" Click="BtnRepair_OnClick"
|
||||
HorizontalContentAlignment="Center" x:Name="BtnRepair" VerticalAlignment="Stretch"
|
||||
Margin="0,0,0,10">
|
||||
<StackPanel Orientation="Vertical">
|
||||
|
||||
+33
-1
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user