Exports werden in einem Export ordner abgelegt

This commit is contained in:
2023-08-06 19:37:42 +02:00
parent 778b4a9a64
commit f867ef6222
4 changed files with 9 additions and 4 deletions

View File

@@ -7,6 +7,7 @@ using StammGenerator.ViewModel;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
@@ -40,8 +41,12 @@ namespace StammGenerator.Commands
IExport export = ExporterFactory.Export(_selectedProjekt.ExportType);
IEnumerable<Kanal> haltungen = await _haltungDataService.GetAllByProjekt(_selectedProjekt);
IEnumerable<Schacht> schaechte = await _schachtDataService.GetAllByProjekt(_selectedProjekt);
if(!Directory.Exists("./export/"))
{
Directory.CreateDirectory("./export/");
}
await export.Export(_selectedProjekt.Id.ToString(), _selectedProjekt.Kodierungssystem, haltungen.ToList(), schaechte.ToList(), wwLog);
await export.Export("./export/"+_selectedProjekt.Id.ToString(), _selectedProjekt.Kodierungssystem, haltungen.ToList(), schaechte.ToList(), wwLog);
}
catch(NotImplementedException)
{

View File

@@ -50,7 +50,7 @@ namespace WWTech_KanalSchnittstelle.Exporter.XML
DoAdmindata(xmlElement);
DoCollectives(xmlElement);
_file.Save("test.xml");
_file.Save(projektname+".xml");
return true;
}

View File

@@ -50,7 +50,7 @@ namespace WWTech_KanalSchnittstelle.Exporter.XML
DoAdmindata(xmlElement);
DoCollectives(xmlElement);
_file.Save("test.xml");
_file.Save(projektname + ".xml");
return true;
}

View File

@@ -50,7 +50,7 @@ namespace WWTech_KanalSchnittstelle.Exporter.XML
DoAdmindata(xmlElement);
DoCollectives(xmlElement);
_file.Save("test.xml");
_file.Save(projektname + ".xml");
return true;
}