[fix:] multiple little fixed for the combining methods
This commit is contained in:
+19
-6
@@ -471,14 +471,14 @@ public partial class MainWindow : Window
|
||||
}
|
||||
}
|
||||
|
||||
private async void StartCombine(List<KasAddressList> address_lists, int owner_id, string type)
|
||||
private async void StartCombine(List<KasAddressList> address_lists, int owner_id, string type, CombineAddresses.CombineType comb_type)
|
||||
{
|
||||
var progressWindow = new ProgressWindow();
|
||||
|
||||
progressWindow.Show(_instance);
|
||||
|
||||
var processor = new CombineAddresses(progressWindow);
|
||||
var result = await processor.Perform(address_lists, type, CbMergeExportUnmerged.IsChecked);
|
||||
var result = await processor.Perform(address_lists, type, comb_type, CbMergeExportUnmerged.IsChecked);
|
||||
|
||||
if (result.Item1 != null)
|
||||
result.Item1.owner_id = owner_id;
|
||||
@@ -769,7 +769,7 @@ public partial class MainWindow : Window
|
||||
Convert.ToInt32(item.ToString().Split(" - ")[0])));
|
||||
try
|
||||
{
|
||||
StartCombine(list, Convert.ToInt32(LstCustomers.SelectedItem.ToString().Split(" - ")[0]), "difference");
|
||||
StartCombine(list, Convert.ToInt32(LstCustomers.SelectedItem.ToString().Split(" - ")[0]), "difference", GetCombiningTyp());
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -785,7 +785,7 @@ public partial class MainWindow : Window
|
||||
Convert.ToInt32(item.ToString().Split(" - ")[0])));
|
||||
try
|
||||
{
|
||||
StartCombine(list, Convert.ToInt32(LstCustomers.SelectedItem.ToString().Split(" - ")[0]), "union");
|
||||
StartCombine(list, Convert.ToInt32(LstCustomers.SelectedItem.ToString().Split(" - ")[0]), "union", GetCombiningTyp());
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -802,7 +802,7 @@ public partial class MainWindow : Window
|
||||
Convert.ToInt32(item.ToString().Split(" - ")[0])));
|
||||
try
|
||||
{
|
||||
StartCombine(list, Convert.ToInt32(LstCustomers.SelectedItem.ToString().Split(" - ")[0]), "intersection");
|
||||
StartCombine(list, Convert.ToInt32(LstCustomers.SelectedItem.ToString().Split(" - ")[0]), "intersection", GetCombiningTyp());
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -810,6 +810,19 @@ public partial class MainWindow : Window
|
||||
}
|
||||
}
|
||||
|
||||
public CombineAddresses.CombineType GetCombiningTyp()
|
||||
{
|
||||
if (RbComprefsid.IsChecked == true)
|
||||
{
|
||||
return CombineAddresses.CombineType.refsid;
|
||||
} else if (RbCompfinAd.IsChecked == true)
|
||||
{
|
||||
return CombineAddresses.CombineType.final_adress;
|
||||
}
|
||||
|
||||
return CombineAddresses.CombineType.none;
|
||||
}
|
||||
|
||||
private void BtnCombineSymmetricDifference_OnClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
var list = new List<KasAddressList>();
|
||||
@@ -817,7 +830,7 @@ public partial class MainWindow : Window
|
||||
list.Add(Settings._instance.addressSets.GetAddressSetByID(
|
||||
Convert.ToInt32(item.ToString().Split(" - ")[0])));
|
||||
|
||||
StartCombine(list, Convert.ToInt32(LstCustomers.SelectedItem.ToString().Split(" - ")[0]), "symdiff");
|
||||
StartCombine(list, Convert.ToInt32(LstCustomers.SelectedItem.ToString().Split(" - ")[0]), "symdiff", GetCombiningTyp());
|
||||
}
|
||||
|
||||
private async void BtnGenerateLabels_OnClick(object? sender, RoutedEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user