Datenbankpfade angepasst.

Tabellenstruktur hinzugefügt
This commit is contained in:
2024-08-21 10:08:18 +02:00
parent 7e0105defa
commit 6f218889ee
8 changed files with 95 additions and 18 deletions

View File

@@ -11,7 +11,7 @@ namespace dcnsanplanung.DAL.Helper
{
List<shared.Model.Haltung> haltungen = new List<shared.Model.Haltung>();
List<shared.Model.LeistungsverzeichnisPosition> LVPositionen = new List<shared.Model.LeistungsverzeichnisPosition>();
public WriteToDatabase(string XMLFile, string connectionstring = "Host = localhost; Database = sanplaner; Username = dcnsanplaner; Password = sanplaner")
public WriteToDatabase(string XMLFile, string connectionstring = "Host = 10.1.0.2; Database = sanplaner; Username = sanplaner; Password = sanplaner")
{
haltungen = new shared.Helper.ImportToSoftware(XMLFile).haltungen;
//LVPositionen = new shared.Helper.ImportLVToSoftware(@"C:\Users\damia\source\repos\dcnsanplanung\BE-BS-AWN DW_0001_OOWV_Stamm_LV_Kanalsanierung_xml33.X81").LVPositionen;
@@ -21,7 +21,7 @@ namespace dcnsanplanung.DAL.Helper
public async Task<bool> WriteInHaltung()
{
string connectionstring = "Host = localhost; Database = sanplaner; Username = dcnsanplaner; Password = sanplaner";
string connectionstring = "Host = 10.1.0.2; Database = sanplaner; Username = sanplaner; Password = sanplaner";
HaltungDataService haltungDataService = new HaltungDataService(connectionstring);
await haltungDataService.InsertHaltungBulk(haltungen);
return true;
@@ -29,7 +29,7 @@ namespace dcnsanplanung.DAL.Helper
public async Task<bool> WriteInLV()
{
string connectionstring = "Host = localhost; Database = sanplaner; Username = dcnsanplaner; Password = sanplaner";
string connectionstring = "Host = 10.1.0.2; Database = sanplaner; Username = sanplaner; Password = sanplaner";
LVDataService lVDataService = new LVDataService(connectionstring);
await lVDataService.InsertLeistungsverzeichnisPositionBulk(LVPositionen);
return true;

View File

@@ -65,7 +65,7 @@ namespace dcnsanplanung.DAL.Services.PostgresqlData
{
Haltung result = new Haltung()
{
ID = reader.GetInt32(0),
//ID = reader.GetInt32(0),
Guid = Guid.Parse(reader.GetString(1)),
Ref_Projekt_Guid = Guid.Parse(reader.GetString(2)),
Objektbezeichnung = reader.GetString(3),