diff --git a/ResultWindow.axaml b/ResultWindow.axaml
index 389579e..885f294 100644
--- a/ResultWindow.axaml
+++ b/ResultWindow.axaml
@@ -14,7 +14,10 @@
VerticalAlignment="Stretch" Margin="10,80,10,0" />
+
+
\ No newline at end of file
diff --git a/ResultWindow.axaml.cs b/ResultWindow.axaml.cs
index 9245322..930f650 100644
--- a/ResultWindow.axaml.cs
+++ b/ResultWindow.axaml.cs
@@ -1,21 +1,27 @@
using System;
using System.Collections.Generic;
+using Avalonia;
using Avalonia.Controls;
using Avalonia.Interactivity;
+using Avalonia.Layout;
namespace Logof_Client;
public partial class ResultWindow : Window
{
public List errortypecheckboxes = new();
+ public KasAddressList ur_addresses = new();
public List<(int, List, List)> ur_result;
public List warningtypecheckboxes = new();
- public ResultWindow(List<(int, List, List)> result)
+ public ResultWindow(List<(int, List, List)> result,
+ KasAddressList ur_addresses)
{
InitializeComponent();
ur_result = result;
+ this.ur_addresses = ur_addresses;
Load(result);
+ //ViewSingle(200552426);
}
private void GenerateView(List<(int, List, List)> result)
@@ -26,6 +32,36 @@ public partial class ResultWindow : Window
DgResult.ItemsSource = errors;
}
+ private void ViewSingle(int refsid)
+ {
+ foreach (var result in ur_addresses.KasPersons)
+ if (result.refsid == refsid)
+ {
+ var wind = new Window();
+ var stp = new StackPanel();
+ stp.Orientation = Orientation.Horizontal;
+ stp.Margin = new Thickness(10);
+ var tb = new TextBlock();
+ var tb2 = new TextBlock();
+ tb.Text =
+ "refsid:\nanrede:\ntitel:\nvorname:\nadel:\nname:\nnamezus:\nanredzus:\nstrasse:\nstrasse2:\nplz:\nort:\nland:\npplz:\npostfach:\nname1:\nname2:\nname3:\nname4:\nname5:\nfunktion:\nfunktion2:\nabteilung:\nfunktionad:";
+ tb2.Text = result.refsid + "\n" + result.anrede + "\n" + result.titel + "\n" + result.vorname + "\n" +
+ result.adel + "\n" + result.name + "\n" + result.namezus + "\n" + result.anredzus + "\n" +
+ result.strasse + "\n" + result.strasse2 + "\n" + result.plz + "\n" + result.ort + "\n" +
+ result.land + "\n" + result.pplz + "\n" + result.postfach + "\n" + result.name1 + "\n" +
+ result.name2 + "\n" + result.name3 + "\n" + result.name4 + "\n" + result.name5 + "\n" +
+ result.funktion + "\n" + result.funktion2 + "\n" + result.abteilung + "\n" +
+ result.funktionad;
+ stp.Children.Add(tb);
+ stp.Children.Add(tb2);
+ wind.Content = stp;
+ wind.ShowInTaskbar = false;
+ wind.SizeToContent = SizeToContent.WidthAndHeight;
+ wind.Show();
+ return;
+ }
+ }
+
private void Load(List<(int, List, List)> result)
{
var knownErrors = new List();
@@ -103,4 +139,18 @@ public partial class ResultWindow : Window
LblResultCount.Content = $"{errors.Count}/{ur_result.Count} Ergebnisse";
DgResult.ItemsSource = errors;
}
+
+ private void BtnShwoSelected_OnClick(object? sender, RoutedEventArgs e)
+ {
+ foreach (var selected in DgResult.SelectedItems)
+ try
+ {
+ var _asKas = (KasPersonError)selected;
+ ViewSingle(_asKas.refsid);
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine(ex.Message);
+ }
+ }
}
\ No newline at end of file