Merge branch 'release/UpdateLogCreazioneCSV'

This commit is contained in:
Samuele Locatelli
2022-10-21 15:37:00 +02:00
+4 -2
View File
@@ -4787,8 +4787,10 @@ namespace IOB_WIN_NEXT
}
string basePath = Application.StartupPath;
string tempDir = Path.Combine(basePath, locDir);
lgInfo($"iobWriteLocalCSV | locDir: {locDir} | sAddHeader: {sAddHeader} | tempDir: {tempDir}");
if (!Directory.Exists(tempDir))
{
lgInfo("CSV: tempDir not found");
Directory.CreateDirectory(tempDir);
lgInfo($"CSV: created local dir {tempDir}");
}
@@ -4796,14 +4798,14 @@ namespace IOB_WIN_NEXT
answ = DataExport.SaveToCsv(ListaArticoli, filePath, addHeader);
if (answ)
{
lgInfo("CSV: created ART file as articoli.csv");
lgInfo($"CSV: saved ART file as articoli.csv at {filePath}");
// salvo PODL
string csvName = $"{DateTime.Now:dd-MM-yyyy}.csv";
filePath = Path.Combine(tempDir, $"{csvName}");
answ = DataExport.SaveToCsv(ListaJobs, filePath, addHeader);
if (answ)
{
lgInfo($"CSV: created PODL file as {csvName}");
lgInfo($"CSV: saved PODL file {csvName} at {filePath}");
}
}
return answ;