[chore:] added ID to addres-sets (yes, there was no -_-)
This commit is contained in:
@@ -11,25 +11,25 @@ public partial class ResultWindow : Window
|
||||
{
|
||||
public List<CheckBox> errortypecheckboxes = new();
|
||||
public KasAddressList ur_addresses = new("Ergebnis_" + DateTime.Now.ToString("ddMMyy_HHmmss"));
|
||||
public List<(int, List<AddressCheck.ErrorTypes>, List<AddressCheck.WarningTypes>)> ur_result;
|
||||
public List<KasPersonError> ur_result;
|
||||
public List<CheckBox> warningtypecheckboxes = new();
|
||||
|
||||
public ResultWindow(List<(int, List<AddressCheck.ErrorTypes>, List<AddressCheck.WarningTypes>)> result,
|
||||
KasAddressList ur_addresses)
|
||||
public ResultWindow(List<KasPersonError> result,
|
||||
int addressSetID)
|
||||
{
|
||||
InitializeComponent();
|
||||
ur_result = result;
|
||||
this.ur_addresses = ur_addresses;
|
||||
ur_addresses = ur_addresses;
|
||||
Load(result);
|
||||
//ViewSingle(200552426);
|
||||
}
|
||||
|
||||
private void GenerateView(List<(int, List<AddressCheck.ErrorTypes>, List<AddressCheck.WarningTypes>)> result)
|
||||
private void GenerateView(List<KasPersonError> result)
|
||||
{
|
||||
var errors = new List<KasPersonError>();
|
||||
foreach (var single_result in result) errors.Add(new KasPersonError(single_result));
|
||||
LblResultCount.Content = $"{errors.Count}/{ur_result.Count} Ergebnisse";
|
||||
DgResult.ItemsSource = errors;
|
||||
// var errors = new List<KasPersonError>();
|
||||
//foreach (var single_result in result) errors.Add(single_result);
|
||||
LblResultCount.Content = $"{result.Count}/{ur_result.Count} Ergebnisse";
|
||||
DgResult.ItemsSource = result;
|
||||
}
|
||||
|
||||
private void ViewSingle(int refsid)
|
||||
@@ -62,18 +62,18 @@ public partial class ResultWindow : Window
|
||||
}
|
||||
}
|
||||
|
||||
private void Load(List<(int, List<AddressCheck.ErrorTypes>, List<AddressCheck.WarningTypes>)> result)
|
||||
private void Load(List<KasPersonError> result)
|
||||
{
|
||||
var knownErrors = new List<AddressCheck.ErrorTypes>();
|
||||
var knownWarnings = new List<AddressCheck.WarningTypes>();
|
||||
|
||||
foreach (var single_result in result)
|
||||
{
|
||||
foreach (var errtyp in single_result.Item2)
|
||||
foreach (var errtyp in single_result.errors)
|
||||
if (!knownErrors.Contains(errtyp))
|
||||
knownErrors.Add(errtyp);
|
||||
|
||||
foreach (var wartyp in single_result.Item3)
|
||||
foreach (var wartyp in single_result.warnings)
|
||||
if (!knownWarnings.Contains(wartyp))
|
||||
knownWarnings.Add(wartyp);
|
||||
}
|
||||
@@ -108,7 +108,7 @@ public partial class ResultWindow : Window
|
||||
|
||||
private void UpdateFilter()
|
||||
{
|
||||
var temp_result = new List<(int, List<AddressCheck.ErrorTypes>, List<AddressCheck.WarningTypes>)>();
|
||||
var temp_result = new List<KasPersonError>();
|
||||
var checked_types = new List<AddressCheck.ErrorTypes>();
|
||||
var checked_types_war = new List<AddressCheck.WarningTypes>();
|
||||
foreach (var cb in errortypecheckboxes)
|
||||
@@ -123,21 +123,21 @@ public partial class ResultWindow : Window
|
||||
|
||||
foreach (var sres in ur_result)
|
||||
{
|
||||
foreach (var err in sres.Item2)
|
||||
foreach (var err in sres.errors)
|
||||
if (checked_types.Contains(err) && !temp_result.Contains(sres))
|
||||
temp_result.Add(sres);
|
||||
|
||||
foreach (var war in sres.Item3)
|
||||
foreach (var war in sres.warnings)
|
||||
if (checked_types_war.Contains(war) && !temp_result.Contains(sres))
|
||||
temp_result.Add(sres);
|
||||
}
|
||||
|
||||
|
||||
var errors = new List<KasPersonError>();
|
||||
foreach (var single_result in temp_result) errors.Add(new KasPersonError(single_result));
|
||||
//var errors = new List<KasPersonError>();
|
||||
//foreach (var single_result in temp_result) errors.Add(new KasPersonError(single_result));
|
||||
|
||||
LblResultCount.Content = $"{errors.Count}/{ur_result.Count} Ergebnisse";
|
||||
DgResult.ItemsSource = errors;
|
||||
LblResultCount.Content = $"{temp_result.Count}/{ur_result.Count} Ergebnisse";
|
||||
DgResult.ItemsSource = temp_result;
|
||||
}
|
||||
|
||||
private void BtnShowSelected_OnClick(object? sender, RoutedEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user