Datenbankpfade angepasst.
Tabellenstruktur hinzugefügt
This commit is contained in:
@@ -11,7 +11,7 @@ namespace dcnsanplanung.DAL.Helper
|
|||||||
{
|
{
|
||||||
List<shared.Model.Haltung> haltungen = new List<shared.Model.Haltung>();
|
List<shared.Model.Haltung> haltungen = new List<shared.Model.Haltung>();
|
||||||
List<shared.Model.LeistungsverzeichnisPosition> LVPositionen = new List<shared.Model.LeistungsverzeichnisPosition>();
|
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;
|
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;
|
//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()
|
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);
|
HaltungDataService haltungDataService = new HaltungDataService(connectionstring);
|
||||||
await haltungDataService.InsertHaltungBulk(haltungen);
|
await haltungDataService.InsertHaltungBulk(haltungen);
|
||||||
return true;
|
return true;
|
||||||
@@ -29,7 +29,7 @@ namespace dcnsanplanung.DAL.Helper
|
|||||||
|
|
||||||
public async Task<bool> WriteInLV()
|
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);
|
LVDataService lVDataService = new LVDataService(connectionstring);
|
||||||
await lVDataService.InsertLeistungsverzeichnisPositionBulk(LVPositionen);
|
await lVDataService.InsertLeistungsverzeichnisPositionBulk(LVPositionen);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ namespace dcnsanplanung.DAL.Services.PostgresqlData
|
|||||||
{
|
{
|
||||||
Haltung result = new Haltung()
|
Haltung result = new Haltung()
|
||||||
{
|
{
|
||||||
ID = reader.GetInt32(0),
|
//ID = reader.GetInt32(0),
|
||||||
Guid = Guid.Parse(reader.GetString(1)),
|
Guid = Guid.Parse(reader.GetString(1)),
|
||||||
Ref_Projekt_Guid = Guid.Parse(reader.GetString(2)),
|
Ref_Projekt_Guid = Guid.Parse(reader.GetString(2)),
|
||||||
Objektbezeichnung = reader.GetString(3),
|
Objektbezeichnung = reader.GetString(3),
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
namespace dcnsanplanung.shared
|
|
||||||
{
|
|
||||||
public class Class1
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -45,13 +45,13 @@ namespace dcnsanplanung.wpf.ViewModel
|
|||||||
|
|
||||||
private void doSpeichern()
|
private void doSpeichern()
|
||||||
{
|
{
|
||||||
SchadenDataService schadenDataService = new SchadenDataService("Host = localhost; Database = sanplaner; Username = dcnsanplaner; Password = sanplaner");
|
SchadenDataService schadenDataService = new SchadenDataService("Host = 10.1.0.2; Database = sanplaner; Username = sanplaner; Password = sanplaner");
|
||||||
schadenDataService.UpdateSchadenBuld(model.Kodierungen);
|
schadenDataService.UpdateSchadenBuld(model.Kodierungen);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void LadeSchaeden()
|
private async void LadeSchaeden()
|
||||||
{
|
{
|
||||||
SchadenDataService schadenDataService = new SchadenDataService("Host = localhost; Database = sanplaner; Username = dcnsanplaner; Password = sanplaner");
|
SchadenDataService schadenDataService = new SchadenDataService("Host = 10.1.0.2; Database = sanplaner; Username = sanplaner; Password = sanplaner");
|
||||||
IEnumerable<Schaden> src_kodierung = await schadenDataService.GetAllByHaltung(model);
|
IEnumerable<Schaden> src_kodierung = await schadenDataService.GetAllByHaltung(model);
|
||||||
model.Kodierungen = src_kodierung.ToList();
|
model.Kodierungen = src_kodierung.ToList();
|
||||||
|
|
||||||
|
|||||||
@@ -58,10 +58,10 @@ namespace dcnsanplanung.wpf.ViewModel
|
|||||||
|
|
||||||
private async void dooKlassifiziereAsync()
|
private async void dooKlassifiziereAsync()
|
||||||
{
|
{
|
||||||
DAL.Services.PostgresqlData.HaltungDataService haltungDataService = new DAL.Services.PostgresqlData.HaltungDataService("Host = localhost; Database = sanplaner; Username = dcnsanplaner; Password = sanplaner");
|
DAL.Services.PostgresqlData.HaltungDataService haltungDataService = new DAL.Services.PostgresqlData.HaltungDataService("Host = 10.1.0.2; Database = sanplaner; Username = sanplaner; Password = sanplaner");
|
||||||
var s = await haltungDataService.GetAllByProjekt(0);
|
var s = await haltungDataService.GetAllByProjekt(0);
|
||||||
// Alle Haltungen laden
|
// Alle Haltungen laden
|
||||||
SchadenDataService schadenDataService = new SchadenDataService("Host = localhost; Database = sanplaner; Username = dcnsanplaner; Password = sanplaner");
|
SchadenDataService schadenDataService = new SchadenDataService("Host = 10.1.0.2; Database = sanplaner; Username = sanplaner; Password = sanplaner");
|
||||||
foreach (var item in s)
|
foreach (var item in s)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -98,15 +98,15 @@ namespace dcnsanplanung.wpf.ViewModel
|
|||||||
|
|
||||||
async Task dooAsync()
|
async Task dooAsync()
|
||||||
{
|
{
|
||||||
DAL.Helper.WriteToDatabase writer = new DAL.Helper.WriteToDatabase(@"D:\Airbus\Airbus Nordenham RW Viewer für Sanierungskonzept\Airbus Nordenham RW.xml");
|
DAL.Helper.WriteToDatabase writer = new DAL.Helper.WriteToDatabase(@"C:\Users\damia\Desktop\dev\dcnsanplanung\RW.xml");
|
||||||
await writer.WriteInHaltung();
|
await writer.WriteInHaltung();
|
||||||
//Debugger.Break();
|
//Debugger.Break();
|
||||||
await writer.WriteInLV();
|
//await writer.WriteInLV();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void LoadHaltungen()
|
private async void LoadHaltungen()
|
||||||
{
|
{
|
||||||
DAL.Services.PostgresqlData.HaltungDataService haltungDataService = new DAL.Services.PostgresqlData.HaltungDataService("Host = localhost; Database = sanplaner; Username = dcnsanplaner; Password = sanplaner");
|
DAL.Services.PostgresqlData.HaltungDataService haltungDataService = new DAL.Services.PostgresqlData.HaltungDataService("Host = 10.1.0.2; Database = sanplaner; Username = sanplaner; Password = sanplaner");
|
||||||
var s = await haltungDataService.GetAllByProjekt(0);
|
var s = await haltungDataService.GetAllByProjekt(0);
|
||||||
foreach(var item in s)
|
foreach(var item in s)
|
||||||
{
|
{
|
||||||
|
|||||||
49
haltung.txt
Normal file
49
haltung.txt
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
-- Table: public.haltung
|
||||||
|
|
||||||
|
-- DROP TABLE IF EXISTS public.haltung;
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS public.haltung
|
||||||
|
(
|
||||||
|
id integer NOT NULL DEFAULT nextval('haltung_id_seq'::regclass),
|
||||||
|
guid text COLLATE pg_catalog."default",
|
||||||
|
ref_projekt_guid text COLLATE pg_catalog."default",
|
||||||
|
objektbezeichnung text COLLATE pg_catalog."default",
|
||||||
|
bewertungklasse integer,
|
||||||
|
dn integer,
|
||||||
|
material text COLLATE pg_catalog."default",
|
||||||
|
CONSTRAINT haltung_pkey PRIMARY KEY (id)
|
||||||
|
)
|
||||||
|
|
||||||
|
TABLESPACE pg_default;
|
||||||
|
|
||||||
|
ALTER TABLE IF EXISTS public.haltung
|
||||||
|
OWNER to sanplaner;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS public.haltung
|
||||||
|
(
|
||||||
|
id SERIAL PRIMARY KEY,
|
||||||
|
guid text COLLATE pg_catalog."default",
|
||||||
|
ref_projekt_guid text COLLATE pg_catalog."default",
|
||||||
|
objektbezeichnung text COLLATE pg_catalog."default",
|
||||||
|
bewertungklasse integer,
|
||||||
|
dn integer,
|
||||||
|
material text COLLATE pg_catalog."default"
|
||||||
|
)
|
||||||
|
|
||||||
|
TABLESPACE pg_default;
|
||||||
|
|
||||||
|
ALTER TABLE IF EXISTS public.haltung
|
||||||
|
OWNER to sanplaner;
|
||||||
10
projekt.txt
Normal file
10
projekt.txt
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
CREATE TABLE IF NOT EXISTS public.projekt
|
||||||
|
(
|
||||||
|
id SERIAL PRIMARY KEY,
|
||||||
|
guid text COLLATE pg_catalog."default"
|
||||||
|
)
|
||||||
|
|
||||||
|
TABLESPACE pg_default;
|
||||||
|
|
||||||
|
ALTER TABLE IF EXISTS public.projekt
|
||||||
|
OWNER to sanplaner;
|
||||||
25
schaden.txt
Normal file
25
schaden.txt
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
-- Table: public.schaden
|
||||||
|
|
||||||
|
-- DROP TABLE IF EXISTS public.schaden;
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS public.schaden
|
||||||
|
(
|
||||||
|
id SERIAL PRIMARY KEY,
|
||||||
|
guid text COLLATE pg_catalog."default",
|
||||||
|
ref_haltung_guid text COLLATE pg_catalog."default",
|
||||||
|
entfernung numeric(8,2),
|
||||||
|
hauptcode text COLLATE pg_catalog."default",
|
||||||
|
ch1 text COLLATE pg_catalog."default",
|
||||||
|
ch2 text COLLATE pg_catalog."default",
|
||||||
|
q1 text COLLATE pg_catalog."default",
|
||||||
|
q2 text COLLATE pg_catalog."default",
|
||||||
|
kd integer,
|
||||||
|
ks integer,
|
||||||
|
kb integer,
|
||||||
|
streckenschaden text COLLATE pg_catalog."default"
|
||||||
|
)
|
||||||
|
|
||||||
|
TABLESPACE pg_default;
|
||||||
|
|
||||||
|
ALTER TABLE IF EXISTS public.schaden
|
||||||
|
OWNER to sanplaner;
|
||||||
Reference in New Issue
Block a user