Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
33b40a1e73 | ||
|
|
6435dd8994 | ||
|
|
6c6aea611d |
@@ -42,6 +42,7 @@ public class KasAddressList //Address-Set
|
||||
if(customer.patch != null && expAsAdpac)
|
||||
{
|
||||
string header = customer.patch.GetCSVHeader(sep);
|
||||
result += header + "\n";
|
||||
} else
|
||||
{
|
||||
result = $"refsid{sep} anrede{sep} titel{sep} vorname{sep} adel{sep} name{sep} namezus{sep} anredzus{sep} strasse{sep} strasse2{sep} plz{sep} ort{sep} land{sep} pplz{sep} postfach{sep} name1{sep} name2{sep} name3{sep} name4{sep} name5{sep} funktion{sep} funktion2{sep} abteilung{sep} funktionad{sep} lastupdate\n";
|
||||
|
||||
+20
-16
@@ -1482,7 +1482,7 @@ public partial class MainWindow : Window
|
||||
private async void MnIAdSetExp_OnClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
var topLevel = TopLevel.GetTopLevel(this);
|
||||
|
||||
Logger.Log("Exporting as CSV without address patch...");
|
||||
var folders = await topLevel.StorageProvider.OpenFolderPickerAsync(new FolderPickerOpenOptions
|
||||
{
|
||||
Title = "Select a Folder",
|
||||
@@ -1492,15 +1492,17 @@ public partial class MainWindow : Window
|
||||
if (folders.Count > 0)
|
||||
{
|
||||
var folderPath = folders[0].Path.LocalPath;
|
||||
Logger.Log($"using ${folderPath} as export destination");
|
||||
if (LstCustomerAdressSets.SelectedItems.Count > 0)
|
||||
{
|
||||
foreach (var set in LstCustomerAdressSets.SelectedItems)
|
||||
{
|
||||
string output = await ((KasAddressList)set).GenerateCSV(false);
|
||||
File.WriteAllText(Path.Combine(folderPath,((KasAddressList)set).Name + ".csv"), output);
|
||||
}
|
||||
|
||||
}
|
||||
foreach (var set in LstCustomerAdressSets.SelectedItems)
|
||||
{
|
||||
string output = await ((KasAddressList)set).GenerateCSV(false);
|
||||
File.WriteAllText(Path.Combine(folderPath,((KasAddressList)set).Name + ".csv"), output);
|
||||
Logger.Log($"exported ${((KasAddressList)set).Name} successfully!");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1509,7 +1511,7 @@ public partial class MainWindow : Window
|
||||
private async void MnIAdSetExpAdpac_OnClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
var topLevel = TopLevel.GetTopLevel(this);
|
||||
|
||||
Logger.Log("Exporting as CSV with address patch...");
|
||||
var folders = await topLevel.StorageProvider.OpenFolderPickerAsync(new FolderPickerOpenOptions
|
||||
{
|
||||
Title = "Select a Folder",
|
||||
@@ -1519,15 +1521,17 @@ public partial class MainWindow : Window
|
||||
if (folders.Count > 0)
|
||||
{
|
||||
var folderPath = folders[0].Path.LocalPath;
|
||||
Logger.Log($"using ${folderPath} as export destination");
|
||||
if (LstCustomerAdressSets.SelectedItems.Count > 0)
|
||||
{
|
||||
foreach (var set in LstCustomerAdressSets.SelectedItems)
|
||||
{
|
||||
string output = await ((KasAddressList)set).GenerateCSV(true);
|
||||
File.WriteAllText(Path.Combine(folderPath,((KasAddressList)set).Name + ".csv"), output);
|
||||
}
|
||||
|
||||
}
|
||||
foreach (var set in LstCustomerAdressSets.SelectedItems)
|
||||
{
|
||||
string output = await ((KasAddressList)set).GenerateCSV(true);
|
||||
File.WriteAllText(Path.Combine(folderPath,((KasAddressList)set).Name + ".csv"), output);
|
||||
Logger.Log($"exported ${((KasAddressList)set).Name} successfully!");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -212,7 +212,7 @@ public class AddressPatch
|
||||
if(has_funktionad){
|
||||
output += funktionad_is + sep + " ";
|
||||
}
|
||||
|
||||
Logger.Log($"Generated CSV header ist ${output}");
|
||||
return output;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user