Compare commits
43 Commits
haltung_ed
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| e7891c1a05 | |||
| c5a2a15865 | |||
| f867ef6222 | |||
| 778b4a9a64 | |||
| ba3e10fd2d | |||
| e54b875f1a | |||
| 16ac432831 | |||
| 28ad24751d | |||
| c933989d19 | |||
| 7b8b5a2337 | |||
| a0067655b4 | |||
| cea3fc448b | |||
| 2492f3bfab | |||
| 373de79167 | |||
| 7c0444c7ca | |||
| 33f9da3798 | |||
| 287c7aaa0a | |||
| 40a0882631 | |||
| 8b5d706db4 | |||
| b22b9855fa | |||
| ef2c9bfe6b | |||
| d511c74509 | |||
| 8bfe685072 | |||
| 4f99a38990 | |||
| 76731c3464 | |||
| 7fd87cff09 | |||
| bcbda7622c | |||
| 0877d2b308 | |||
| 1555e54e82 | |||
| 455d23e3ad | |||
| a854d7e8f1 | |||
| e050983f7c | |||
| 040b22f01e | |||
| 19bba6dfc1 | |||
| 33d0b1da93 | |||
| 83068c48fc | |||
| 47aba01cb4 | |||
| 047e036442 | |||
| 1d649d14cb | |||
| 6878284b61 | |||
| 7a036b3404 | |||
| b100eca490 | |||
| 1c3e3c876b |
BIN
Beispieldaten/211213-Bezeichnungen für Neubestand.pdf
Normal file
BIN
Beispieldaten/211213-Bezeichnungen für Neubestand.pdf
Normal file
Binary file not shown.
4
Beispieldaten/Haltungen.hal
Normal file
4
Beispieldaten/Haltungen.hal
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
KANHAL6.0
|
||||||
|
S0269900 76992006 S0269900 K S IB PP 1 200 200 16.553 1 -0.013 1 -0.03 1 Luebbert 21.10.2022
|
||||||
|
S0269900 76992006 S0269900 K S IB PP 1 200 200 16.553 1 -0.013 1 -0.03 1
|
||||||
|
Luebbert 21.10.2022
|
||||||
15
Beispieldaten/Koordinatendatei.csv
Normal file
15
Beispieldaten/Koordinatendatei.csv
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
Schachtnummer;Rechtswert;Hochwert;H<>he
|
||||||
|
11204001;444932.93;5883935.519;5.155
|
||||||
|
11204002;444932.906;5883935.689;3.462
|
||||||
|
11203001;444899.818;5883939.262;5.056
|
||||||
|
11203002;444899.787;5883939.131;3.478
|
||||||
|
11267001;444884.352;5883892.304;4.828
|
||||||
|
11267002;444884.447;5883892.28;3.575
|
||||||
|
11266001;444871.604;5883853.74;4.777
|
||||||
|
11266002;444871.658;5883853.724;3.63
|
||||||
|
2111101;444869.48;5883851.658;4.802
|
||||||
|
2111102;444869.415;5883851.701;3.109
|
||||||
|
21112001;444882.238;5883890.294;4.781
|
||||||
|
21112002;444882.18;5883890.313;2.841
|
||||||
|
21113001;444896.159;5883933.946;4.969
|
||||||
|
21113002;444896.024;5883933.817;2.449
|
||||||
|
45
Beispieldaten/Projekt/7200-19_040423_Koord_HASW.csv
Normal file
45
Beispieldaten/Projekt/7200-19_040423_Koord_HASW.csv
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
Schachtnummer;Rechtswert;Hochwert;Höhe;Hausanschluß Code SWK
|
||||||
|
101;420525.118;5898283.87;2.596;3110
|
||||||
|
102;420525.138;5898283.788;1.629;3110
|
||||||
|
111;420519.11;5898288.743;2.525;3110
|
||||||
|
112;420519.054;5898288.721;1.561;3110
|
||||||
|
121;420512.585;5898312.924;2.624;3110
|
||||||
|
122;420512.604;5898312.905;1.658;3110
|
||||||
|
131;420479.621;5898297.627;2.699;3110
|
||||||
|
132;420479.589;5898297.639;1.741;3110
|
||||||
|
141;420457.676;5898281.71;2.665;3110
|
||||||
|
142;420457.628;5898281.778;1.688;3110
|
||||||
|
151;420479.947;5898317.208;2.73;3110
|
||||||
|
152;420479.936;5898317.257;1.755;3110
|
||||||
|
161;420489.05;5898321.1;2.702;3110
|
||||||
|
162;420489.064;5898321.146;1.727;3110
|
||||||
|
171;420520.584;5898323.676;2.586;3110
|
||||||
|
172;420520.568;5898323.67;1.613;3110
|
||||||
|
181;420526.744;5898324.15;2.555;3110
|
||||||
|
182;420526.717;5898324.179;1.587;3110
|
||||||
|
191;420546.063;5898347.415;2.539;3110
|
||||||
|
192;420545.993;5898347.392;1.572;3110
|
||||||
|
201;420524.273;5898368.273;2.746;3110
|
||||||
|
202;420524.277;5898368.292;1.784;3110
|
||||||
|
211;420532.713;5898400.195;2.619;3110
|
||||||
|
212;420532.692;5898400.2;1.665;3110
|
||||||
|
221;420544.055;5898429.683;2.744;3110
|
||||||
|
222;420544.062;5898429.671;1.779;3110
|
||||||
|
231;420544.563;5898416.187;2.624;3110
|
||||||
|
232;420544.589;5898416.171;1.665;3110
|
||||||
|
241;420542.792;5898392.819;2.576;3110
|
||||||
|
242;420542.817;5898392.832;1.629;3110
|
||||||
|
251;420547.319;5898369.867;2.572;3110
|
||||||
|
252;420547.357;5898369.913;1.61;3110
|
||||||
|
261;420557.587;5898346.087;2.508;3110
|
||||||
|
262;420557.636;5898346.053;1.544;3110
|
||||||
|
271;420575.884;5898317.999;2.39;3110
|
||||||
|
272;420575.844;5898317.917;1.431;3110
|
||||||
|
281;420569.796;5898294.838;2.566;3110
|
||||||
|
282;420569.787;5898294.812;1.611;3110
|
||||||
|
291;420565.432;5898287.139;2.545;3110
|
||||||
|
292;420565.403;5898287.156;1.573;3110
|
||||||
|
301;420546.752;5898315.768;2.458;3110
|
||||||
|
302;420546.728;5898315.724;1.49;3110
|
||||||
|
311;420540.65;5898315.193;2.486;3110
|
||||||
|
312;420540.586;5898315.16;1.507;3110
|
||||||
|
39
Beispieldaten/Projekt/7200-19_190423_Koord_SW.csv
Normal file
39
Beispieldaten/Projekt/7200-19_190423_Koord_SW.csv
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
Schachtnummer;Rechtwert;Hochwert;Höhe;Code SWK
|
||||||
|
2118401;420443.224;5898240.026;2.617;1100
|
||||||
|
2118402;420443.509;5898239.981;1.115;1100
|
||||||
|
2118403;420443.38;5898240.243;1.248;1100
|
||||||
|
S026673501;420443.741;5898249.147;2.566;1100
|
||||||
|
S026673502;420443.634;5898249.137;1.225;1100
|
||||||
|
S026672201;420466.332;5898285.83;2.582;1100
|
||||||
|
S026672202;420466.25;5898285.886;0.788;1100
|
||||||
|
S026672301;420484.518;5898316.184;2.632;1100
|
||||||
|
S026672302;420484.567;5898316.073;0.615;1100
|
||||||
|
S026672401;420519.842;5898318.781;2.475;1100
|
||||||
|
S026672402;420519.877;5898318.685;0.445;1100
|
||||||
|
S026672501;420522.578;5898288.522;2.611;1100
|
||||||
|
S026672502;420522.517;5898288.551;0.595;1100
|
||||||
|
S026672601;420553.448;5898321.473;2.379;1100
|
||||||
|
S026672602;420553.459;5898321.548;0.327;1100
|
||||||
|
S026672701;420539.332;5898422.361;2.585;1100
|
||||||
|
S026672702;420539.279;5898422.447;0.784;1100
|
||||||
|
S026672801;420536.54;5898398.464;2.549;1100
|
||||||
|
S026672802;420536.454;5898398.475;0.654;1100
|
||||||
|
S026672901;420538.901;5898366.02;2.572;1100
|
||||||
|
S026672902;420538.848;5898366;0.505;1100
|
||||||
|
S026673001;420551.865;5898345.226;2.45;1100
|
||||||
|
S026673002;420551.802;5898345.182;0.408;1100
|
||||||
|
S026673101;420562.835;5898322.415;2.376;1100
|
||||||
|
S026673102;420562.885;5898322.326;0.316;1100
|
||||||
|
S026673201;420565.218;5898292.874;2.364;1100
|
||||||
|
S026673202;420565.111;5898292.878;0.454;1100
|
||||||
|
S026673301;420592.069;5898324.437;2.304;1100
|
||||||
|
S026673302;420592.154;5898324.569;-0.405;1100
|
||||||
|
S026673304;420591.579;5898324.454;0.28;1100
|
||||||
|
S026673310;420592.091;5898324.678;-0.595;1100
|
||||||
|
S026673401;420591.18;5898330.446;2.407;1100
|
||||||
|
S026673402;420591.263;5898330.478;-1.595;1100
|
||||||
|
S026673403;420591.327;5898329.715;-0.774;1100
|
||||||
|
S026673411;420590.689;5898329.828;2.395;1100
|
||||||
|
S026673412;420590.548;5898330.964;2.392;1100
|
||||||
|
S026673413;420591.684;5898331.097;2.389;1100
|
||||||
|
S026673414;420591.817;5898329.96;2.39;1100
|
||||||
|
23
Beispieldaten/Projekt/Anschlussschächte_Hausrev6.0.rev
Normal file
23
Beispieldaten/Projekt/Anschlussschächte_Hausrev6.0.rev
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
HAUSREV6.0
|
||||||
|
S0266722AS01 ABW K S IB 2.665 1 1.688 1 420457.628 5898281.778 1
|
||||||
|
S0266722AS02 ABW K S IB 2.699 1 1.741 1 420479.589 5898297.639 1
|
||||||
|
S0266722AS03 ABW K S IB 2.730 1 1.755 1 420479.936 5898317.257 1
|
||||||
|
S0266723AS01 ABW K S IB 2.702 1 1.727 1 420489.064 5898321.146 1
|
||||||
|
S0266723AS02 ABW K S IB 2.624 1 1.658 1 420512.604 5898312.905 1
|
||||||
|
S0266725AS01 ABW K S IB 2.596 1 1.629 1 420525.138 5898283.788 1
|
||||||
|
S0266725AS02 ABW K S IB 2.525 1 1.561 1 420519.054 5898288.721 1
|
||||||
|
S0266724AS01 ABW K S IB 2.586 1 1.613 1 420520.568 5898323.670 1
|
||||||
|
S0266724AS02 ABW K S IB 2.555 1 1.587 1 420526.717 5898324.179 1
|
||||||
|
S0266724AS03 ABW K S IB 2.486 1 1.507 1 420540.586 5898315.160 1
|
||||||
|
S0266724AS04 ABW K S IB 2.458 1 1.490 1 420546.728 5898315.724 1
|
||||||
|
S0266727AS01 ABW K S IB 2.744 1 1.779 1 420544.062 5898429.671 1
|
||||||
|
S0266727AS02 ABW K S IB 2.624 1 1.665 1 420544.589 5898416.171 1
|
||||||
|
S0266727AS03 ABW K S IB 2.619 1 1.665 1 420532.692 5898400.200 1
|
||||||
|
S0266728AS01 ABW K S IB 2.576 1 1.629 1 420542.817 5898392.832 1
|
||||||
|
S0266729AS01 ABW K S IB 2.746 1 1.784 1 420524.277 5898368.292 1
|
||||||
|
S0266729AS02 ABW K S IB 2.572 1 1.610 1 420547.357 5898369.913 1
|
||||||
|
S0266729AS03 ABW K S IB 2.539 1 1.572 1 420545.993 5898347.392 1
|
||||||
|
S0266730AS01 ABW K S IB 2.508 1 1.544 1 420557.636 5898346.053 1
|
||||||
|
S0266732AS01 ABW K S IB 2.545 1 1.573 1 420565.403 5898287.156 1
|
||||||
|
S0266732AS02 ABW K S IB 2.566 1 1.611 1 420569.787 5898294.812 1
|
||||||
|
S0266731AS01 ABW K S IB 2.390 1 1.431 1 420575.844 5898317.917 1
|
||||||
14
Beispieldaten/Projekt/Haltungen_Kanhal6.0-korrigiert.hal
Normal file
14
Beispieldaten/Projekt/Haltungen_Kanhal6.0-korrigiert.hal
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
KANHAL6.0
|
||||||
|
S0266733 S0266734 S0266733 K S IB PP 1 200 200 5.976 1 -0.774 1 -0.405 1 Lieke 04.04.2023
|
||||||
|
S0266731 S0266733 S0266731 K S IB PP 1 200 200 29.355 1 0.280 1 0.316 1 Lieke 04.04.2023
|
||||||
|
S0266732 S0266731 S0266732 K S IB PP 1 200 200 29.532 1 0.316 1 0.454 1 Lieke 04.04.2023
|
||||||
|
S0266726 S0266731 S0266726 K S IB PP 1 200 200 9.458 1 0.316 1 0.327 1 Lieke 04.04.2023
|
||||||
|
S0266724 S0266726 S0266724 K S IB PP 1 200 200 33.703 1 0.327 1 0.445 1 Lieke 04.04.2023
|
||||||
|
S0266725 S0266724 S0266725 K S IB PP 1 200 200 30.249 1 0.445 1 0.595 1 Lieke 04.04.2023
|
||||||
|
S0266723 S0266724 S0266723 K S IB PP 1 200 200 35.407 1 0.445 1 0.615 1 Lieke 04.04.2023
|
||||||
|
S0266722 S0266723 S0266722 K S IB PP 1 200 200 34.310 1 0.615 1 0.788 1 Lieke 04.04.2023
|
||||||
|
S0266730 S0266726 S0266730 K S IB PP 1 200 200 23.692 1 0.327 1 0.408 1 Lieke 04.04.2023
|
||||||
|
S0266729 S0266730 S0266729 K S IB PP 1 200 200 24.519 1 0.408 1 0.505 1 Lieke 04.04.2023
|
||||||
|
S0266728 S0266729 S0266728 K S IB PP 1 200 200 32.563 1 0.505 1 0.654 1 Lieke 04.04.2023
|
||||||
|
S0266727 S0266728 S0266727 K S IB PP 1 200 200 24.138 1 0.654 1 0.784 1 Lieke 04.04.2023
|
||||||
|
S0266735 21184 S0266735 K S IB PP 1 200 200 9.157 1 1.220 1 1.225 1 Lieke 04.04.2023
|
||||||
16
Beispieldaten/Projekt/Schächte_Kansch6.0.sch
Normal file
16
Beispieldaten/Projekt/Schächte_Kansch6.0.sch
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
KANSCH6.0
|
||||||
|
S0266722 S IB RESC B 2.582 1 0.788 1 420466.250 5898285.886 1 420466.332 5898285.830 1 Lieke 04.04.2023
|
||||||
|
S0266723 S IB RESC B 2.632 1 0.615 1 420484.567 5898316.073 1 420484.518 5898316.184 1 Lieke 04.04.2023
|
||||||
|
S0266724 S IB RESC B 2.475 1 0.445 1 420519.877 5898318.685 1 420519.842 5898318.781 1 Lieke 04.04.2023
|
||||||
|
S0266725 S IB RESC B 2.611 1 0.595 1 420522.517 5898288.551 1 420522.578 5898288.522 1 Lieke 04.04.2023
|
||||||
|
S0266726 S IB RESC B 2.379 1 0.327 1 420553.459 5898321.548 1 420553.448 5898321.473 1 Lieke 04.04.2023
|
||||||
|
S0266727 S IB RESC B 2.585 1 0.784 1 420539.279 5898422.447 1 420539.332 5898422.361 1 Lieke 04.04.2023
|
||||||
|
S0266728 S IB RESC B 2.549 1 0.654 1 420536.454 5898398.475 1 420536.540 5898398.464 1 Lieke 04.04.2023
|
||||||
|
S0266729 S IB RESC B 2.572 1 0.505 1 420538.848 5898366.000 1 420538.901 5898366.020 1 Lieke 04.04.2023
|
||||||
|
S0266730 S IB RESC B 2.450 1 0.408 1 420551.802 5898345.182 1 420551.865 5898345.226 1 Lieke 04.04.2023
|
||||||
|
S0266731 S IB RESC B 2.376 1 0.316 1 420562.885 5898322.326 1 420562.835 5898322.415 1 Lieke 04.04.2023
|
||||||
|
S0266732 S IB RESC B 2.364 1 0.454 1 420565.111 5898292.878 1 420565.218 5898292.874 1 Lieke 04.04.2023
|
||||||
|
S0266733 S IB RESC B 2.304 1 -0.405 1 420592.154 5898324.569 1 420592.069 5898324.437 1 Lieke 04.04.2023
|
||||||
|
S0266734 S IB RESC B 2.407 1 -1.595 1 420591.263 5898330.478 1 420591.180 5898330.446 1 Lieke 04.04.2023
|
||||||
|
S0266735 S IB RESC B 2.566 1 1.255 1 420443.634 5898249.137 1 420443.741 5898249.147 1 Lieke 04.04.2023
|
||||||
|
|
||||||
3
Beispieldaten/Schächte.sch
Normal file
3
Beispieldaten/Schächte.sch
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
KANSCH6.0
|
||||||
|
S0269900 S IB RESC B 1.690 1 -0.013 1 479665.481 5966015.976 1 479665.490 5966015.912 1 Luebbert 22.10.2022
|
||||||
|
S0269900 S IB RESC B 1.690 1 -0.013 1 479665.481 5966015.976 1 479665.490 5966015.912 1
|
||||||
652
Beispieldaten/XML2013.xml
Normal file
652
Beispieldaten/XML2013.xml
Normal file
@@ -0,0 +1,652 @@
|
|||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<Identifikation xmlns="http://www.ofd-hannover.la/Identifikation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<Version>2013-02</Version>
|
||||||
|
<Admindaten>
|
||||||
|
<Liegenschaft>
|
||||||
|
<Liegenschaftsnummer>0056</Liegenschaftsnummer>
|
||||||
|
<Objektnummer>0056</Objektnummer>
|
||||||
|
<Liegenschaftsbezeichnung>0056</Liegenschaftsbezeichnung>
|
||||||
|
<LiegenschaftsPLZ>26506</LiegenschaftsPLZ>
|
||||||
|
<Liegenschaftsort>Varel</Liegenschaftsort>
|
||||||
|
<Liegenschaftsnutzung>komunal</Liegenschaftsnutzung>
|
||||||
|
</Liegenschaft>
|
||||||
|
<Verwaltung>
|
||||||
|
<DienststelleVerwaltend>123</DienststelleVerwaltend>
|
||||||
|
<DienststelleHausverwaltend>123</DienststelleHausverwaltend>
|
||||||
|
<DienststelleBauaufsicht>123</DienststelleBauaufsicht>
|
||||||
|
<DienststelleBaudurchfuehrung>123</DienststelleBaudurchfuehrung>
|
||||||
|
<NummerDienststelleBaudurchfuehrung>123</NummerDienststelleBaudurchfuehrung>
|
||||||
|
<Zustaendigkeitsbereich>123</Zustaendigkeitsbereich>
|
||||||
|
<Aktenzeichen>123</Aktenzeichen>
|
||||||
|
<Abwasserbeseitigungspflicht>1</Abwasserbeseitigungspflicht>
|
||||||
|
<Wasserbehoerde>123</Wasserbehoerde>
|
||||||
|
</Verwaltung>
|
||||||
|
</Admindaten>
|
||||||
|
<Datenkollektive>
|
||||||
|
<Datenstatus>1</Datenstatus>
|
||||||
|
<Erstellungsdatum>2023-04-19</Erstellungsdatum>
|
||||||
|
<Kennungen>
|
||||||
|
<Kollektiv>
|
||||||
|
<Kennung>STA01</Kennung>
|
||||||
|
<Kollektivart>1</Kollektivart>
|
||||||
|
<Kollektiveigenschaft>
|
||||||
|
<Stammdaten>
|
||||||
|
<Stammdatentyp>1</Stammdatentyp>
|
||||||
|
<Bautechnik>1</Bautechnik>
|
||||||
|
<Geometrie>1</Geometrie>
|
||||||
|
<Sanierung>0</Sanierung>
|
||||||
|
<Umfeld>0</Umfeld>
|
||||||
|
</Stammdaten>
|
||||||
|
</Kollektiveigenschaft>
|
||||||
|
<Regelwerk>5</Regelwerk>
|
||||||
|
<Bearbeitungsstand>2022-02-04</Bearbeitungsstand>
|
||||||
|
</Kollektiv>
|
||||||
|
</Kennungen>
|
||||||
|
<Stammdatenkollektiv>
|
||||||
|
<Kennung>STA01</Kennung>
|
||||||
|
<AbwassertechnischeAnlage>
|
||||||
|
<Objektbezeichnung>01440146</Objektbezeichnung>
|
||||||
|
<Objektart>1</Objektart>
|
||||||
|
<Entwaesserungsart>KS</Entwaesserungsart>
|
||||||
|
<Kante>
|
||||||
|
<KantenTyp>0</KantenTyp>
|
||||||
|
<KnotenZulauf>01440146</KnotenZulauf>
|
||||||
|
<KnotenZulaufTyp>0</KnotenZulaufTyp>
|
||||||
|
<KnotenAblauf>01440147</KnotenAblauf>
|
||||||
|
<KnotenAblaufTyp>0</KnotenAblaufTyp>
|
||||||
|
<Material>W</Material>
|
||||||
|
<Profil>
|
||||||
|
<SonderprofilVorhanden>0</SonderprofilVorhanden>
|
||||||
|
<Profilart>0</Profilart>
|
||||||
|
<Profilbreite>200</Profilbreite>
|
||||||
|
<Profilhoehe>200</Profilhoehe>
|
||||||
|
</Profil>
|
||||||
|
<Haltung>
|
||||||
|
<HaltungsFunktion>1</HaltungsFunktion>
|
||||||
|
<DMPLaenge>42.29</DMPLaenge>
|
||||||
|
</Haltung>
|
||||||
|
</Kante>
|
||||||
|
<Lage>
|
||||||
|
<Strassenschluessel>6302</Strassenschluessel>
|
||||||
|
<Strassenname>ERLENSTRA<EFBFBD>E</Strassenname>
|
||||||
|
</Lage>
|
||||||
|
<Geometrie>
|
||||||
|
<GeoObjekttyp>L</GeoObjekttyp>
|
||||||
|
<Geometriedaten>
|
||||||
|
<Kanten>
|
||||||
|
<Kante>
|
||||||
|
<Start>
|
||||||
|
<Rechtswert>440835.938</Rechtswert>
|
||||||
|
<Hochwert>5917432.636</Hochwert>
|
||||||
|
<Punkthoehe>-0.060</Punkthoehe>
|
||||||
|
<PunktattributAbwasser>SMP</PunktattributAbwasser>
|
||||||
|
</Start>
|
||||||
|
<Ende>
|
||||||
|
<Rechtswert>440859.955</Rechtswert>
|
||||||
|
<Hochwert>5917467.421</Hochwert>
|
||||||
|
<Punkthoehe>-0.110</Punkthoehe>
|
||||||
|
<PunktattributAbwasser>SMP</PunktattributAbwasser>
|
||||||
|
</Ende>
|
||||||
|
</Kante>
|
||||||
|
</Kanten>
|
||||||
|
</Geometriedaten>
|
||||||
|
</Geometrie>
|
||||||
|
</AbwassertechnischeAnlage>
|
||||||
|
<AbwassertechnischeAnlage>
|
||||||
|
<Objektbezeichnung>01440147</Objektbezeichnung>
|
||||||
|
<Objektart>1</Objektart>
|
||||||
|
<Entwaesserungsart>KS</Entwaesserungsart>
|
||||||
|
<Kante>
|
||||||
|
<KantenTyp>0</KantenTyp>
|
||||||
|
<KnotenZulauf>01440147</KnotenZulauf>
|
||||||
|
<KnotenZulaufTyp>0</KnotenZulaufTyp>
|
||||||
|
<KnotenAblauf>01440148</KnotenAblauf>
|
||||||
|
<KnotenAblaufTyp>0</KnotenAblaufTyp>
|
||||||
|
<Material>W</Material>
|
||||||
|
<Profil>
|
||||||
|
<SonderprofilVorhanden>0</SonderprofilVorhanden>
|
||||||
|
<Profilart>0</Profilart>
|
||||||
|
<Profilbreite>200</Profilbreite>
|
||||||
|
<Profilhoehe>200</Profilhoehe>
|
||||||
|
</Profil>
|
||||||
|
<Haltung>
|
||||||
|
<HaltungsFunktion>1</HaltungsFunktion>
|
||||||
|
<DMPLaenge>43.24</DMPLaenge>
|
||||||
|
</Haltung>
|
||||||
|
</Kante>
|
||||||
|
<Lage>
|
||||||
|
<Strassenschluessel>6302</Strassenschluessel>
|
||||||
|
<Strassenname>ERLENSTRA<EFBFBD>E</Strassenname>
|
||||||
|
</Lage>
|
||||||
|
<Geometrie>
|
||||||
|
<GeoObjekttyp>L</GeoObjekttyp>
|
||||||
|
<Geometriedaten>
|
||||||
|
<Kanten>
|
||||||
|
<Kante>
|
||||||
|
<Start>
|
||||||
|
<Rechtswert>440859.955</Rechtswert>
|
||||||
|
<Hochwert>5917467.421</Hochwert>
|
||||||
|
<Punkthoehe>-0.110</Punkthoehe>
|
||||||
|
<PunktattributAbwasser>SMP</PunktattributAbwasser>
|
||||||
|
</Start>
|
||||||
|
<Ende>
|
||||||
|
<Rechtswert>440884.457</Rechtswert>
|
||||||
|
<Hochwert>5917503.030</Hochwert>
|
||||||
|
<Punkthoehe>-0.230</Punkthoehe>
|
||||||
|
<PunktattributAbwasser>SMP</PunktattributAbwasser>
|
||||||
|
</Ende>
|
||||||
|
</Kante>
|
||||||
|
</Kanten>
|
||||||
|
</Geometriedaten>
|
||||||
|
</Geometrie>
|
||||||
|
</AbwassertechnischeAnlage>
|
||||||
|
<AbwassertechnischeAnlage>
|
||||||
|
<Objektbezeichnung>01440148</Objektbezeichnung>
|
||||||
|
<Objektart>1</Objektart>
|
||||||
|
<Entwaesserungsart>KS</Entwaesserungsart>
|
||||||
|
<Kante>
|
||||||
|
<KantenTyp>0</KantenTyp>
|
||||||
|
<KnotenZulauf>01440148</KnotenZulauf>
|
||||||
|
<KnotenZulaufTyp>0</KnotenZulaufTyp>
|
||||||
|
<KnotenAblauf>01440149</KnotenAblauf>
|
||||||
|
<KnotenAblaufTyp>0</KnotenAblaufTyp>
|
||||||
|
<Material>W</Material>
|
||||||
|
<Profil>
|
||||||
|
<SonderprofilVorhanden>0</SonderprofilVorhanden>
|
||||||
|
<Profilart>0</Profilart>
|
||||||
|
<Profilbreite>200</Profilbreite>
|
||||||
|
<Profilhoehe>200</Profilhoehe>
|
||||||
|
</Profil>
|
||||||
|
<Haltung>
|
||||||
|
<HaltungsFunktion>1</HaltungsFunktion>
|
||||||
|
<DMPLaenge>43.24</DMPLaenge>
|
||||||
|
</Haltung>
|
||||||
|
</Kante>
|
||||||
|
<Lage>
|
||||||
|
<Strassenschluessel>6302</Strassenschluessel>
|
||||||
|
<Strassenname>ERLENSTRA<EFBFBD>E</Strassenname>
|
||||||
|
</Lage>
|
||||||
|
<Geometrie>
|
||||||
|
<GeoObjekttyp>L</GeoObjekttyp>
|
||||||
|
<Geometriedaten>
|
||||||
|
<Kanten>
|
||||||
|
<Kante>
|
||||||
|
<Start>
|
||||||
|
<Rechtswert>440884.457</Rechtswert>
|
||||||
|
<Hochwert>5917503.030</Hochwert>
|
||||||
|
<Punkthoehe>-0.230</Punkthoehe>
|
||||||
|
<PunktattributAbwasser>SMP</PunktattributAbwasser>
|
||||||
|
</Start>
|
||||||
|
<Ende>
|
||||||
|
<Rechtswert>440910.365</Rechtswert>
|
||||||
|
<Hochwert>5917537.631</Hochwert>
|
||||||
|
<Punkthoehe>-0.360</Punkthoehe>
|
||||||
|
<PunktattributAbwasser>SMP</PunktattributAbwasser>
|
||||||
|
</Ende>
|
||||||
|
</Kante>
|
||||||
|
</Kanten>
|
||||||
|
</Geometriedaten>
|
||||||
|
</Geometrie>
|
||||||
|
</AbwassertechnischeAnlage>
|
||||||
|
<AbwassertechnischeAnlage>
|
||||||
|
<Objektbezeichnung>01440149</Objektbezeichnung>
|
||||||
|
<Objektart>1</Objektart>
|
||||||
|
<Entwaesserungsart>KS</Entwaesserungsart>
|
||||||
|
<Kante>
|
||||||
|
<KantenTyp>0</KantenTyp>
|
||||||
|
<KnotenZulauf>01440149</KnotenZulauf>
|
||||||
|
<KnotenZulaufTyp>0</KnotenZulaufTyp>
|
||||||
|
<KnotenAblauf>01440010</KnotenAblauf>
|
||||||
|
<KnotenAblaufTyp>0</KnotenAblaufTyp>
|
||||||
|
<Material>W</Material>
|
||||||
|
<Profil>
|
||||||
|
<SonderprofilVorhanden>0</SonderprofilVorhanden>
|
||||||
|
<Profilart>0</Profilart>
|
||||||
|
<Profilbreite>200</Profilbreite>
|
||||||
|
<Profilhoehe>200</Profilhoehe>
|
||||||
|
</Profil>
|
||||||
|
<Haltung>
|
||||||
|
<HaltungsFunktion>1</HaltungsFunktion>
|
||||||
|
<DMPLaenge>38.60</DMPLaenge>
|
||||||
|
</Haltung>
|
||||||
|
</Kante>
|
||||||
|
<Lage>
|
||||||
|
<Strassenschluessel>6302</Strassenschluessel>
|
||||||
|
<Strassenname>ERLENSTRA<EFBFBD>E</Strassenname>
|
||||||
|
</Lage>
|
||||||
|
<Geometrie>
|
||||||
|
<GeoObjekttyp>L</GeoObjekttyp>
|
||||||
|
<Geometriedaten>
|
||||||
|
<Kanten>
|
||||||
|
<Kante>
|
||||||
|
<Start>
|
||||||
|
<Rechtswert>440910.365</Rechtswert>
|
||||||
|
<Hochwert>5917537.631</Hochwert>
|
||||||
|
<Punkthoehe>-0.360</Punkthoehe>
|
||||||
|
<PunktattributAbwasser>SMP</PunktattributAbwasser>
|
||||||
|
</Start>
|
||||||
|
<Ende>
|
||||||
|
<Rechtswert>440935.848</Rechtswert>
|
||||||
|
<Hochwert>5917566.607</Hochwert>
|
||||||
|
<Punkthoehe>-0.460</Punkthoehe>
|
||||||
|
<PunktattributAbwasser>SMP</PunktattributAbwasser>
|
||||||
|
</Ende>
|
||||||
|
</Kante>
|
||||||
|
</Kanten>
|
||||||
|
</Geometriedaten>
|
||||||
|
</Geometrie>
|
||||||
|
</AbwassertechnischeAnlage>
|
||||||
|
<AbwassertechnischeAnlage>
|
||||||
|
<Objektbezeichnung>01440150</Objektbezeichnung>
|
||||||
|
<Objektart>1</Objektart>
|
||||||
|
<Entwaesserungsart>KS</Entwaesserungsart>
|
||||||
|
<Kante>
|
||||||
|
<KantenTyp>0</KantenTyp>
|
||||||
|
<KnotenZulauf>01440150</KnotenZulauf>
|
||||||
|
<KnotenZulaufTyp>0</KnotenZulaufTyp>
|
||||||
|
<KnotenAblauf>01440148</KnotenAblauf>
|
||||||
|
<KnotenAblaufTyp>0</KnotenAblaufTyp>
|
||||||
|
<SohlhoeheAblauf>0.740</SohlhoeheAblauf>
|
||||||
|
<Material>W</Material>
|
||||||
|
<Profil>
|
||||||
|
<SonderprofilVorhanden>0</SonderprofilVorhanden>
|
||||||
|
<Profilart>0</Profilart>
|
||||||
|
<Profilbreite>200</Profilbreite>
|
||||||
|
<Profilhoehe>200</Profilhoehe>
|
||||||
|
</Profil>
|
||||||
|
<Haltung>
|
||||||
|
<HaltungsFunktion>1</HaltungsFunktion>
|
||||||
|
<DMPLaenge>37.94</DMPLaenge>
|
||||||
|
</Haltung>
|
||||||
|
</Kante>
|
||||||
|
<Lage>
|
||||||
|
<Strassenschluessel>6302</Strassenschluessel>
|
||||||
|
<Strassenname>ERLENSTRA<EFBFBD>E</Strassenname>
|
||||||
|
</Lage>
|
||||||
|
<Geometrie>
|
||||||
|
<GeoObjekttyp>L</GeoObjekttyp>
|
||||||
|
<Geometriedaten>
|
||||||
|
<Kanten>
|
||||||
|
<Kante>
|
||||||
|
<Start>
|
||||||
|
<Rechtswert>440916.606</Rechtswert>
|
||||||
|
<Hochwert>5917482.916</Hochwert>
|
||||||
|
<Punkthoehe>0.920</Punkthoehe>
|
||||||
|
<PunktattributAbwasser>SMP</PunktattributAbwasser>
|
||||||
|
</Start>
|
||||||
|
<Ende>
|
||||||
|
<Rechtswert>440884.457</Rechtswert>
|
||||||
|
<Hochwert>5917503.030</Hochwert>
|
||||||
|
<Punkthoehe>-0.230</Punkthoehe>
|
||||||
|
<PunktattributAbwasser>SMP</PunktattributAbwasser>
|
||||||
|
</Ende>
|
||||||
|
</Kante>
|
||||||
|
</Kanten>
|
||||||
|
</Geometriedaten>
|
||||||
|
</Geometrie>
|
||||||
|
</AbwassertechnischeAnlage>
|
||||||
|
<AbwassertechnischeAnlage>
|
||||||
|
<Objektbezeichnung>01440152</Objektbezeichnung>
|
||||||
|
<Objektart>1</Objektart>
|
||||||
|
<Entwaesserungsart>KS</Entwaesserungsart>
|
||||||
|
<Kante>
|
||||||
|
<KantenTyp>0</KantenTyp>
|
||||||
|
<KnotenZulauf>01440152</KnotenZulauf>
|
||||||
|
<KnotenZulaufTyp>0</KnotenZulaufTyp>
|
||||||
|
<KnotenAblauf>01440153</KnotenAblauf>
|
||||||
|
<KnotenAblaufTyp>0</KnotenAblaufTyp>
|
||||||
|
<Material>W</Material>
|
||||||
|
<Profil>
|
||||||
|
<SonderprofilVorhanden>0</SonderprofilVorhanden>
|
||||||
|
<Profilart>0</Profilart>
|
||||||
|
<Profilbreite>200</Profilbreite>
|
||||||
|
<Profilhoehe>200</Profilhoehe>
|
||||||
|
</Profil>
|
||||||
|
<Haltung>
|
||||||
|
<HaltungsFunktion>1</HaltungsFunktion>
|
||||||
|
<DMPLaenge>35.81</DMPLaenge>
|
||||||
|
</Haltung>
|
||||||
|
</Kante>
|
||||||
|
<Lage>
|
||||||
|
<Strassenschluessel>6302</Strassenschluessel>
|
||||||
|
<Strassenname>ERLENSTRA<EFBFBD>E</Strassenname>
|
||||||
|
</Lage>
|
||||||
|
<Geometrie>
|
||||||
|
<GeoObjekttyp>L</GeoObjekttyp>
|
||||||
|
<Geometriedaten>
|
||||||
|
<Kanten>
|
||||||
|
<Kante>
|
||||||
|
<Start>
|
||||||
|
<Rechtswert>440828.335</Rechtswert>
|
||||||
|
<Hochwert>5917544.789</Hochwert>
|
||||||
|
<Punkthoehe>0.990</Punkthoehe>
|
||||||
|
<PunktattributAbwasser>SMP</PunktattributAbwasser>
|
||||||
|
</Start>
|
||||||
|
<Ende>
|
||||||
|
<Rechtswert>440857.054</Rechtswert>
|
||||||
|
<Hochwert>5917523.416</Hochwert>
|
||||||
|
<Punkthoehe>0.760</Punkthoehe>
|
||||||
|
<PunktattributAbwasser>SMP</PunktattributAbwasser>
|
||||||
|
</Ende>
|
||||||
|
</Kante>
|
||||||
|
</Kanten>
|
||||||
|
</Geometriedaten>
|
||||||
|
</Geometrie>
|
||||||
|
</AbwassertechnischeAnlage>
|
||||||
|
<AbwassertechnischeAnlage>
|
||||||
|
<Objektbezeichnung>01440153</Objektbezeichnung>
|
||||||
|
<Objektart>1</Objektart>
|
||||||
|
<Entwaesserungsart>KS</Entwaesserungsart>
|
||||||
|
<Kante>
|
||||||
|
<KantenTyp>0</KantenTyp>
|
||||||
|
<KnotenZulauf>01440153</KnotenZulauf>
|
||||||
|
<KnotenZulaufTyp>0</KnotenZulaufTyp>
|
||||||
|
<KnotenAblauf>01440148</KnotenAblauf>
|
||||||
|
<KnotenAblaufTyp>0</KnotenAblaufTyp>
|
||||||
|
<SohlhoeheAblauf>0.600</SohlhoeheAblauf>
|
||||||
|
<Material>W</Material>
|
||||||
|
<Profil>
|
||||||
|
<SonderprofilVorhanden>0</SonderprofilVorhanden>
|
||||||
|
<Profilart>0</Profilart>
|
||||||
|
<Profilbreite>200</Profilbreite>
|
||||||
|
<Profilhoehe>200</Profilhoehe>
|
||||||
|
</Profil>
|
||||||
|
<Haltung>
|
||||||
|
<HaltungsFunktion>1</HaltungsFunktion>
|
||||||
|
<DMPLaenge>34.17</DMPLaenge>
|
||||||
|
</Haltung>
|
||||||
|
</Kante>
|
||||||
|
<Lage>
|
||||||
|
<Strassenschluessel>6302</Strassenschluessel>
|
||||||
|
<Strassenname>ERLENSTRA<EFBFBD>E</Strassenname>
|
||||||
|
</Lage>
|
||||||
|
<Geometrie>
|
||||||
|
<GeoObjekttyp>L</GeoObjekttyp>
|
||||||
|
<Geometriedaten>
|
||||||
|
<Kanten>
|
||||||
|
<Kante>
|
||||||
|
<Start>
|
||||||
|
<Rechtswert>440857.054</Rechtswert>
|
||||||
|
<Hochwert>5917523.416</Hochwert>
|
||||||
|
<Punkthoehe>0.760</Punkthoehe>
|
||||||
|
<PunktattributAbwasser>SMP</PunktattributAbwasser>
|
||||||
|
</Start>
|
||||||
|
<Ende>
|
||||||
|
<Rechtswert>440884.457</Rechtswert>
|
||||||
|
<Hochwert>5917503.030</Hochwert>
|
||||||
|
<Punkthoehe>-0.230</Punkthoehe>
|
||||||
|
<PunktattributAbwasser>SMP</PunktattributAbwasser>
|
||||||
|
</Ende>
|
||||||
|
</Kante>
|
||||||
|
</Kanten>
|
||||||
|
</Geometriedaten>
|
||||||
|
</Geometrie>
|
||||||
|
</AbwassertechnischeAnlage>
|
||||||
|
<AbwassertechnischeAnlage>
|
||||||
|
<Objektbezeichnung>01440010</Objektbezeichnung>
|
||||||
|
<Objektart>2</Objektart>
|
||||||
|
<Baujahr>1972</Baujahr>
|
||||||
|
<Entwaesserungsart>KS</Entwaesserungsart>
|
||||||
|
<Knoten>
|
||||||
|
<KnotenTyp>0</KnotenTyp>
|
||||||
|
<Schacht>
|
||||||
|
<SchachtFunktion>1</SchachtFunktion>
|
||||||
|
</Schacht>
|
||||||
|
</Knoten>
|
||||||
|
<Lage>
|
||||||
|
<Strassenschluessel>6310</Strassenschluessel>
|
||||||
|
<Strassenname>SIEDLUNGSWEG</Strassenname>
|
||||||
|
</Lage>
|
||||||
|
<Geometrie>
|
||||||
|
<VorlaeufigeBezeichnung>01440010</VorlaeufigeBezeichnung>
|
||||||
|
<GeoObjekttyp>P</GeoObjekttyp>
|
||||||
|
<Geometriedaten>
|
||||||
|
<Knoten>
|
||||||
|
<Punkt>
|
||||||
|
<Rechtswert>440935.848</Rechtswert>
|
||||||
|
<Hochwert>5917566.607</Hochwert>
|
||||||
|
<Punkthoehe>-0.460</Punkthoehe>
|
||||||
|
<PunktattributAbwasser>SMP</PunktattributAbwasser>
|
||||||
|
</Punkt>
|
||||||
|
<Punkt>
|
||||||
|
<Punkthoehe>2.860</Punkthoehe>
|
||||||
|
<PunktattributAbwasser>DMP</PunktattributAbwasser>
|
||||||
|
</Punkt>
|
||||||
|
</Knoten>
|
||||||
|
</Geometriedaten>
|
||||||
|
</Geometrie>
|
||||||
|
</AbwassertechnischeAnlage>
|
||||||
|
<AbwassertechnischeAnlage>
|
||||||
|
<Objektbezeichnung>01440146</Objektbezeichnung>
|
||||||
|
<Objektart>2</Objektart>
|
||||||
|
<Entwaesserungsart>KS</Entwaesserungsart>
|
||||||
|
<Knoten>
|
||||||
|
<KnotenTyp>0</KnotenTyp>
|
||||||
|
<Schacht>
|
||||||
|
<SchachtFunktion>1</SchachtFunktion>
|
||||||
|
</Schacht>
|
||||||
|
</Knoten>
|
||||||
|
<Lage>
|
||||||
|
<Strassenschluessel>6301</Strassenschluessel>
|
||||||
|
<Strassenname>AHORNSTRA<EFBFBD>E</Strassenname>
|
||||||
|
</Lage>
|
||||||
|
<Geometrie>
|
||||||
|
<VorlaeufigeBezeichnung>01440146</VorlaeufigeBezeichnung>
|
||||||
|
<GeoObjekttyp>P</GeoObjekttyp>
|
||||||
|
<Geometriedaten>
|
||||||
|
<Knoten>
|
||||||
|
<Punkt>
|
||||||
|
<Rechtswert>440835.938</Rechtswert>
|
||||||
|
<Hochwert>5917432.636</Hochwert>
|
||||||
|
<Punkthoehe>-0.060</Punkthoehe>
|
||||||
|
<PunktattributAbwasser>SMP</PunktattributAbwasser>
|
||||||
|
</Punkt>
|
||||||
|
<Punkt>
|
||||||
|
<Punkthoehe>2.580</Punkthoehe>
|
||||||
|
<PunktattributAbwasser>DMP</PunktattributAbwasser>
|
||||||
|
</Punkt>
|
||||||
|
</Knoten>
|
||||||
|
</Geometriedaten>
|
||||||
|
</Geometrie>
|
||||||
|
</AbwassertechnischeAnlage>
|
||||||
|
<AbwassertechnischeAnlage>
|
||||||
|
<Objektbezeichnung>01440147</Objektbezeichnung>
|
||||||
|
<Objektart>2</Objektart>
|
||||||
|
<Entwaesserungsart>KS</Entwaesserungsart>
|
||||||
|
<Knoten>
|
||||||
|
<KnotenTyp>0</KnotenTyp>
|
||||||
|
<Schacht>
|
||||||
|
<SchachtFunktion>1</SchachtFunktion>
|
||||||
|
</Schacht>
|
||||||
|
</Knoten>
|
||||||
|
<Lage>
|
||||||
|
<Strassenschluessel>6302</Strassenschluessel>
|
||||||
|
<Strassenname>ERLENSTRA<EFBFBD>E</Strassenname>
|
||||||
|
</Lage>
|
||||||
|
<Geometrie>
|
||||||
|
<VorlaeufigeBezeichnung>01440147</VorlaeufigeBezeichnung>
|
||||||
|
<GeoObjekttyp>P</GeoObjekttyp>
|
||||||
|
<Geometriedaten>
|
||||||
|
<Knoten>
|
||||||
|
<Punkt>
|
||||||
|
<Rechtswert>440859.955</Rechtswert>
|
||||||
|
<Hochwert>5917467.421</Hochwert>
|
||||||
|
<Punkthoehe>-0.110</Punkthoehe>
|
||||||
|
<PunktattributAbwasser>SMP</PunktattributAbwasser>
|
||||||
|
</Punkt>
|
||||||
|
<Punkt>
|
||||||
|
<Punkthoehe>2.490</Punkthoehe>
|
||||||
|
<PunktattributAbwasser>DMP</PunktattributAbwasser>
|
||||||
|
</Punkt>
|
||||||
|
</Knoten>
|
||||||
|
</Geometriedaten>
|
||||||
|
</Geometrie>
|
||||||
|
</AbwassertechnischeAnlage>
|
||||||
|
<AbwassertechnischeAnlage>
|
||||||
|
<Objektbezeichnung>01440148</Objektbezeichnung>
|
||||||
|
<Objektart>2</Objektart>
|
||||||
|
<Entwaesserungsart>KS</Entwaesserungsart>
|
||||||
|
<Knoten>
|
||||||
|
<KnotenTyp>0</KnotenTyp>
|
||||||
|
<Schacht>
|
||||||
|
<SchachtFunktion>1</SchachtFunktion>
|
||||||
|
</Schacht>
|
||||||
|
</Knoten>
|
||||||
|
<Lage>
|
||||||
|
<Strassenschluessel>6302</Strassenschluessel>
|
||||||
|
<Strassenname>ERLENSTRA<EFBFBD>E</Strassenname>
|
||||||
|
</Lage>
|
||||||
|
<Geometrie>
|
||||||
|
<VorlaeufigeBezeichnung>01440148</VorlaeufigeBezeichnung>
|
||||||
|
<GeoObjekttyp>P</GeoObjekttyp>
|
||||||
|
<Geometriedaten>
|
||||||
|
<Knoten>
|
||||||
|
<Punkt>
|
||||||
|
<Rechtswert>440884.457</Rechtswert>
|
||||||
|
<Hochwert>5917503.030</Hochwert>
|
||||||
|
<Punkthoehe>-0.230</Punkthoehe>
|
||||||
|
<PunktattributAbwasser>SMP</PunktattributAbwasser>
|
||||||
|
</Punkt>
|
||||||
|
<Punkt>
|
||||||
|
<Punkthoehe>2.490</Punkthoehe>
|
||||||
|
<PunktattributAbwasser>DMP</PunktattributAbwasser>
|
||||||
|
</Punkt>
|
||||||
|
</Knoten>
|
||||||
|
</Geometriedaten>
|
||||||
|
</Geometrie>
|
||||||
|
</AbwassertechnischeAnlage>
|
||||||
|
<AbwassertechnischeAnlage>
|
||||||
|
<Objektbezeichnung>01440149</Objektbezeichnung>
|
||||||
|
<Objektart>2</Objektart>
|
||||||
|
<Entwaesserungsart>KS</Entwaesserungsart>
|
||||||
|
<Knoten>
|
||||||
|
<KnotenTyp>0</KnotenTyp>
|
||||||
|
<Schacht>
|
||||||
|
<SchachtFunktion>1</SchachtFunktion>
|
||||||
|
</Schacht>
|
||||||
|
</Knoten>
|
||||||
|
<Lage>
|
||||||
|
<Strassenschluessel>6302</Strassenschluessel>
|
||||||
|
<Strassenname>ERLENSTRA<EFBFBD>E</Strassenname>
|
||||||
|
</Lage>
|
||||||
|
<Geometrie>
|
||||||
|
<VorlaeufigeBezeichnung>01440149</VorlaeufigeBezeichnung>
|
||||||
|
<GeoObjekttyp>P</GeoObjekttyp>
|
||||||
|
<Geometriedaten>
|
||||||
|
<Knoten>
|
||||||
|
<Punkt>
|
||||||
|
<Rechtswert>440910.365</Rechtswert>
|
||||||
|
<Hochwert>5917537.631</Hochwert>
|
||||||
|
<Punkthoehe>-0.360</Punkthoehe>
|
||||||
|
<PunktattributAbwasser>SMP</PunktattributAbwasser>
|
||||||
|
</Punkt>
|
||||||
|
<Punkt>
|
||||||
|
<Punkthoehe>2.630</Punkthoehe>
|
||||||
|
<PunktattributAbwasser>DMP</PunktattributAbwasser>
|
||||||
|
</Punkt>
|
||||||
|
</Knoten>
|
||||||
|
</Geometriedaten>
|
||||||
|
</Geometrie>
|
||||||
|
</AbwassertechnischeAnlage>
|
||||||
|
<AbwassertechnischeAnlage>
|
||||||
|
<Objektbezeichnung>01440150</Objektbezeichnung>
|
||||||
|
<Objektart>2</Objektart>
|
||||||
|
<Entwaesserungsart>KS</Entwaesserungsart>
|
||||||
|
<Knoten>
|
||||||
|
<KnotenTyp>0</KnotenTyp>
|
||||||
|
<Schacht>
|
||||||
|
<SchachtFunktion>1</SchachtFunktion>
|
||||||
|
</Schacht>
|
||||||
|
</Knoten>
|
||||||
|
<Lage>
|
||||||
|
<Strassenschluessel>6302</Strassenschluessel>
|
||||||
|
<Strassenname>ERLENSTRA<EFBFBD>E</Strassenname>
|
||||||
|
</Lage>
|
||||||
|
<Geometrie>
|
||||||
|
<VorlaeufigeBezeichnung>01440150</VorlaeufigeBezeichnung>
|
||||||
|
<GeoObjekttyp>P</GeoObjekttyp>
|
||||||
|
<Geometriedaten>
|
||||||
|
<Knoten>
|
||||||
|
<Punkt>
|
||||||
|
<Rechtswert>440916.606</Rechtswert>
|
||||||
|
<Hochwert>5917482.916</Hochwert>
|
||||||
|
<Punkthoehe>0.920</Punkthoehe>
|
||||||
|
<PunktattributAbwasser>SMP</PunktattributAbwasser>
|
||||||
|
</Punkt>
|
||||||
|
<Punkt>
|
||||||
|
<Punkthoehe>2.770</Punkthoehe>
|
||||||
|
<PunktattributAbwasser>DMP</PunktattributAbwasser>
|
||||||
|
</Punkt>
|
||||||
|
</Knoten>
|
||||||
|
</Geometriedaten>
|
||||||
|
</Geometrie>
|
||||||
|
</AbwassertechnischeAnlage>
|
||||||
|
<AbwassertechnischeAnlage>
|
||||||
|
<Objektbezeichnung>01440152</Objektbezeichnung>
|
||||||
|
<Objektart>2</Objektart>
|
||||||
|
<Entwaesserungsart>KS</Entwaesserungsart>
|
||||||
|
<Knoten>
|
||||||
|
<KnotenTyp>0</KnotenTyp>
|
||||||
|
<Schacht>
|
||||||
|
<SchachtFunktion>1</SchachtFunktion>
|
||||||
|
</Schacht>
|
||||||
|
</Knoten>
|
||||||
|
<Lage>
|
||||||
|
<Strassenschluessel>6302</Strassenschluessel>
|
||||||
|
<Strassenname>ERLENSTRA<EFBFBD>E</Strassenname>
|
||||||
|
</Lage>
|
||||||
|
<Geometrie>
|
||||||
|
<VorlaeufigeBezeichnung>01440152</VorlaeufigeBezeichnung>
|
||||||
|
<GeoObjekttyp>P</GeoObjekttyp>
|
||||||
|
<Geometriedaten>
|
||||||
|
<Knoten>
|
||||||
|
<Punkt>
|
||||||
|
<Rechtswert>440828.335</Rechtswert>
|
||||||
|
<Hochwert>5917544.789</Hochwert>
|
||||||
|
<Punkthoehe>0.990</Punkthoehe>
|
||||||
|
<PunktattributAbwasser>SMP</PunktattributAbwasser>
|
||||||
|
</Punkt>
|
||||||
|
<Punkt>
|
||||||
|
<Punkthoehe>2.100</Punkthoehe>
|
||||||
|
<PunktattributAbwasser>DMP</PunktattributAbwasser>
|
||||||
|
</Punkt>
|
||||||
|
</Knoten>
|
||||||
|
</Geometriedaten>
|
||||||
|
</Geometrie>
|
||||||
|
</AbwassertechnischeAnlage>
|
||||||
|
<AbwassertechnischeAnlage>
|
||||||
|
<Objektbezeichnung>01440153</Objektbezeichnung>
|
||||||
|
<Objektart>2</Objektart>
|
||||||
|
<Entwaesserungsart>KS</Entwaesserungsart>
|
||||||
|
<Knoten>
|
||||||
|
<KnotenTyp>0</KnotenTyp>
|
||||||
|
<Schacht>
|
||||||
|
<SchachtFunktion>1</SchachtFunktion>
|
||||||
|
</Schacht>
|
||||||
|
</Knoten>
|
||||||
|
<Lage>
|
||||||
|
<Strassenschluessel>6302</Strassenschluessel>
|
||||||
|
<Strassenname>ERLENSTRA<EFBFBD>E</Strassenname>
|
||||||
|
</Lage>
|
||||||
|
<Geometrie>
|
||||||
|
<VorlaeufigeBezeichnung>01440153</VorlaeufigeBezeichnung>
|
||||||
|
<GeoObjekttyp>P</GeoObjekttyp>
|
||||||
|
<Geometriedaten>
|
||||||
|
<Knoten>
|
||||||
|
<Punkt>
|
||||||
|
<Rechtswert>440857.054</Rechtswert>
|
||||||
|
<Hochwert>5917523.416</Hochwert>
|
||||||
|
<Punkthoehe>0.760</Punkthoehe>
|
||||||
|
<PunktattributAbwasser>SMP</PunktattributAbwasser>
|
||||||
|
</Punkt>
|
||||||
|
<Punkt>
|
||||||
|
<Punkthoehe>2.260</Punkthoehe>
|
||||||
|
<PunktattributAbwasser>DMP</PunktattributAbwasser>
|
||||||
|
</Punkt>
|
||||||
|
</Knoten>
|
||||||
|
</Geometriedaten>
|
||||||
|
</Geometrie>
|
||||||
|
</AbwassertechnischeAnlage>
|
||||||
|
</Stammdatenkollektiv>
|
||||||
|
</Datenkollektive>
|
||||||
|
</Identifikation>
|
||||||
BIN
Beispieldaten/novaKANDIS10_Schnittstellen-Formatbeschreibung.pdf
Normal file
BIN
Beispieldaten/novaKANDIS10_Schnittstellen-Formatbeschreibung.pdf
Normal file
Binary file not shown.
20
SQL/Auftraggeber.sql
Normal file
20
SQL/Auftraggeber.sql
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
-- Table: public.auftraggeber
|
||||||
|
|
||||||
|
-- DROP TABLE IF EXISTS public.auftraggeber;
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS public.auftraggeber
|
||||||
|
(
|
||||||
|
auftraggeber_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ),
|
||||||
|
name text COLLATE pg_catalog."default",
|
||||||
|
strasse text COLLATE pg_catalog."default",
|
||||||
|
ort text COLLATE pg_catalog."default",
|
||||||
|
postleitzahl text COLLATE pg_catalog."default",
|
||||||
|
ansprechpartner text COLLATE pg_catalog."default",
|
||||||
|
telefonnummer text COLLATE pg_catalog."default",
|
||||||
|
CONSTRAINT "PK_Auftraggebers" PRIMARY KEY (auftraggeber_id)
|
||||||
|
)
|
||||||
|
|
||||||
|
TABLESPACE pg_default;
|
||||||
|
|
||||||
|
ALTER TABLE IF EXISTS public.auftraggeber
|
||||||
|
OWNER to "SewerGen";
|
||||||
33
SQL/Projekt.sql
Normal file
33
SQL/Projekt.sql
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
-- Table: public.projekt
|
||||||
|
|
||||||
|
-- DROP TABLE IF EXISTS public.projekt;
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS public.projekt
|
||||||
|
(
|
||||||
|
projekt_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ),
|
||||||
|
projektname text COLLATE pg_catalog."default",
|
||||||
|
erstelldatum text COLLATE pg_catalog."default",
|
||||||
|
strasse text COLLATE pg_catalog."default",
|
||||||
|
ort text COLLATE pg_catalog."default",
|
||||||
|
exporttype integer NOT NULL,
|
||||||
|
kodierungssystem integer NOT NULL,
|
||||||
|
ref_auftraggeber_id integer NOT NULL DEFAULT 0,
|
||||||
|
CONSTRAINT "PK_Projekte" PRIMARY KEY (projekt_id),
|
||||||
|
CONSTRAINT "FK_Projekte_Auftraggebers_AuftraggeberId" FOREIGN KEY (ref_auftraggeber_id)
|
||||||
|
REFERENCES public.auftraggeber ("auftraggeber_id") MATCH SIMPLE
|
||||||
|
ON UPDATE NO ACTION
|
||||||
|
ON DELETE CASCADE
|
||||||
|
)
|
||||||
|
|
||||||
|
TABLESPACE pg_default;
|
||||||
|
|
||||||
|
ALTER TABLE IF EXISTS public.projekt
|
||||||
|
OWNER to "SewerGen";
|
||||||
|
-- Index: IX_Projekte_AuftraggeberId
|
||||||
|
|
||||||
|
-- DROP INDEX IF EXISTS public."IX_Projekte_AuftraggeberId";
|
||||||
|
|
||||||
|
CREATE INDEX IF NOT EXISTS "IX_Projekte_AuftraggeberId"
|
||||||
|
ON public.projekt USING btree
|
||||||
|
(ref_auftraggeber_id ASC NULLS LAST)
|
||||||
|
TABLESPACE pg_default;
|
||||||
38
SQL/Schacht.sql
Normal file
38
SQL/Schacht.sql
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
-- Table: public.schacht
|
||||||
|
|
||||||
|
-- DROP TABLE IF EXISTS public.schacht;
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS public.schacht
|
||||||
|
(
|
||||||
|
schacht_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ),
|
||||||
|
objektbezeichnung text COLLATE pg_catalog."default",
|
||||||
|
deckelrechtswert numeric(18,4) NOT NULL,
|
||||||
|
deckelhochwert numeric(18,4) NOT NULL,
|
||||||
|
deckelhoehe numeric(18,4) NOT NULL,
|
||||||
|
sohlrechtswert numeric(18,4),
|
||||||
|
sohlhochwert numeric(18,4),
|
||||||
|
sohlhoehe numeric(18,4) NOT NULL,
|
||||||
|
entwaesserung integer NOT NULL,
|
||||||
|
schachtype integer,
|
||||||
|
vermesser text COLLATE pg_catalog."default",
|
||||||
|
aufnahmedatum text COLLATE pg_catalog."default",
|
||||||
|
ref_projekt_id integer,
|
||||||
|
CONSTRAINT "PK_schacht" PRIMARY KEY (schacht_id),
|
||||||
|
CONSTRAINT "FK_schacht_Projekte_ProjektId" FOREIGN KEY (ref_projekt_id)
|
||||||
|
REFERENCES public.projekt (projekt_id) MATCH SIMPLE
|
||||||
|
ON UPDATE NO ACTION
|
||||||
|
ON DELETE NO ACTION
|
||||||
|
)
|
||||||
|
|
||||||
|
TABLESPACE pg_default;
|
||||||
|
|
||||||
|
ALTER TABLE IF EXISTS public.schacht
|
||||||
|
OWNER to "SewerGen";
|
||||||
|
-- Index: IX_Schaechte_ProjektId
|
||||||
|
|
||||||
|
-- DROP INDEX IF EXISTS public."IX_Schaechte_ProjektId";
|
||||||
|
|
||||||
|
CREATE INDEX IF NOT EXISTS "IX_Schaechte_ProjektId"
|
||||||
|
ON public.schacht USING btree
|
||||||
|
(ref_projekt_id ASC NULLS LAST)
|
||||||
|
TABLESPACE pg_default;
|
||||||
58
SQL/haltung.sql
Normal file
58
SQL/haltung.sql
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
-- Table: public.haltung
|
||||||
|
|
||||||
|
-- DROP TABLE IF EXISTS public.haltung;
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS public.haltung
|
||||||
|
(
|
||||||
|
haltung_id integer NOT NULL GENERATED BY DEFAULT AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ),
|
||||||
|
objektbezeichnung text COLLATE pg_catalog."default",
|
||||||
|
ref_startschacht_id integer,
|
||||||
|
ref_endschacht_id integer,
|
||||||
|
dn integer NOT NULL,
|
||||||
|
material text COLLATE pg_catalog."default",
|
||||||
|
haltungslaenge numeric NOT NULL,
|
||||||
|
entwaesserung integer NOT NULL,
|
||||||
|
ref_projekt_id integer,
|
||||||
|
CONSTRAINT "PK_Kanaele" PRIMARY KEY (haltung_id),
|
||||||
|
CONSTRAINT "FK_Kanaele_Projekte_ProjektId" FOREIGN KEY (ref_projekt_id)
|
||||||
|
REFERENCES public.projekt (projekt_id) MATCH SIMPLE
|
||||||
|
ON UPDATE NO ACTION
|
||||||
|
ON DELETE NO ACTION,
|
||||||
|
CONSTRAINT "FK_Kanaele_Schaechte_EndSchachtId" FOREIGN KEY (ref_endschacht_id)
|
||||||
|
REFERENCES public.schacht (schacht_id) MATCH SIMPLE
|
||||||
|
ON UPDATE NO ACTION
|
||||||
|
ON DELETE NO ACTION,
|
||||||
|
CONSTRAINT "FK_Kanaele_Schaechte_StartSchachtId" FOREIGN KEY (ref_startschacht_id)
|
||||||
|
REFERENCES public.schacht (schacht_id) MATCH SIMPLE
|
||||||
|
ON UPDATE NO ACTION
|
||||||
|
ON DELETE NO ACTION
|
||||||
|
)
|
||||||
|
|
||||||
|
TABLESPACE pg_default;
|
||||||
|
|
||||||
|
ALTER TABLE IF EXISTS public.haltung
|
||||||
|
OWNER to "SewerGen";
|
||||||
|
-- Index: IX_Kanaele_EndSchachtId
|
||||||
|
|
||||||
|
-- DROP INDEX IF EXISTS public."IX_Kanaele_EndSchachtId";
|
||||||
|
|
||||||
|
CREATE INDEX IF NOT EXISTS "IX_Kanaele_EndSchachtId"
|
||||||
|
ON public.haltung USING btree
|
||||||
|
(ref_endschacht_id ASC NULLS LAST)
|
||||||
|
TABLESPACE pg_default;
|
||||||
|
-- Index: IX_Kanaele_ProjektId
|
||||||
|
|
||||||
|
-- DROP INDEX IF EXISTS public."IX_Kanaele_ProjektId";
|
||||||
|
|
||||||
|
CREATE INDEX IF NOT EXISTS "IX_Kanaele_ProjektId"
|
||||||
|
ON public.haltung USING btree
|
||||||
|
(ref_projekt_id ASC NULLS LAST)
|
||||||
|
TABLESPACE pg_default;
|
||||||
|
-- Index: IX_Kanaele_StartSchachtId
|
||||||
|
|
||||||
|
-- DROP INDEX IF EXISTS public."IX_Kanaele_StartSchachtId";
|
||||||
|
|
||||||
|
CREATE INDEX IF NOT EXISTS "IX_Kanaele_StartSchachtId"
|
||||||
|
ON public.haltung USING btree
|
||||||
|
(ref_startschacht_id ASC NULLS LAST)
|
||||||
|
TABLESPACE pg_default;
|
||||||
52
SewerStammGen.ConsoleApp/Program.cs
Normal file
52
SewerStammGen.ConsoleApp/Program.cs
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
using SewerStammGen.DAL.Services;
|
||||||
|
using SewerStammGen.DAL.Services.PostgresqlData;
|
||||||
|
using SewerStammGen.Shared.Contracts;
|
||||||
|
using SewerStammGen.Shared.Domain;
|
||||||
|
using SewerStammGen.Shared.Enum;
|
||||||
|
using System.Diagnostics;
|
||||||
|
|
||||||
|
namespace SewerStammGen.ConsoleApp
|
||||||
|
{
|
||||||
|
internal class Program
|
||||||
|
{
|
||||||
|
static void Main(string[] args)
|
||||||
|
{
|
||||||
|
Test t = new();
|
||||||
|
|
||||||
|
Debugger.Break();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Test
|
||||||
|
{
|
||||||
|
char[] zeile = new char[1476];
|
||||||
|
public Test()
|
||||||
|
{
|
||||||
|
zeile = new char[1476];
|
||||||
|
for(int i = 0; i < zeile.Length; i++)
|
||||||
|
{
|
||||||
|
zeile[i] = ' ';
|
||||||
|
}
|
||||||
|
WriteContent(new Tuple<uint, uint>(3, 17), "29283829");
|
||||||
|
WriteContent(new Tuple<uint, uint>(56, 65), "S");
|
||||||
|
WriteContent(new Tuple<uint, uint>(67, 76), "IB");
|
||||||
|
WriteContent(new Tuple<uint, uint>(78, 87), "RESC");
|
||||||
|
string result = new string(zeile);
|
||||||
|
}
|
||||||
|
|
||||||
|
void WriteContent(Tuple<uint, uint> spalten, string content)
|
||||||
|
{
|
||||||
|
uint start = spalten.Item1-1;
|
||||||
|
uint ende = spalten.Item2-1;
|
||||||
|
|
||||||
|
int counter = 0;
|
||||||
|
|
||||||
|
for(uint i = start; i < (content.Length+start); i++)
|
||||||
|
{
|
||||||
|
zeile[i] = content[counter];
|
||||||
|
|
||||||
|
counter++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
15
SewerStammGen.ConsoleApp/SewerStammGen.ConsoleApp.csproj
Normal file
15
SewerStammGen.ConsoleApp/SewerStammGen.ConsoleApp.csproj
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\SewerStammGen.DAL\SewerStammGen.DAL.csproj" />
|
||||||
|
<ProjectReference Include="..\SewerStammGen.Shared\SewerStammGen.Shared.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
using Npgsql;
|
||||||
|
using SewerStammGen.Shared.Contracts;
|
||||||
|
using SewerStammGen.Shared.Domain;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SewerStammGen.DAL.Services.PostgresqlData
|
||||||
|
{
|
||||||
|
public class AuftraggeberDataService : PostgresqlDataService, IAuftraggeberDataService
|
||||||
|
{
|
||||||
|
public AuftraggeberDataService(string connectionstring) : base(connectionstring,"auftraggeber") { }
|
||||||
|
|
||||||
|
public async Task<Auftraggeber> Create(Auftraggeber entity)
|
||||||
|
{
|
||||||
|
string command = "INSERT INTO "+tableName+" (name, strasse, ort, postleitzahl, ansprechpartner, telefonnummer) " +
|
||||||
|
"VALUES(@1,@2,@3,@4,@5,@6) RETURNING auftraggeber_id";
|
||||||
|
|
||||||
|
await using (var cmd = new NpgsqlCommand(command, conn))
|
||||||
|
{
|
||||||
|
cmd.Parameters.AddWithValue("1", entity.Name);
|
||||||
|
cmd.Parameters.AddWithValue("2", entity.Strasse);
|
||||||
|
cmd.Parameters.AddWithValue("3", entity.Ort);
|
||||||
|
cmd.Parameters.AddWithValue("4", entity.Postleitzahl);
|
||||||
|
cmd.Parameters.AddWithValue("5", entity.Ansprechpartner);
|
||||||
|
cmd.Parameters.AddWithValue("6", entity.Telefonnummer);
|
||||||
|
|
||||||
|
using var reader = await cmd.ExecuteReaderAsync();
|
||||||
|
reader.Read();
|
||||||
|
entity.Id = reader.GetInt32(0);
|
||||||
|
}
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<Auftraggeber> Get(int id)
|
||||||
|
{
|
||||||
|
Auftraggeber result = new Auftraggeber();
|
||||||
|
using (var cmd = new NpgsqlCommand($"SELECT * FROM "+tableName+" WHERE auftraggeber_id = @1", conn))
|
||||||
|
{
|
||||||
|
cmd.Parameters.AddWithValue("1", id);
|
||||||
|
using var reader = await cmd.ExecuteReaderAsync();
|
||||||
|
reader.Read();
|
||||||
|
result = parseAuftraggeber(reader);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Auftraggeber parseAuftraggeber(NpgsqlDataReader reader)
|
||||||
|
{
|
||||||
|
return new Auftraggeber()
|
||||||
|
{
|
||||||
|
Id = reader.GetInt32(0),
|
||||||
|
Name = reader.IsDBNull(1) ? "" : reader.GetString(1),
|
||||||
|
Strasse = reader.IsDBNull(2) ? "" : reader.GetString(2),
|
||||||
|
Ort = reader.IsDBNull(3) ? "" : reader.GetString(3),
|
||||||
|
Postleitzahl = reader.IsDBNull(4) ? "" : reader.GetString(4),
|
||||||
|
Ansprechpartner = reader.IsDBNull(5) ? "" : reader.GetString(5),
|
||||||
|
Telefonnummer = reader.IsDBNull(6) ? "" : reader.GetString(6)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<Auftraggeber>> GetAll()
|
||||||
|
{
|
||||||
|
List<Auftraggeber> result = new List<Auftraggeber>();
|
||||||
|
using (var cmd = new NpgsqlCommand($"SELECT * FROM "+tableName, conn))
|
||||||
|
using (var reader = await cmd.ExecuteReaderAsync())
|
||||||
|
{
|
||||||
|
while (reader.Read())
|
||||||
|
{
|
||||||
|
result.Add(parseAuftraggeber(reader));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<Auftraggeber> Update(Auftraggeber entity)
|
||||||
|
{
|
||||||
|
string command = "UPDATE " + tableName + " SET name=@1, strasse=@2, ort=@3, postleitzahl=@4, ansprechpartner=@5,telefonnummer=@6 WHERE auftraggeber_id=@7";
|
||||||
|
using (var cmd = new NpgsqlCommand(command, conn))
|
||||||
|
{
|
||||||
|
cmd.Parameters.AddWithValue("1", entity.Name);
|
||||||
|
cmd.Parameters.AddWithValue("2", entity.Strasse);
|
||||||
|
cmd.Parameters.AddWithValue("3", entity.Ort);
|
||||||
|
cmd.Parameters.AddWithValue("4", entity.Postleitzahl);
|
||||||
|
cmd.Parameters.AddWithValue("5", entity.Ansprechpartner);
|
||||||
|
cmd.Parameters.AddWithValue("6", entity.Telefonnummer);
|
||||||
|
cmd.Parameters.AddWithValue("7", entity.Id);
|
||||||
|
int res = await cmd.ExecuteNonQueryAsync();
|
||||||
|
Trace.WriteLine(res);
|
||||||
|
}
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
122
SewerStammGen.DAL/Services/PostgresqlData/HaltungDataService.cs
Normal file
122
SewerStammGen.DAL/Services/PostgresqlData/HaltungDataService.cs
Normal file
@@ -0,0 +1,122 @@
|
|||||||
|
using Npgsql;
|
||||||
|
using SewerStammGen.Shared.Contracts;
|
||||||
|
using SewerStammGen.Shared.Domain;
|
||||||
|
using SewerStammGen.Shared.Enum;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SewerStammGen.DAL.Services.PostgresqlData
|
||||||
|
{
|
||||||
|
public class HaltungDataService : PostgresqlDataService, IHaltungDataService
|
||||||
|
{
|
||||||
|
public HaltungDataService(string connectionstring) : base(connectionstring, "haltung")
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<Kanal> Create(Kanal entity)
|
||||||
|
{
|
||||||
|
string command = $"INSERT INTO {tableName} (objektbezeichnung,ref_startschacht_id,ref_endschacht_id,dn,material,haltungslaenge, entwaesserung,ref_projekt_id)" +
|
||||||
|
$"VALUES (@1,@2,@3,@4,@5,@6,@7,@8) RETURNING haltung_id";
|
||||||
|
using (var cmd = new NpgsqlCommand(command, conn))
|
||||||
|
{
|
||||||
|
cmd.Parameters.AddWithValue("1", entity.Objektbezeichnung);
|
||||||
|
cmd.Parameters.AddWithValue("2", entity.StartSchacht.Id);
|
||||||
|
cmd.Parameters.AddWithValue("3", entity.EndSchacht.Id);
|
||||||
|
cmd.Parameters.AddWithValue("4", entity.DN);
|
||||||
|
cmd.Parameters.AddWithValue("5", entity.Material);
|
||||||
|
cmd.Parameters.AddWithValue("6", entity.Haltungslaenge);
|
||||||
|
cmd.Parameters.AddWithValue("7", (int)entity.Entwaesserung);
|
||||||
|
cmd.Parameters.AddWithValue("8", entity.Projekt.Id);
|
||||||
|
using var reader = await cmd.ExecuteReaderAsync();
|
||||||
|
reader.Read();
|
||||||
|
entity.Id = reader.GetInt32(0);
|
||||||
|
}
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Task<Kanal> Get(int id)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Task<IEnumerable<Kanal>> GetAll()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<Kanal>> GetAllByProjekt(int projektID)
|
||||||
|
{
|
||||||
|
List<Kanal> result = new List<Kanal>();
|
||||||
|
ISchachtDataService schachtDataService = new SchachtDataService(connString);
|
||||||
|
IEnumerable<Schacht> schaechte = await schachtDataService.GetAllByProjekt(projektID);
|
||||||
|
|
||||||
|
string command = $"SELECT * FROM {tableName} WHERE ref_projekt_id = @1";
|
||||||
|
using (var cmd = new NpgsqlCommand(command, conn))
|
||||||
|
{
|
||||||
|
cmd.Parameters.AddWithValue("1", projektID);
|
||||||
|
using (var reader = await cmd.ExecuteReaderAsync())
|
||||||
|
{
|
||||||
|
while(reader.Read())
|
||||||
|
{
|
||||||
|
Kanal adding = parseHaltung(reader);
|
||||||
|
|
||||||
|
int startSchachtID = reader.GetInt32(2);
|
||||||
|
int endSchachtID = reader.GetInt32(3);
|
||||||
|
|
||||||
|
adding.StartSchacht = schaechte.Where(x => x.Id == startSchachtID).Last();
|
||||||
|
adding.EndSchacht = schaechte.Where(x => x.Id == endSchachtID).Last();
|
||||||
|
result.Add(adding);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private Kanal parseHaltung(NpgsqlDataReader reader)
|
||||||
|
{
|
||||||
|
return new Kanal()
|
||||||
|
{
|
||||||
|
Id = reader.GetInt32(0),
|
||||||
|
Objektbezeichnung = reader.GetString(1),
|
||||||
|
//StartSchacht = reader.GetInt32(2),
|
||||||
|
//EndSchacht = reader.GetInt32(3),
|
||||||
|
DN = reader.GetInt32(4),
|
||||||
|
Material = reader.GetString(5),
|
||||||
|
Haltungslaenge = reader.GetDecimal(6),
|
||||||
|
Entwaesserung = (EEntwaeserung)reader.GetInt32(7),
|
||||||
|
Projekt = new Projekt() { Id = reader.GetInt32(8) }
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<Kanal>> GetAllByProjekt(Projekt projekt)
|
||||||
|
{
|
||||||
|
return await GetAllByProjekt(projekt.Id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<Kanal> Update(Kanal entity)
|
||||||
|
{
|
||||||
|
|
||||||
|
string command = $"UPDATE {tableName} SET objektbezeichnung=@1, " +
|
||||||
|
$"ref_startschacht_id=@2, ref_endschacht_id=@3, dn=@4, material=@5, haltungslaenge=@6, entwaesserung=@7 WHERE haltung_id = @8";
|
||||||
|
using(var cmd = new NpgsqlCommand(command,conn))
|
||||||
|
{
|
||||||
|
cmd.Parameters.AddWithValue("1", entity.Objektbezeichnung);
|
||||||
|
cmd.Parameters.AddWithValue("2", entity.StartSchacht.Id);
|
||||||
|
cmd.Parameters.AddWithValue("3", entity.EndSchacht.Id);
|
||||||
|
cmd.Parameters.AddWithValue("4", entity.DN);
|
||||||
|
cmd.Parameters.AddWithValue("5", entity.Material);
|
||||||
|
cmd.Parameters.AddWithValue("6", entity.Haltungslaenge);
|
||||||
|
cmd.Parameters.AddWithValue("7", (int)entity.Entwaesserung);
|
||||||
|
cmd.Parameters.AddWithValue("8", entity.Id);
|
||||||
|
|
||||||
|
await cmd.ExecuteNonQueryAsync();
|
||||||
|
}
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
using Npgsql;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SewerStammGen.DAL.Services.PostgresqlData
|
||||||
|
{
|
||||||
|
public class PostgresqlDataService : IDisposable
|
||||||
|
{
|
||||||
|
protected readonly string connString; // = "Host = localhost; Database = SewerGen; Username = SewerGen; Password = SewerGen";
|
||||||
|
NpgsqlDataSource dataSource;
|
||||||
|
protected NpgsqlConnection? conn = null;
|
||||||
|
protected string tableName = "";
|
||||||
|
|
||||||
|
public PostgresqlDataService(string connectionstring, string tableName)
|
||||||
|
{
|
||||||
|
this.connString = connectionstring;
|
||||||
|
var dataSourceBuilder = new NpgsqlDataSourceBuilder(connString);
|
||||||
|
dataSource = dataSourceBuilder.Build();
|
||||||
|
|
||||||
|
conn = dataSource.OpenConnection();
|
||||||
|
this.tableName = string.Format("public.{0}", tableName);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public virtual async Task<bool> Delete(int id)
|
||||||
|
{
|
||||||
|
string command = $"DELETE " + tableName + " WHERE \"Id\" = @1";
|
||||||
|
await using (var cmd = new NpgsqlCommand(command, conn))
|
||||||
|
{
|
||||||
|
cmd.Parameters.AddWithValue("1", id);
|
||||||
|
int res = await cmd.ExecuteNonQueryAsync();
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
if (conn != null && conn.State == System.Data.ConnectionState.Open)
|
||||||
|
{
|
||||||
|
conn.Close();
|
||||||
|
conn.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
128
SewerStammGen.DAL/Services/PostgresqlData/ProjektDataService.cs
Normal file
128
SewerStammGen.DAL/Services/PostgresqlData/ProjektDataService.cs
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
using SewerStammGen.Shared.Contracts;
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Npgsql;
|
||||||
|
using SewerStammGen.Shared.Domain;
|
||||||
|
using SewerStammGen.Shared.Enum;
|
||||||
|
using System.Diagnostics;
|
||||||
|
|
||||||
|
namespace SewerStammGen.DAL.Services.PostgresqlData
|
||||||
|
{
|
||||||
|
public class ProjektDataService : PostgresqlDataService, IProjektDataService
|
||||||
|
{
|
||||||
|
public ProjektDataService(string connectionstring) : base(connectionstring,"projekt")
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<Projekt> Create(Projekt entity)
|
||||||
|
{
|
||||||
|
string command = $"INSERT INTO {tableName} (projektname, erstelldatum, strasse, ort, exporttype, kodierungssystem,ref_auftraggeber_id) " +
|
||||||
|
$"VALUES(@1,@2,@3,@4,@5,@6,@7) RETURNING projekt_id";
|
||||||
|
|
||||||
|
if (entity.Auftraggeber.Id == 0)
|
||||||
|
{
|
||||||
|
IAuftraggeberDataService auftraggeberDataService = new AuftraggeberDataService(connString);
|
||||||
|
var s = await auftraggeberDataService.GetAll();
|
||||||
|
// TODO : Auftraggeber verwaltung
|
||||||
|
if (s.Count() < 1)
|
||||||
|
{
|
||||||
|
entity.Auftraggeber = await auftraggeberDataService.Create(new Auftraggeber() { Name = "Anonym" });
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
entity.Auftraggeber = s.ToList().Last();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
await using (var cmd = new NpgsqlCommand(command, conn))
|
||||||
|
{
|
||||||
|
cmd.Parameters.AddWithValue("1", entity.Projektname);
|
||||||
|
cmd.Parameters.AddWithValue("2", entity.Erstelldatum);
|
||||||
|
cmd.Parameters.AddWithValue("3", entity.Strasse);
|
||||||
|
cmd.Parameters.AddWithValue("4", entity.Ort);
|
||||||
|
cmd.Parameters.AddWithValue("5", (int)entity.ExportType);
|
||||||
|
cmd.Parameters.AddWithValue("6", (int)entity.Kodierungssystem);
|
||||||
|
cmd.Parameters.AddWithValue("7", entity.Auftraggeber.Id);
|
||||||
|
using var reader = await cmd.ExecuteReaderAsync();
|
||||||
|
reader.Read();
|
||||||
|
entity.Id = reader.GetInt32(0);
|
||||||
|
}
|
||||||
|
entity.AuftraggeberTemporar = true;
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public async Task<Projekt> Get(int id)
|
||||||
|
{
|
||||||
|
Projekt result = new Projekt();
|
||||||
|
IAuftraggeberDataService auftraggeberDataService = new AuftraggeberDataService(connString);
|
||||||
|
using (var cmd = new NpgsqlCommand($"SELECT * FROM {tableName} WHERE projekt_id = @1", conn))
|
||||||
|
{
|
||||||
|
cmd.Parameters.AddWithValue("1", id);
|
||||||
|
using var reader = await cmd.ExecuteReaderAsync();
|
||||||
|
reader.Read();
|
||||||
|
result = parseProjekt(reader);
|
||||||
|
result.Auftraggeber = await auftraggeberDataService.Get(reader.GetInt32(7));
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Projekt parseProjekt(NpgsqlDataReader reader)
|
||||||
|
{
|
||||||
|
return new Projekt()
|
||||||
|
{
|
||||||
|
Id = reader.GetInt32(0),
|
||||||
|
Projektname = reader.IsDBNull(1) ? "" : reader.GetString(1),
|
||||||
|
Erstelldatum = reader.IsDBNull(2) ? "" : reader.GetString(2),
|
||||||
|
Strasse = reader.IsDBNull(3) ? "" : reader.GetString(3),
|
||||||
|
Ort = reader.IsDBNull(4) ? "" : reader.GetString(4),
|
||||||
|
ExportType = reader.IsDBNull(5) ? EExportType.XML2013 : (EExportType)reader.GetInt32(5),
|
||||||
|
Kodierungssystem = reader.IsDBNull(6) ? EKodierungssystem.EN13508_2_2011_DWA_M_192_2 : (EKodierungssystem)reader.GetInt32(6)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<Projekt>> GetAll()
|
||||||
|
{
|
||||||
|
IAuftraggeberDataService auftraggeberDataService = new AuftraggeberDataService(connString);
|
||||||
|
|
||||||
|
IEnumerable<Auftraggeber> auftraggebers = await auftraggeberDataService.GetAll();
|
||||||
|
|
||||||
|
List<Projekt> result = new List<Projekt>();
|
||||||
|
using (var cmd = new NpgsqlCommand($"SELECT * FROM {tableName}", conn))
|
||||||
|
using (var reader = await cmd.ExecuteReaderAsync())
|
||||||
|
{
|
||||||
|
while (reader.Read())
|
||||||
|
{
|
||||||
|
Projekt projekt = parseProjekt(reader);
|
||||||
|
projekt.Auftraggeber = auftraggebers.Where(x => x.Id == reader.GetInt32(7)).ToList().Last();
|
||||||
|
result.Add(projekt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<Projekt> Update(Projekt entity)
|
||||||
|
{
|
||||||
|
string command = $"UPDATE {tableName} SET projektname=@1, erstelldatum=@2, strasse=@3, ort=@4, exporttype=@5, kodierungssystem=@6,ref_auftraggeber_id=@7 WHERE projekt_id = @8";
|
||||||
|
using (var cmd = new NpgsqlCommand(command, conn))
|
||||||
|
{
|
||||||
|
cmd.Parameters.AddWithValue("1", entity.Projektname);
|
||||||
|
cmd.Parameters.AddWithValue("2", entity.Erstelldatum);
|
||||||
|
cmd.Parameters.AddWithValue("3", entity.Strasse);
|
||||||
|
cmd.Parameters.AddWithValue("4", entity.Ort);
|
||||||
|
cmd.Parameters.AddWithValue("5", (int)entity.ExportType);
|
||||||
|
cmd.Parameters.AddWithValue("6", (int)entity.Kodierungssystem);
|
||||||
|
cmd.Parameters.AddWithValue("7", entity.Auftraggeber.Id);
|
||||||
|
cmd.Parameters.AddWithValue("8", entity.Id);
|
||||||
|
int res = await cmd.ExecuteNonQueryAsync();
|
||||||
|
Trace.WriteLine(res);
|
||||||
|
}
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
137
SewerStammGen.DAL/Services/PostgresqlData/SchachtDataService.cs
Normal file
137
SewerStammGen.DAL/Services/PostgresqlData/SchachtDataService.cs
Normal file
@@ -0,0 +1,137 @@
|
|||||||
|
using Npgsql;
|
||||||
|
using SewerStammGen.Shared.Contracts;
|
||||||
|
using SewerStammGen.Shared.Domain;
|
||||||
|
using SewerStammGen.Shared.Enum;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SewerStammGen.DAL.Services.PostgresqlData
|
||||||
|
{
|
||||||
|
public class SchachtDataService : PostgresqlDataService, ISchachtDataService
|
||||||
|
{
|
||||||
|
public SchachtDataService(string connectionstring) : base(connectionstring,"schacht")
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<Schacht> Create(Schacht entity)
|
||||||
|
{
|
||||||
|
string command = "INSERT INTO " + tableName + " (" +
|
||||||
|
"objektbezeichnung,deckelrechtswert,deckelhochwert," +
|
||||||
|
"sohlrechtswert,sohlhochwert,sohlhoehe,deckelhoehe,entwaesserung,schachtype,vermesser,aufnahmedatum,ref_projekt_id) VALUES " +
|
||||||
|
"(@1,@2,@3,@4,@5,@6,@7,@8,@9,@10,@11,@12) RETURNING schacht_id";
|
||||||
|
using(var cmd = new NpgsqlCommand(command,conn))
|
||||||
|
{
|
||||||
|
cmd.Parameters.AddWithValue("1", entity.Objektbezeichnung);
|
||||||
|
cmd.Parameters.AddWithValue("2", entity.DeckelRechtsWert);
|
||||||
|
cmd.Parameters.AddWithValue("3", entity.DeckelHochWert);
|
||||||
|
cmd.Parameters.AddWithValue("4", entity.SohlRechtsWert);
|
||||||
|
cmd.Parameters.AddWithValue("5", entity.SohlHochWert);
|
||||||
|
cmd.Parameters.AddWithValue("6", entity.SohlHoehe);
|
||||||
|
cmd.Parameters.AddWithValue("7", entity.DeckelHoehe);
|
||||||
|
cmd.Parameters.AddWithValue("8", (int)entity.Entwaesserung);
|
||||||
|
cmd.Parameters.AddWithValue("9", (int)entity.SchachtType);
|
||||||
|
cmd.Parameters.AddWithValue("10", entity.Vermesser);
|
||||||
|
cmd.Parameters.AddWithValue("11", entity.AufnahmeDatum);
|
||||||
|
cmd.Parameters.AddWithValue("12", entity.Projekt.Id);
|
||||||
|
using var reader = await cmd.ExecuteReaderAsync();
|
||||||
|
reader.Read();
|
||||||
|
entity.Id = reader.GetInt32(0);
|
||||||
|
}
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Task<Schacht> Get(int id)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Task<IEnumerable<Schacht>> GetAll()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
private Schacht parseSchacht(NpgsqlDataReader reader)
|
||||||
|
{
|
||||||
|
return new Schacht()
|
||||||
|
{
|
||||||
|
Id = reader.GetInt32(0),
|
||||||
|
Objektbezeichnung = reader.IsDBNull(1) ? "": reader.GetString(1),
|
||||||
|
DeckelRechtsWert = reader.GetDecimal(2),
|
||||||
|
DeckelHochWert = reader.GetDecimal(3),
|
||||||
|
DeckelHoehe = reader.GetDecimal(4),
|
||||||
|
SohlRechtsWert = reader.GetDecimal(5),
|
||||||
|
SohlHochWert = reader.GetDecimal(6),
|
||||||
|
SohlHoehe = reader.GetDecimal(7),
|
||||||
|
Entwaesserung = (EEntwaeserung)reader.GetInt32(8),
|
||||||
|
SchachtType = (ESchachtType)reader.GetInt32(9),
|
||||||
|
Vermesser = reader.GetString(10),
|
||||||
|
AufnahmeDatum = reader.GetString(11),
|
||||||
|
Projekt = new Projekt() { Id = reader.GetInt32(12) },
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<Schacht>> GetAllByProjekt(int projektID)
|
||||||
|
{
|
||||||
|
List<Schacht> result = new List<Schacht>();
|
||||||
|
string command = @"SELECT * FROM " + tableName + " WHERE ref_projekt_id = @1";
|
||||||
|
using (var cmd = new NpgsqlCommand(command, conn))
|
||||||
|
{
|
||||||
|
cmd.Parameters.AddWithValue("1", projektID);
|
||||||
|
using (var reader = await cmd.ExecuteReaderAsync())
|
||||||
|
{
|
||||||
|
while(reader.Read())
|
||||||
|
{
|
||||||
|
result.Add(parseSchacht(reader));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<Schacht>> GetAllByProjekt(Projekt projekt)
|
||||||
|
{
|
||||||
|
return await GetAllByProjekt(projekt.Id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<Schacht> Update(Schacht entity)
|
||||||
|
{
|
||||||
|
// TODO: Typo in Schachtype beheben. Dies erfordert jedoch ein Datenbank updater Siehe Issue #7
|
||||||
|
string command = @"UPDATE " + tableName + " SET " +
|
||||||
|
"objektbezeichnung=@1, deckelrechtswert=@2, deckelhochwert=@3, deckelhoehe=@4, " +
|
||||||
|
"sohlrechtswert=@5, sohlhochwert=@6, sohlhoehe=@7, entwaesserung=@8, schachtype=@9, vermesser=@10, aufnahmedatum=@11, ref_projekt_id=@12 WHERE schacht_id=@13";
|
||||||
|
using(var cmd = new NpgsqlCommand(command,conn))
|
||||||
|
{
|
||||||
|
cmd.Parameters.AddWithValue("1", entity.Objektbezeichnung);
|
||||||
|
cmd.Parameters.AddWithValue("2", entity.DeckelRechtsWert);
|
||||||
|
cmd.Parameters.AddWithValue("3", entity.DeckelHochWert);
|
||||||
|
cmd.Parameters.AddWithValue("4", entity.DeckelHoehe);
|
||||||
|
cmd.Parameters.AddWithValue("5", entity.SohlRechtsWert);
|
||||||
|
cmd.Parameters.AddWithValue("6", entity.SohlHochWert);
|
||||||
|
cmd.Parameters.AddWithValue("7", entity.SohlHoehe);
|
||||||
|
cmd.Parameters.AddWithValue("8", (int)entity.Entwaesserung);
|
||||||
|
cmd.Parameters.AddWithValue("9", (int)entity.SchachtType);
|
||||||
|
cmd.Parameters.AddWithValue("10", entity.Vermesser);
|
||||||
|
cmd.Parameters.AddWithValue("11", entity.AufnahmeDatum);
|
||||||
|
cmd.Parameters.AddWithValue("12", entity.Projekt.Id);
|
||||||
|
cmd.Parameters.AddWithValue("13", entity.Id);
|
||||||
|
|
||||||
|
await cmd.ExecuteNonQueryAsync();
|
||||||
|
}
|
||||||
|
return entity;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<bool> InsertSchachtBulk(List<Schacht> schacht)
|
||||||
|
{
|
||||||
|
foreach(var item in schacht)
|
||||||
|
{
|
||||||
|
await Create(item);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
21
SewerStammGen.DAL/SewerStammGen.DAL.csproj
Normal file
21
SewerStammGen.DAL/SewerStammGen.DAL.csproj
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Npgsql" Version="7.0.2" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\SewerStammGen.Shared\SewerStammGen.Shared.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="Services\SQLiteData\" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@@ -1,217 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
||||||
using SewerStammGen.EntityFramework;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace SewerStammGen.EntityFramework.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(SewerStammGenDbContext))]
|
|
||||||
[Migration("20230328071830_InitialCreate")]
|
|
||||||
partial class InitialCreate
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder
|
|
||||||
.HasAnnotation("ProductVersion", "7.0.4")
|
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
||||||
|
|
||||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Auftraggeber", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("Ansprechpartner")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Ort")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Postleitzahl")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Strasse")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Telefonnummer")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Auftraggebers");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Kanal", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("DN")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<int?>("EndSchachtId")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<int>("Entwaesserung")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<decimal>("Haltungslaenge")
|
|
||||||
.HasColumnType("numeric");
|
|
||||||
|
|
||||||
b.Property<string>("Material")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Objektbezeichnung")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<int?>("ProjektId")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<int?>("StartSchachtId")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("EndSchachtId");
|
|
||||||
|
|
||||||
b.HasIndex("ProjektId");
|
|
||||||
|
|
||||||
b.HasIndex("StartSchachtId");
|
|
||||||
|
|
||||||
b.ToTable("Kanaele");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Projekt", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("Erstelldatum")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<int>("ExportType")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<int>("Kodierungssystem")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<string>("Ort")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Projektname")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Strasse")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Projekte");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Schacht", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<decimal>("DeckelHoehe")
|
|
||||||
.HasColumnType("decimal(18,4)");
|
|
||||||
|
|
||||||
b.Property<int>("Entwaesserung")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<decimal>("HochWert")
|
|
||||||
.HasColumnType("decimal(18,4)");
|
|
||||||
|
|
||||||
b.Property<string>("Objektbezeichnung")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<int?>("ProjektId")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<decimal>("RechtsWert")
|
|
||||||
.HasColumnType("decimal(18,4)");
|
|
||||||
|
|
||||||
b.Property<decimal>("SohlHoehe")
|
|
||||||
.HasColumnType("decimal(18,4)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("ProjektId");
|
|
||||||
|
|
||||||
b.ToTable("Schaechte");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Kanal", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Shared.Domain.Schacht", "EndSchacht")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("EndSchachtId");
|
|
||||||
|
|
||||||
b.HasOne("Shared.Domain.Projekt", null)
|
|
||||||
.WithMany("Kanaele")
|
|
||||||
.HasForeignKey("ProjektId");
|
|
||||||
|
|
||||||
b.HasOne("Shared.Domain.Schacht", "StartSchacht")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("StartSchachtId");
|
|
||||||
|
|
||||||
b.Navigation("EndSchacht");
|
|
||||||
|
|
||||||
b.Navigation("StartSchacht");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Schacht", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Shared.Domain.Projekt", null)
|
|
||||||
.WithMany("Schaechte")
|
|
||||||
.HasForeignKey("ProjektId");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Projekt", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Kanaele");
|
|
||||||
|
|
||||||
b.Navigation("Schaechte");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,146 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace SewerStammGen.EntityFramework.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class InitialCreate : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Auftraggebers",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "integer", nullable: false)
|
|
||||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
|
||||||
Name = table.Column<string>(type: "text", nullable: false),
|
|
||||||
Strasse = table.Column<string>(type: "text", nullable: false),
|
|
||||||
Ort = table.Column<string>(type: "text", nullable: false),
|
|
||||||
Postleitzahl = table.Column<string>(type: "text", nullable: false),
|
|
||||||
Ansprechpartner = table.Column<string>(type: "text", nullable: false),
|
|
||||||
Telefonnummer = table.Column<string>(type: "text", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Auftraggebers", x => x.Id);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Projekte",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "integer", nullable: false)
|
|
||||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
|
||||||
Projektname = table.Column<string>(type: "text", nullable: false),
|
|
||||||
Erstelldatum = table.Column<string>(type: "text", nullable: false),
|
|
||||||
Strasse = table.Column<string>(type: "text", nullable: false),
|
|
||||||
Ort = table.Column<string>(type: "text", nullable: false),
|
|
||||||
ExportType = table.Column<int>(type: "integer", nullable: false),
|
|
||||||
Kodierungssystem = table.Column<int>(type: "integer", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Projekte", x => x.Id);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Schaechte",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "integer", nullable: false)
|
|
||||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
|
||||||
Objektbezeichnung = table.Column<string>(type: "text", nullable: false),
|
|
||||||
RechtsWert = table.Column<decimal>(type: "numeric(18,4)", nullable: false),
|
|
||||||
HochWert = table.Column<decimal>(type: "numeric(18,4)", nullable: false),
|
|
||||||
SohlHoehe = table.Column<decimal>(type: "numeric(18,4)", nullable: false),
|
|
||||||
DeckelHoehe = table.Column<decimal>(type: "numeric(18,4)", nullable: false),
|
|
||||||
Entwaesserung = table.Column<int>(type: "integer", nullable: false),
|
|
||||||
ProjektId = table.Column<int>(type: "integer", nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Schaechte", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_Schaechte_Projekte_ProjektId",
|
|
||||||
column: x => x.ProjektId,
|
|
||||||
principalTable: "Projekte",
|
|
||||||
principalColumn: "Id");
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Kanaele",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "integer", nullable: false)
|
|
||||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
|
||||||
Objektbezeichnung = table.Column<string>(type: "text", nullable: false),
|
|
||||||
StartSchachtId = table.Column<int>(type: "integer", nullable: true),
|
|
||||||
EndSchachtId = table.Column<int>(type: "integer", nullable: true),
|
|
||||||
DN = table.Column<int>(type: "integer", nullable: false),
|
|
||||||
Material = table.Column<string>(type: "text", nullable: false),
|
|
||||||
Haltungslaenge = table.Column<decimal>(type: "numeric", nullable: false),
|
|
||||||
Entwaesserung = table.Column<int>(type: "integer", nullable: false),
|
|
||||||
ProjektId = table.Column<int>(type: "integer", nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Kanaele", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_Kanaele_Projekte_ProjektId",
|
|
||||||
column: x => x.ProjektId,
|
|
||||||
principalTable: "Projekte",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_Kanaele_Schaechte_EndSchachtId",
|
|
||||||
column: x => x.EndSchachtId,
|
|
||||||
principalTable: "Schaechte",
|
|
||||||
principalColumn: "Id");
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_Kanaele_Schaechte_StartSchachtId",
|
|
||||||
column: x => x.StartSchachtId,
|
|
||||||
principalTable: "Schaechte",
|
|
||||||
principalColumn: "Id");
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Kanaele_EndSchachtId",
|
|
||||||
table: "Kanaele",
|
|
||||||
column: "EndSchachtId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Kanaele_ProjektId",
|
|
||||||
table: "Kanaele",
|
|
||||||
column: "ProjektId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Kanaele_StartSchachtId",
|
|
||||||
table: "Kanaele",
|
|
||||||
column: "StartSchachtId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Schaechte_ProjektId",
|
|
||||||
table: "Schaechte",
|
|
||||||
column: "ProjektId");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Auftraggebers");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Kanaele");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Schaechte");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Projekte");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,233 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
||||||
using SewerStammGen.EntityFramework;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace SewerStammGen.EntityFramework.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(SewerStammGenDbContext))]
|
|
||||||
[Migration("20230329145638_AuftraggeberAddedToProject")]
|
|
||||||
partial class AuftraggeberAddedToProject
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder
|
|
||||||
.HasAnnotation("ProductVersion", "7.0.4")
|
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
||||||
|
|
||||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Auftraggeber", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("Ansprechpartner")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Ort")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Postleitzahl")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Strasse")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Telefonnummer")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Auftraggebers");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Kanal", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("DN")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<int?>("EndSchachtId")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<int>("Entwaesserung")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<decimal>("Haltungslaenge")
|
|
||||||
.HasColumnType("numeric");
|
|
||||||
|
|
||||||
b.Property<string>("Material")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Objektbezeichnung")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<int?>("ProjektId")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<int?>("StartSchachtId")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("EndSchachtId");
|
|
||||||
|
|
||||||
b.HasIndex("ProjektId");
|
|
||||||
|
|
||||||
b.HasIndex("StartSchachtId");
|
|
||||||
|
|
||||||
b.ToTable("Kanaele");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Projekt", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("AuftraggeberId")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<string>("Erstelldatum")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<int>("ExportType")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<int>("Kodierungssystem")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<string>("Ort")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Projektname")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Strasse")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("AuftraggeberId");
|
|
||||||
|
|
||||||
b.ToTable("Projekte");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Schacht", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<decimal>("DeckelHoehe")
|
|
||||||
.HasColumnType("decimal(18,4)");
|
|
||||||
|
|
||||||
b.Property<int>("Entwaesserung")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<decimal>("HochWert")
|
|
||||||
.HasColumnType("decimal(18,4)");
|
|
||||||
|
|
||||||
b.Property<string>("Objektbezeichnung")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<int?>("ProjektId")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<decimal>("RechtsWert")
|
|
||||||
.HasColumnType("decimal(18,4)");
|
|
||||||
|
|
||||||
b.Property<decimal>("SohlHoehe")
|
|
||||||
.HasColumnType("decimal(18,4)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("ProjektId");
|
|
||||||
|
|
||||||
b.ToTable("Schaechte");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Kanal", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Shared.Domain.Schacht", "EndSchacht")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("EndSchachtId");
|
|
||||||
|
|
||||||
b.HasOne("Shared.Domain.Projekt", null)
|
|
||||||
.WithMany("Kanaele")
|
|
||||||
.HasForeignKey("ProjektId");
|
|
||||||
|
|
||||||
b.HasOne("Shared.Domain.Schacht", "StartSchacht")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("StartSchachtId");
|
|
||||||
|
|
||||||
b.Navigation("EndSchacht");
|
|
||||||
|
|
||||||
b.Navigation("StartSchacht");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Projekt", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Shared.Domain.Auftraggeber", "Auftraggeber")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("AuftraggeberId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Auftraggeber");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Schacht", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Shared.Domain.Projekt", null)
|
|
||||||
.WithMany("Schaechte")
|
|
||||||
.HasForeignKey("ProjektId");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Projekt", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Kanaele");
|
|
||||||
|
|
||||||
b.Navigation("Schaechte");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace SewerStammGen.EntityFramework.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AuftraggeberAddedToProject : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "AuftraggeberId",
|
|
||||||
table: "Projekte",
|
|
||||||
type: "integer",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0);
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Projekte_AuftraggeberId",
|
|
||||||
table: "Projekte",
|
|
||||||
column: "AuftraggeberId");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_Projekte_Auftraggebers_AuftraggeberId",
|
|
||||||
table: "Projekte",
|
|
||||||
column: "AuftraggeberId",
|
|
||||||
principalTable: "Auftraggebers",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_Projekte_Auftraggebers_AuftraggeberId",
|
|
||||||
table: "Projekte");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "IX_Projekte_AuftraggeberId",
|
|
||||||
table: "Projekte");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "AuftraggeberId",
|
|
||||||
table: "Projekte");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,220 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
||||||
using SewerStammGen.EntityFramework;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace SewerStammGen.EntityFramework.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(SewerStammGenDbContext))]
|
|
||||||
[Migration("20230330100444_AddedNullValue")]
|
|
||||||
partial class AddedNullValue
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder
|
|
||||||
.HasAnnotation("ProductVersion", "7.0.4")
|
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
||||||
|
|
||||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Auftraggeber", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("Ansprechpartner")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Ort")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Postleitzahl")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Strasse")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Telefonnummer")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Auftraggebers");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Kanal", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("DN")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<int?>("EndSchachtId")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<int>("Entwaesserung")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<decimal>("Haltungslaenge")
|
|
||||||
.HasColumnType("numeric");
|
|
||||||
|
|
||||||
b.Property<string>("Material")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Objektbezeichnung")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<int?>("ProjektId")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<int?>("StartSchachtId")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("EndSchachtId");
|
|
||||||
|
|
||||||
b.HasIndex("ProjektId");
|
|
||||||
|
|
||||||
b.HasIndex("StartSchachtId");
|
|
||||||
|
|
||||||
b.ToTable("Kanaele");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Projekt", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("AuftraggeberId")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<string>("Erstelldatum")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<int>("ExportType")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<int>("Kodierungssystem")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<string>("Ort")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Projektname")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Strasse")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("AuftraggeberId");
|
|
||||||
|
|
||||||
b.ToTable("Projekte");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Schacht", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<decimal>("DeckelHoehe")
|
|
||||||
.HasColumnType("decimal(18,4)");
|
|
||||||
|
|
||||||
b.Property<int>("Entwaesserung")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<decimal>("HochWert")
|
|
||||||
.HasColumnType("decimal(18,4)");
|
|
||||||
|
|
||||||
b.Property<string>("Objektbezeichnung")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<int?>("ProjektId")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<decimal>("RechtsWert")
|
|
||||||
.HasColumnType("decimal(18,4)");
|
|
||||||
|
|
||||||
b.Property<decimal>("SohlHoehe")
|
|
||||||
.HasColumnType("decimal(18,4)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("ProjektId");
|
|
||||||
|
|
||||||
b.ToTable("Schaechte");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Kanal", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Shared.Domain.Schacht", "EndSchacht")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("EndSchachtId");
|
|
||||||
|
|
||||||
b.HasOne("Shared.Domain.Projekt", null)
|
|
||||||
.WithMany("Kanaele")
|
|
||||||
.HasForeignKey("ProjektId");
|
|
||||||
|
|
||||||
b.HasOne("Shared.Domain.Schacht", "StartSchacht")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("StartSchachtId");
|
|
||||||
|
|
||||||
b.Navigation("EndSchacht");
|
|
||||||
|
|
||||||
b.Navigation("StartSchacht");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Projekt", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Shared.Domain.Auftraggeber", "Auftraggeber")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("AuftraggeberId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Auftraggeber");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Schacht", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Shared.Domain.Projekt", null)
|
|
||||||
.WithMany("Schaechte")
|
|
||||||
.HasForeignKey("ProjektId");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Projekt", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Kanaele");
|
|
||||||
|
|
||||||
b.Navigation("Schaechte");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,252 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace SewerStammGen.EntityFramework.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddedNullValue : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Objektbezeichnung",
|
|
||||||
table: "Schaechte",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Strasse",
|
|
||||||
table: "Projekte",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Projektname",
|
|
||||||
table: "Projekte",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Ort",
|
|
||||||
table: "Projekte",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Erstelldatum",
|
|
||||||
table: "Projekte",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Objektbezeichnung",
|
|
||||||
table: "Kanaele",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Material",
|
|
||||||
table: "Kanaele",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Telefonnummer",
|
|
||||||
table: "Auftraggebers",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Strasse",
|
|
||||||
table: "Auftraggebers",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Postleitzahl",
|
|
||||||
table: "Auftraggebers",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Ort",
|
|
||||||
table: "Auftraggebers",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Name",
|
|
||||||
table: "Auftraggebers",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Ansprechpartner",
|
|
||||||
table: "Auftraggebers",
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Objektbezeichnung",
|
|
||||||
table: "Schaechte",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Strasse",
|
|
||||||
table: "Projekte",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Projektname",
|
|
||||||
table: "Projekte",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Ort",
|
|
||||||
table: "Projekte",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Erstelldatum",
|
|
||||||
table: "Projekte",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Objektbezeichnung",
|
|
||||||
table: "Kanaele",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Material",
|
|
||||||
table: "Kanaele",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Telefonnummer",
|
|
||||||
table: "Auftraggebers",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Strasse",
|
|
||||||
table: "Auftraggebers",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Postleitzahl",
|
|
||||||
table: "Auftraggebers",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Ort",
|
|
||||||
table: "Auftraggebers",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Name",
|
|
||||||
table: "Auftraggebers",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Ansprechpartner",
|
|
||||||
table: "Auftraggebers",
|
|
||||||
type: "text",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "text",
|
|
||||||
oldNullable: true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,222 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
||||||
using SewerStammGen.EntityFramework;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace SewerStammGen.EntityFramework.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(SewerStammGenDbContext))]
|
|
||||||
[Migration("20230331095322_SchachtRefProject")]
|
|
||||||
partial class SchachtRefProject
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder
|
|
||||||
.HasAnnotation("ProductVersion", "7.0.4")
|
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
||||||
|
|
||||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Auftraggeber", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("Ansprechpartner")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Ort")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Postleitzahl")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Strasse")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Telefonnummer")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Auftraggebers");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Kanal", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("DN")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<int?>("EndSchachtId")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<int>("Entwaesserung")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<decimal>("Haltungslaenge")
|
|
||||||
.HasColumnType("numeric");
|
|
||||||
|
|
||||||
b.Property<string>("Material")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Objektbezeichnung")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<int?>("ProjektId")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<int?>("StartSchachtId")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("EndSchachtId");
|
|
||||||
|
|
||||||
b.HasIndex("ProjektId");
|
|
||||||
|
|
||||||
b.HasIndex("StartSchachtId");
|
|
||||||
|
|
||||||
b.ToTable("Kanaele");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Projekt", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("AuftraggeberId")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<string>("Erstelldatum")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<int>("ExportType")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<int>("Kodierungssystem")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<string>("Ort")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Projektname")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Strasse")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("AuftraggeberId");
|
|
||||||
|
|
||||||
b.ToTable("Projekte");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Schacht", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<decimal>("DeckelHoehe")
|
|
||||||
.HasColumnType("decimal(18,4)");
|
|
||||||
|
|
||||||
b.Property<int>("Entwaesserung")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<decimal>("HochWert")
|
|
||||||
.HasColumnType("decimal(18,4)");
|
|
||||||
|
|
||||||
b.Property<string>("Objektbezeichnung")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<int?>("ProjektId")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<decimal>("RechtsWert")
|
|
||||||
.HasColumnType("decimal(18,4)");
|
|
||||||
|
|
||||||
b.Property<decimal>("SohlHoehe")
|
|
||||||
.HasColumnType("decimal(18,4)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("ProjektId");
|
|
||||||
|
|
||||||
b.ToTable("Schaechte");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Kanal", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Shared.Domain.Schacht", "EndSchacht")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("EndSchachtId");
|
|
||||||
|
|
||||||
b.HasOne("Shared.Domain.Projekt", null)
|
|
||||||
.WithMany("Kanaele")
|
|
||||||
.HasForeignKey("ProjektId");
|
|
||||||
|
|
||||||
b.HasOne("Shared.Domain.Schacht", "StartSchacht")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("StartSchachtId");
|
|
||||||
|
|
||||||
b.Navigation("EndSchacht");
|
|
||||||
|
|
||||||
b.Navigation("StartSchacht");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Projekt", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Shared.Domain.Auftraggeber", "Auftraggeber")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("AuftraggeberId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Auftraggeber");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Schacht", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Shared.Domain.Projekt", "Projekt")
|
|
||||||
.WithMany("Schaechte")
|
|
||||||
.HasForeignKey("ProjektId");
|
|
||||||
|
|
||||||
b.Navigation("Projekt");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Projekt", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Kanaele");
|
|
||||||
|
|
||||||
b.Navigation("Schaechte");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace SewerStammGen.EntityFramework.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class SchachtRefProject : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,219 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
||||||
using SewerStammGen.EntityFramework;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace SewerStammGen.EntityFramework.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(SewerStammGenDbContext))]
|
|
||||||
partial class SewerStammGenDbContextModelSnapshot : ModelSnapshot
|
|
||||||
{
|
|
||||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder
|
|
||||||
.HasAnnotation("ProductVersion", "7.0.4")
|
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
||||||
|
|
||||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Auftraggeber", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("Ansprechpartner")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Ort")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Postleitzahl")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Strasse")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Telefonnummer")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Auftraggebers", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Kanal", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("DN")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<int?>("EndSchachtId")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<int>("Entwaesserung")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<decimal>("Haltungslaenge")
|
|
||||||
.HasColumnType("numeric");
|
|
||||||
|
|
||||||
b.Property<string>("Material")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Objektbezeichnung")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<int?>("ProjektId")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<int?>("StartSchachtId")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("EndSchachtId");
|
|
||||||
|
|
||||||
b.HasIndex("ProjektId");
|
|
||||||
|
|
||||||
b.HasIndex("StartSchachtId");
|
|
||||||
|
|
||||||
b.ToTable("Kanaele", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Projekt", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("AuftraggeberId")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<string>("Erstelldatum")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<int>("ExportType")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<int>("Kodierungssystem")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<string>("Ort")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Projektname")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Strasse")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("AuftraggeberId");
|
|
||||||
|
|
||||||
b.ToTable("Projekte", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Schacht", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<decimal>("DeckelHoehe")
|
|
||||||
.HasColumnType("decimal(18,4)");
|
|
||||||
|
|
||||||
b.Property<int>("Entwaesserung")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<decimal>("HochWert")
|
|
||||||
.HasColumnType("decimal(18,4)");
|
|
||||||
|
|
||||||
b.Property<string>("Objektbezeichnung")
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<int?>("ProjektId")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<decimal>("RechtsWert")
|
|
||||||
.HasColumnType("decimal(18,4)");
|
|
||||||
|
|
||||||
b.Property<decimal>("SohlHoehe")
|
|
||||||
.HasColumnType("decimal(18,4)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("ProjektId");
|
|
||||||
|
|
||||||
b.ToTable("Schaechte", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Kanal", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Shared.Domain.Schacht", "EndSchacht")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("EndSchachtId");
|
|
||||||
|
|
||||||
b.HasOne("Shared.Domain.Projekt", null)
|
|
||||||
.WithMany("Kanaele")
|
|
||||||
.HasForeignKey("ProjektId");
|
|
||||||
|
|
||||||
b.HasOne("Shared.Domain.Schacht", "StartSchacht")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("StartSchachtId");
|
|
||||||
|
|
||||||
b.Navigation("EndSchacht");
|
|
||||||
|
|
||||||
b.Navigation("StartSchacht");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Projekt", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Shared.Domain.Auftraggeber", "Auftraggeber")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("AuftraggeberId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Auftraggeber");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Schacht", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Shared.Domain.Projekt", "Projekt")
|
|
||||||
.WithMany("Schaechte")
|
|
||||||
.HasForeignKey("ProjektId");
|
|
||||||
|
|
||||||
b.Navigation("Projekt");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Shared.Domain.Projekt", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Kanaele");
|
|
||||||
|
|
||||||
b.Navigation("Schaechte");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.ChangeTracking;
|
|
||||||
using Shared.Domain;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SewerStammGen.EntityFramework.Services.Common
|
|
||||||
{
|
|
||||||
class NonQueryDataService<T> where T: DBObject
|
|
||||||
{
|
|
||||||
private readonly SewerStammGenDbContextFactory _contextFactory;
|
|
||||||
|
|
||||||
public NonQueryDataService(SewerStammGenDbContextFactory contextFactory)
|
|
||||||
{
|
|
||||||
_contextFactory = contextFactory;
|
|
||||||
}
|
|
||||||
public async Task<T> Create(T entity)
|
|
||||||
{
|
|
||||||
using SewerStammGenDbContext context = _contextFactory.CreateDbContext();
|
|
||||||
EntityEntry<T> createdEntity = await context.Set<T>().AddAsync(entity);
|
|
||||||
await context.SaveChangesAsync();
|
|
||||||
return createdEntity.Entity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public T CreateNonAsync(T entity)
|
|
||||||
{
|
|
||||||
using SewerStammGenDbContext context = _contextFactory.CreateDbContext();
|
|
||||||
EntityEntry<T> createdEntity = context.Set<T>().Add(entity);
|
|
||||||
context.SaveChanges();
|
|
||||||
return createdEntity.Entity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<bool> Delete(int id)
|
|
||||||
{
|
|
||||||
using SewerStammGenDbContext context = _contextFactory.CreateDbContext();
|
|
||||||
T? entity = await context.Set<T>().FirstOrDefaultAsync((e) => e.Id == id);
|
|
||||||
if (entity == null) return false;
|
|
||||||
context.Set<T>().Remove(entity);
|
|
||||||
await context.SaveChangesAsync();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
public async Task<T> Update(int id, T entity)
|
|
||||||
{
|
|
||||||
using SewerStammGenDbContext context = _contextFactory.CreateDbContext();
|
|
||||||
entity.Id = id;
|
|
||||||
|
|
||||||
context.Set<T>().Update(entity);
|
|
||||||
await context.SaveChangesAsync();
|
|
||||||
return entity;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using SewerStammGen.EntityFramework.Services.Common;
|
|
||||||
using Shared.Contracts;
|
|
||||||
using Shared.Domain;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SewerStammGen.EntityFramework.Services
|
|
||||||
{
|
|
||||||
public class GenericDataService<T> : IDataService<T> where T : DBObject
|
|
||||||
{
|
|
||||||
private readonly SewerStammGenDbContextFactory _contextFactory;
|
|
||||||
private readonly NonQueryDataService<T> _nonQueryDataService;
|
|
||||||
|
|
||||||
public GenericDataService(SewerStammGenDbContextFactory contextFactory)
|
|
||||||
{
|
|
||||||
_contextFactory = contextFactory;
|
|
||||||
_nonQueryDataService = new NonQueryDataService<T>(contextFactory);
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<T> Create(T entity)
|
|
||||||
{
|
|
||||||
return await _nonQueryDataService.Create(entity);
|
|
||||||
}
|
|
||||||
|
|
||||||
public T CreateNonAsync(T entity)
|
|
||||||
{
|
|
||||||
return _nonQueryDataService.CreateNonAsync(entity);
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<bool> Delete(int id)
|
|
||||||
{
|
|
||||||
return await (_nonQueryDataService.Delete(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<T> Get(int id)
|
|
||||||
{
|
|
||||||
using(SewerStammGenDbContext context = _contextFactory.CreateDbContext())
|
|
||||||
{
|
|
||||||
T entity = await context.Set<T>().FirstOrDefaultAsync((e) => e.Id == id);
|
|
||||||
return entity;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<IEnumerable<T>> GetAll()
|
|
||||||
{
|
|
||||||
using (SewerStammGenDbContext context = _contextFactory.CreateDbContext())
|
|
||||||
{
|
|
||||||
IEnumerable<T> entities = await context.Set<T>().ToListAsync();
|
|
||||||
return entities;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<T> Update(int id, T entity)
|
|
||||||
{
|
|
||||||
return await _nonQueryDataService.Update(id, entity);
|
|
||||||
}
|
|
||||||
|
|
||||||
T IDataService<T>.CreateNonAsync(T entity)
|
|
||||||
{
|
|
||||||
return _nonQueryDataService.CreateNonAsync(entity);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using SewerStammGen.EntityFramework.Services.Common;
|
|
||||||
using SewerStammGen.Shared.Contracts;
|
|
||||||
using Shared.Domain;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SewerStammGen.EntityFramework.Services
|
|
||||||
{
|
|
||||||
public class HaltungDataService : IHaltungDataService
|
|
||||||
{
|
|
||||||
private readonly SewerStammGenDbContextFactory _contextFactory;
|
|
||||||
private readonly NonQueryDataService<Kanal> _nonQueryDataService;
|
|
||||||
|
|
||||||
public HaltungDataService(SewerStammGenDbContextFactory contextFactory)
|
|
||||||
{
|
|
||||||
_contextFactory = contextFactory;
|
|
||||||
_nonQueryDataService = new NonQueryDataService<Kanal>(contextFactory);
|
|
||||||
}
|
|
||||||
public async Task<Kanal> Create(Kanal entity)
|
|
||||||
{
|
|
||||||
return await _nonQueryDataService.Create(entity);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Kanal CreateNonAsync(Kanal entity)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Task<bool> Delete(int id)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<Kanal> Get(int id)
|
|
||||||
{
|
|
||||||
using (SewerStammGenDbContext context = _contextFactory.CreateDbContext())
|
|
||||||
{
|
|
||||||
Kanal entity = await context.Set<Kanal>()
|
|
||||||
.Include("StartSchacht")
|
|
||||||
.Include("EndSchacht")
|
|
||||||
.Include("Projekt")
|
|
||||||
.FirstOrDefaultAsync((e) => e.Id == id);
|
|
||||||
return entity;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<IEnumerable<Kanal>> GetAll(int projektID)
|
|
||||||
{
|
|
||||||
using (SewerStammGenDbContext context = _contextFactory.CreateDbContext())
|
|
||||||
{
|
|
||||||
IEnumerable<Kanal> entities = await context.Set<Kanal>().Where(x => x.Projekt.Id.Equals(projektID)).ToListAsync();
|
|
||||||
return entities;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Task<IEnumerable<Kanal>> GetAll()
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<Kanal> Update(int id, Kanal entity)
|
|
||||||
{
|
|
||||||
return await _nonQueryDataService.Update(id, entity);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using SewerStammGen.EntityFramework.Services.Common;
|
|
||||||
using SewerStammGen.Shared.Contracts;
|
|
||||||
using Shared.Domain;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SewerStammGen.EntityFramework.Services
|
|
||||||
{
|
|
||||||
public class SchachtDataService : ISchachtDataService
|
|
||||||
{
|
|
||||||
private readonly SewerStammGenDbContextFactory _contextFactory;
|
|
||||||
private readonly NonQueryDataService<Schacht> _nonQueryDataService;
|
|
||||||
|
|
||||||
public SchachtDataService(SewerStammGenDbContextFactory contextFactory)
|
|
||||||
{
|
|
||||||
_contextFactory = contextFactory;
|
|
||||||
_nonQueryDataService = new NonQueryDataService<Schacht>(contextFactory);
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<Schacht> Create(Schacht entity)
|
|
||||||
{
|
|
||||||
return await _nonQueryDataService.Create(entity);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Schacht CreateNonAsync(Schacht entity)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Task<bool> Delete(int id)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Task<Schacht> Get(int id)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<IEnumerable<Schacht>> GetAll(int projektID)
|
|
||||||
{
|
|
||||||
using (SewerStammGenDbContext context = _contextFactory.CreateDbContext())
|
|
||||||
{
|
|
||||||
IEnumerable<Schacht> entities = await context.Set<Schacht>().Where(x => x.Projekt.Id.Equals(projektID)).ToListAsync();
|
|
||||||
return entities;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Task<IEnumerable<Schacht>> GetAll()
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<Schacht> GetSchachtByNameAndProjekt(string name, int projektID)
|
|
||||||
{
|
|
||||||
using(SewerStammGenDbContext context = _contextFactory.CreateDbContext())
|
|
||||||
{
|
|
||||||
Schacht entity = await context.Set<Schacht>().Where(x => x.Projekt.Id.Equals(projektID) && x.Objektbezeichnung.Equals(name)).FirstOrDefaultAsync();
|
|
||||||
return entity;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<Schacht> Update(int id, Schacht entity)
|
|
||||||
{
|
|
||||||
return await _nonQueryDataService.Update(id, entity);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.4" />
|
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.4" />
|
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.4">
|
|
||||||
<PrivateAssets>all</PrivateAssets>
|
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="7.0.3" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\Shared\SewerStammGen.Shared.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Shared.Domain;
|
|
||||||
|
|
||||||
namespace SewerStammGen.EntityFramework
|
|
||||||
{
|
|
||||||
public class SewerStammGenDbContext : DbContext
|
|
||||||
{
|
|
||||||
public SewerStammGenDbContext(DbContextOptions options) : base(options) { }
|
|
||||||
|
|
||||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
base.OnModelCreating(modelBuilder);
|
|
||||||
}
|
|
||||||
|
|
||||||
public DbSet<Schacht>? Schaechte { get; set; }
|
|
||||||
public DbSet<Projekt>? Projekte { get; set; }
|
|
||||||
public DbSet<Kanal>? Kanaele { get; set; }
|
|
||||||
public DbSet<Auftraggeber>? Auftraggebers { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Design;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SewerStammGen.EntityFramework
|
|
||||||
{
|
|
||||||
public class SewerStammGenDbContextFactory : IDesignTimeDbContextFactory<SewerStammGenDbContext>
|
|
||||||
{
|
|
||||||
private readonly Action<DbContextOptionsBuilder> _configureDbContext;
|
|
||||||
|
|
||||||
public SewerStammGenDbContextFactory() { }
|
|
||||||
|
|
||||||
public SewerStammGenDbContextFactory(Action<DbContextOptionsBuilder> configureDbContext)
|
|
||||||
{
|
|
||||||
_configureDbContext = configureDbContext;
|
|
||||||
}
|
|
||||||
|
|
||||||
public SewerStammGenDbContext CreateDbContext()
|
|
||||||
{
|
|
||||||
DbContextOptionsBuilder<SewerStammGenDbContext>? options = new();
|
|
||||||
_configureDbContext( options );
|
|
||||||
return new SewerStammGenDbContext(options.Options);
|
|
||||||
}
|
|
||||||
|
|
||||||
public SewerStammGenDbContext CreateDbContext(string[] args)
|
|
||||||
{
|
|
||||||
var options = new DbContextOptionsBuilder<SewerStammGenDbContext>();
|
|
||||||
options.UseNpgsql("Host = localhost; Database = SewerGen; Username = SewerGen; Password = SewerGen");
|
|
||||||
SewerStammGenDbContext result = new(options.Options);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
14
SewerStammGen.Shared/Contracts/IAuftraggeberDataService.cs
Normal file
14
SewerStammGen.Shared/Contracts/IAuftraggeberDataService.cs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
using SewerStammGen.Shared.Domain;
|
||||||
|
using Shared.Contracts;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SewerStammGen.Shared.Contracts
|
||||||
|
{
|
||||||
|
public interface IAuftraggeberDataService : IDataService<Auftraggeber>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,13 +6,13 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace Shared.Contracts
|
namespace Shared.Contracts
|
||||||
{
|
{
|
||||||
public interface IDataService<T>
|
public interface IDataService<T>: IDisposable
|
||||||
{
|
{
|
||||||
Task<IEnumerable<T>> GetAll();
|
Task<IEnumerable<T>> GetAll();
|
||||||
Task<T> Get(int id);
|
Task<T> Get(int id);
|
||||||
Task<T> Create(T entity);
|
Task<T> Create(T entity);
|
||||||
Task<T> Update(int id,T entity);
|
Task<T> Update(T entity);
|
||||||
Task<bool> Delete(int id);
|
Task<bool> Delete(int id);
|
||||||
T CreateNonAsync(T entity);
|
//T CreateNonAsync(T entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
16
SewerStammGen.Shared/Contracts/IExport.cs
Normal file
16
SewerStammGen.Shared/Contracts/IExport.cs
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
using SewerStammGen.Shared.Contracts;
|
||||||
|
using SewerStammGen.Shared.Domain;
|
||||||
|
using SewerStammGen.Shared.Enum;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Shared.Contracts
|
||||||
|
{
|
||||||
|
public interface IExport
|
||||||
|
{
|
||||||
|
Task<bool> Export(string projektname,EKodierungssystem kodierungssystem,List<Kanal> haltungen, List<Schacht> schaechte, IWWLog log);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
using Shared.Contracts;
|
using SewerStammGen.Shared.Domain;
|
||||||
using Shared.Domain;
|
using Shared.Contracts;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -10,6 +10,7 @@ namespace SewerStammGen.Shared.Contracts
|
|||||||
{
|
{
|
||||||
public interface IHaltungDataService : IDataService<Kanal>
|
public interface IHaltungDataService : IDataService<Kanal>
|
||||||
{
|
{
|
||||||
Task<IEnumerable<Kanal>> GetAll(int projektID);
|
Task<IEnumerable<Kanal>> GetAllByProjekt(int projektID);
|
||||||
|
Task<IEnumerable<Kanal>> GetAllByProjekt(Projekt projekt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
15
SewerStammGen.Shared/Contracts/IImport.cs
Normal file
15
SewerStammGen.Shared/Contracts/IImport.cs
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
using SewerStammGen.Shared.Domain;
|
||||||
|
using SewerStammGen.Shared.Enum;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Shared.Contracts
|
||||||
|
{
|
||||||
|
public interface IImport
|
||||||
|
{
|
||||||
|
List<Schacht> LoadSchaechte(string filename, string vermesser);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
using Shared.Contracts;
|
using SewerStammGen.Shared.Domain;
|
||||||
using Shared.Domain;
|
using Shared.Contracts;
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
18
SewerStammGen.Shared/Contracts/ISchachtDataService.cs
Normal file
18
SewerStammGen.Shared/Contracts/ISchachtDataService.cs
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
using SewerStammGen.Shared.Domain;
|
||||||
|
using Shared.Contracts;
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SewerStammGen.Shared.Contracts
|
||||||
|
{
|
||||||
|
public interface ISchachtDataService : IDataService<Schacht>
|
||||||
|
{
|
||||||
|
Task<IEnumerable<Schacht>> GetAllByProjekt(int projektID);
|
||||||
|
Task<IEnumerable<Schacht>> GetAllByProjekt(Projekt projekt);
|
||||||
|
Task<bool> InsertSchachtBulk(List<Schacht> schacht);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,10 +4,10 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Shared.Contracts
|
namespace SewerStammGen.Shared.Contracts
|
||||||
{
|
{
|
||||||
internal interface IExport
|
public interface IWWLog
|
||||||
{
|
{
|
||||||
bool Export();
|
void Log(string message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
25
SewerStammGen.Shared/Domain/Auftraggeber.cs
Normal file
25
SewerStammGen.Shared/Domain/Auftraggeber.cs
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SewerStammGen.Shared.Domain
|
||||||
|
{
|
||||||
|
public class Auftraggeber : DBObject
|
||||||
|
{
|
||||||
|
public string Name { get; set; } = String.Empty;
|
||||||
|
public string Strasse { get; set; } = String.Empty;
|
||||||
|
public string Ort { get; set; } = String.Empty;
|
||||||
|
public string Postleitzahl { get; set; } = String.Empty;
|
||||||
|
public string Ansprechpartner { get; set; } = String.Empty;
|
||||||
|
public string Telefonnummer { get; set; } = String.Empty;
|
||||||
|
|
||||||
|
public bool DataChanged { get; set; } = false;
|
||||||
|
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return string.Format("{0} [{1}]", Name, Ansprechpartner);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Shared.Domain
|
namespace SewerStammGen.Shared.Domain
|
||||||
{
|
{
|
||||||
public class DBObject
|
public class DBObject
|
||||||
{
|
{
|
||||||
22
SewerStammGen.Shared/Domain/Kanal.cs
Normal file
22
SewerStammGen.Shared/Domain/Kanal.cs
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
using SewerStammGen.Shared.Enum;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SewerStammGen.Shared.Domain
|
||||||
|
{
|
||||||
|
public class Kanal : DBObject
|
||||||
|
{
|
||||||
|
public string Objektbezeichnung { get; set; } = String.Empty;
|
||||||
|
public Schacht StartSchacht { get; set; } = new Schacht();
|
||||||
|
public Schacht EndSchacht { get; set; } = new Schacht();
|
||||||
|
public int DN { get; set; }
|
||||||
|
public string Material { get; set; } = String.Empty;
|
||||||
|
public decimal Haltungslaenge { get; set; }
|
||||||
|
public Projekt Projekt { get; set; } = new Projekt();
|
||||||
|
public EEntwaeserung Entwaesserung { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
27
SewerStammGen.Shared/Domain/Projekt.cs
Normal file
27
SewerStammGen.Shared/Domain/Projekt.cs
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
|
||||||
|
using SewerStammGen.Shared.Enum;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SewerStammGen.Shared.Domain
|
||||||
|
{
|
||||||
|
public class Projekt : DBObject
|
||||||
|
{
|
||||||
|
public string Projektname { get; set; } = String.Empty;
|
||||||
|
public string Erstelldatum { get; set; } = String.Empty;
|
||||||
|
public string Strasse { get; set; } = String.Empty;
|
||||||
|
public string Ort { get; set; } = String.Empty;
|
||||||
|
public Auftraggeber Auftraggeber { get; set; } = new Auftraggeber();
|
||||||
|
public EExportType ExportType { get; set; }
|
||||||
|
public EKodierungssystem Kodierungssystem { get; set; }
|
||||||
|
public IList<Kanal> Kanaele { get; set; } = new List<Kanal>();
|
||||||
|
public IList<Schacht> Schaechte { get; set;} = new List<Schacht>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public bool AuftraggeberTemporar { get; set; } = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
26
SewerStammGen.Shared/Domain/Schacht.cs
Normal file
26
SewerStammGen.Shared/Domain/Schacht.cs
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
using SewerStammGen.Shared.Enum;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SewerStammGen.Shared.Domain
|
||||||
|
{
|
||||||
|
public class Schacht : DBObject
|
||||||
|
{
|
||||||
|
public string Objektbezeichnung { get; set; } = String.Empty;
|
||||||
|
public decimal DeckelRechtsWert { get; set; }
|
||||||
|
public decimal DeckelHochWert { get; set; }
|
||||||
|
public decimal DeckelHoehe { get; set; }
|
||||||
|
public decimal SohlRechtsWert { get; set; }
|
||||||
|
public decimal SohlHochWert { get; set; }
|
||||||
|
public decimal SohlHoehe { get; set; }
|
||||||
|
public Projekt Projekt { get; set; } = new Projekt();
|
||||||
|
public EEntwaeserung Entwaesserung { get; set; }
|
||||||
|
public ESchachtType SchachtType { get; set; }
|
||||||
|
public string Vermesser { get; set; } = String.Empty;
|
||||||
|
public string AufnahmeDatum { get; set; } = String.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
9
SewerStammGen.Shared/Enum/EEntwaeserung.cs
Normal file
9
SewerStammGen.Shared/Enum/EEntwaeserung.cs
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
namespace SewerStammGen.Shared.Enum
|
||||||
|
{
|
||||||
|
public enum EEntwaeserung
|
||||||
|
{
|
||||||
|
Regenwasser,
|
||||||
|
Schmutzwasser,
|
||||||
|
Mischwasser
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,8 +4,9 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Shared.Enum
|
namespace SewerStammGen.Shared.Enum
|
||||||
{
|
{
|
||||||
|
[Flags]
|
||||||
public enum EExportType
|
public enum EExportType
|
||||||
{
|
{
|
||||||
KANDIS4,
|
KANDIS4,
|
||||||
@@ -13,6 +14,8 @@ namespace Shared.Enum
|
|||||||
M150,
|
M150,
|
||||||
XML2006,
|
XML2006,
|
||||||
XML2013,
|
XML2013,
|
||||||
XML2017
|
XML2017,
|
||||||
|
KANDIS = KANDIS4 | KANDIS6,
|
||||||
|
XML = XML2006 | XML2013 | XML2017
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Shared.Enum
|
namespace SewerStammGen.Shared.Enum
|
||||||
{
|
{
|
||||||
public enum EKodierungssystem
|
public enum EKodierungssystem
|
||||||
{
|
{
|
||||||
8
SewerStammGen.Shared/Enum/ESchachtType.cs
Normal file
8
SewerStammGen.Shared/Enum/ESchachtType.cs
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
namespace SewerStammGen.Shared.Enum
|
||||||
|
{
|
||||||
|
public enum ESchachtType
|
||||||
|
{
|
||||||
|
Hauptkanal,
|
||||||
|
Revisionschacht
|
||||||
|
}
|
||||||
|
}
|
||||||
8
SewerStammGen.Shared/Enum/ESelectedNorm.cs
Normal file
8
SewerStammGen.Shared/Enum/ESelectedNorm.cs
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
namespace SewerStammGen.Shared.Enum
|
||||||
|
{
|
||||||
|
public enum ESelectedNorm
|
||||||
|
{
|
||||||
|
KANDIS,
|
||||||
|
XML
|
||||||
|
}
|
||||||
|
}
|
||||||
19
SewerStammGen.Shared/SewerStammGen.Shared.csproj
Normal file
19
SewerStammGen.Shared/SewerStammGen.Shared.csproj
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Remove="Services\**" />
|
||||||
|
<EmbeddedResource Remove="Services\**" />
|
||||||
|
<None Remove="Services\**" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Wibu.CodeMeter.WibuCmNET" Version="7.60.5615.502" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
203
SewerStammGen.Shared/WWRuntime.cs
Normal file
203
SewerStammGen.Shared/WWRuntime.cs
Normal file
@@ -0,0 +1,203 @@
|
|||||||
|
using CodeMeter;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SewerStammGen.Shared
|
||||||
|
{
|
||||||
|
public class DongleNotFoundException : Exception
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class WWRuntime : IDisposable
|
||||||
|
{
|
||||||
|
uint FirmCode;
|
||||||
|
uint ProductCode;
|
||||||
|
|
||||||
|
Api cmApi;
|
||||||
|
CmCredential cmCred;
|
||||||
|
CmAccess2 cmAcc;
|
||||||
|
HCMSysEntry hcmse;
|
||||||
|
CmBoxInfo cmBoxInfo;
|
||||||
|
CmBoxEntry2? BoxContent;
|
||||||
|
|
||||||
|
uint ExportCount;
|
||||||
|
|
||||||
|
public WWRuntime(uint ProductCode)
|
||||||
|
{
|
||||||
|
this.ProductCode = ProductCode;
|
||||||
|
FirmCode = 103086;
|
||||||
|
|
||||||
|
cmApi = new Api();
|
||||||
|
cmCred = new CmCredential();
|
||||||
|
cmAcc = new CmAccess2();
|
||||||
|
|
||||||
|
cmAcc.Credential = cmCred;
|
||||||
|
cmAcc.Ctrl |= CmAccess.Option.UserLimit;
|
||||||
|
cmAcc.FirmCode = FirmCode;
|
||||||
|
cmAcc.ProductCode = ProductCode;
|
||||||
|
|
||||||
|
hcmse = cmApi.CmAccess2(CmAccessOption.Local, cmAcc);
|
||||||
|
if(hcmse == null)
|
||||||
|
{
|
||||||
|
ErrorCodes2 code = cmApi.CmGetLastErrorCode2();
|
||||||
|
throw new DongleNotFoundException();
|
||||||
|
}
|
||||||
|
|
||||||
|
cmBoxInfo = new CmBoxInfo();
|
||||||
|
|
||||||
|
CmGetBoxContentsOption boxOptions = new CmGetBoxContentsOption();
|
||||||
|
boxOptions = CmGetBoxContentsOption.AllEntries;
|
||||||
|
CmBoxEntry2[] tmpBoxContent;
|
||||||
|
|
||||||
|
tmpBoxContent = cmApi.CmGetBoxContents2(hcmse, boxOptions, this.FirmCode, cmBoxInfo);
|
||||||
|
|
||||||
|
CmEntryData[] pCmBoxEntry = (CmEntryData[])cmApi.CmGetInfo(hcmse, CmGetInfoOption.EntryData);
|
||||||
|
for (int i = 0; i < pCmBoxEntry.Length; i++)
|
||||||
|
{
|
||||||
|
switch (pCmBoxEntry[i].Ctrl & 0x0ffff)
|
||||||
|
{
|
||||||
|
case (uint)CodeMeter.GlobalEntryOption.UserData:
|
||||||
|
{
|
||||||
|
|
||||||
|
ExportCount = BitConverter.ToUInt32(pCmBoxEntry[i].Data);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case (uint)CodeMeter.GlobalEntryOption.ProtectedData:
|
||||||
|
// Transfer to transformed byte
|
||||||
|
uint length = pCmBoxEntry[i].DataLen;
|
||||||
|
byte[] datas = new byte[length];
|
||||||
|
for (uint f = 0; f < length; f++)
|
||||||
|
{
|
||||||
|
datas[f] = pCmBoxEntry[i].Data[f];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//SyncfusionKey = Encoding.ASCII.GetString(datas);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (CmBoxEntry2 boxes in tmpBoxContent)
|
||||||
|
{
|
||||||
|
if (boxes.ProductCode == this.ProductCode)
|
||||||
|
{
|
||||||
|
this.BoxContent = boxes;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsLicensed(byte neededMask)
|
||||||
|
{
|
||||||
|
uint DongleFeature = GetFeatureMap();
|
||||||
|
byte DongleFeatureB = (byte)DongleFeature;
|
||||||
|
|
||||||
|
if ((DongleFeatureB & neededMask) == neededMask)
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private uint GetFeatureMap()
|
||||||
|
{
|
||||||
|
if (BoxContent == null) return 0;
|
||||||
|
return BoxContent.FeatureMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
string GetDongleSerial()
|
||||||
|
{
|
||||||
|
CmBoxInfo res = (CmBoxInfo)cmApi.CmGetInfo(hcmse, CmGetInfoOption.BoxInfo);
|
||||||
|
if (null != res)
|
||||||
|
{
|
||||||
|
return res.SerialNumber.ToString();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new Exception("Fehler beim aufrufen der Seriennummer");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int GetExportCount()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void IncrementExportCounter()
|
||||||
|
{
|
||||||
|
ExportCount++;
|
||||||
|
writeExportCount(ExportCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool CheckDongleVorhanden()
|
||||||
|
{
|
||||||
|
return hcmse != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void CleanDongle()
|
||||||
|
{
|
||||||
|
cmApi.CmRelease(hcmse);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void writeExportCount(uint count)
|
||||||
|
{
|
||||||
|
CmCreatePioUserData cmCreatePioUserData = new CmCreatePioUserData();
|
||||||
|
CmProgramUpdateProductItem pcmUpdateProductItem = new CmProgramUpdateProductItem();
|
||||||
|
CmCreateItem hcmCreateItem = new CmCreateItem();
|
||||||
|
object pvPio = new object();
|
||||||
|
|
||||||
|
CmInternalEntryInfo[] cmInternalEntryData;
|
||||||
|
cmInternalEntryData = (CmInternalEntryInfo[])cmApi.CmGetInfo(hcmse, CmGetInfoOption.InternalEntryInfo);
|
||||||
|
|
||||||
|
byte[] newCount = BitConverter.GetBytes(count);
|
||||||
|
newCount.CopyTo(cmCreatePioUserData.Data, 0);
|
||||||
|
cmCreatePioUserData.DataLen = (ushort)newCount.Length;
|
||||||
|
pvPio = cmCreatePioUserData;
|
||||||
|
|
||||||
|
CmCreatePioProductCode cmPC = new CmCreatePioProductCode();
|
||||||
|
cmPC.TvbCtrl = (CmCreatePioProductCode.Option)0;
|
||||||
|
cmPC.ProductCode = ProductCode;
|
||||||
|
cmPC.FirmItemReference = cmInternalEntryData[0].FirmItemReference;
|
||||||
|
cmPC.ProductItemReference = cmInternalEntryData[0].ProductItemReference;
|
||||||
|
|
||||||
|
string? error;
|
||||||
|
|
||||||
|
bool res = cmApi.CmCreateProductItemOption(hcmse, CmCreateProductItemOptionOption.Update | CmCreateProductItemOptionOption.ProductCode, cmPC);
|
||||||
|
if(!res)
|
||||||
|
{
|
||||||
|
error = cmApi.CmGetLastErrorText();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
res = cmApi.CmCreateProductItemOption(hcmse, CmCreateProductItemOptionOption.UserData | CmCreateProductItemOptionOption.Terminate, pvPio);
|
||||||
|
if(!res)
|
||||||
|
{
|
||||||
|
error = cmApi.CmGetLastErrorText();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
hcmCreateItem.FirmCode = 103086;
|
||||||
|
hcmCreateItem.ProductCode = ProductCode;
|
||||||
|
|
||||||
|
|
||||||
|
byte[] sequence = cmApi.CmCreateSequence(hcmse, GlobalProgrammingOption.UpdateProductItem, ref hcmCreateItem, pcmUpdateProductItem);
|
||||||
|
|
||||||
|
res = cmApi.CmProgram(hcmse, GlobalProgrammingOption.UpdateProductItem, sequence);
|
||||||
|
|
||||||
|
if (!res)
|
||||||
|
{
|
||||||
|
error = cmApi.CmGetLastErrorText();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
CleanDongle();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SewerStammGen.WPF.Commands
|
|
||||||
{
|
|
||||||
internal class HaltungAddCommand : AsyncCommandBase
|
|
||||||
{
|
|
||||||
public HaltungAddCommand()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Task ExecuteAsync(object? parameter)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
using SewerStammGen.Shared.Contracts;
|
|
||||||
using SewerStammGen.WPF.ViewModel;
|
|
||||||
using Shared.Contracts;
|
|
||||||
using Shared.Domain;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SewerStammGen.WPF.Commands
|
|
||||||
{
|
|
||||||
internal class HaltungEditSaveCommand : AsyncCommandBase
|
|
||||||
{
|
|
||||||
private HaltungEditViewModel haltungEditViewModel;
|
|
||||||
private IDataService<Kanal> kanalDataService;
|
|
||||||
private ISchachtService schachtService;
|
|
||||||
|
|
||||||
public HaltungEditSaveCommand(HaltungEditViewModel haltungEditViewModel, IDataService<Kanal> kanalDataService, ISchachtService schachtService)
|
|
||||||
{
|
|
||||||
this.haltungEditViewModel = haltungEditViewModel;
|
|
||||||
this.kanalDataService = kanalDataService;
|
|
||||||
this.schachtService = schachtService;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override async Task ExecuteAsync(object? parameter)
|
|
||||||
{
|
|
||||||
if(haltungEditViewModel._oberePunkt != haltungEditViewModel.Model.StartSchacht.Objektbezeichnung)
|
|
||||||
{
|
|
||||||
Schacht s = await schachtService.FindSchachtByNameAndProjektID(haltungEditViewModel._oberePunkt, haltungEditViewModel.Model.Projekt.Id);
|
|
||||||
haltungEditViewModel.Model.StartSchacht = s;
|
|
||||||
}
|
|
||||||
haltungEditViewModel.Model = await kanalDataService.Update(haltungEditViewModel.Model.Id, haltungEditViewModel.Model);
|
|
||||||
Trace.WriteLine("Daten gespeichert");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
using SewerStammGen.Shared.Contracts;
|
|
||||||
using SewerStammGen.WPF.Interface.Navigator;
|
|
||||||
using SewerStammGen.WPF.ViewModel.State;
|
|
||||||
using Shared.Contracts;
|
|
||||||
using Shared.Domain;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SewerStammGen.WPF.Commands
|
|
||||||
{
|
|
||||||
class SchachtAddCommand : AsyncCommandBase
|
|
||||||
{
|
|
||||||
private readonly IActualState actualState;
|
|
||||||
private readonly IRenavigator renavigator;
|
|
||||||
private readonly IDataService<Projekt> projektService;
|
|
||||||
private readonly ISchachtService schachtService;
|
|
||||||
|
|
||||||
|
|
||||||
public SchachtAddCommand(IDataService<Projekt> projektService, IActualState actualState, IRenavigator renavigator, ISchachtService schachtService)
|
|
||||||
{
|
|
||||||
this.actualState = actualState;
|
|
||||||
this.renavigator = renavigator;
|
|
||||||
this.projektService = projektService;
|
|
||||||
this.schachtService = schachtService;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override async Task ExecuteAsync(object? parameter)
|
|
||||||
{
|
|
||||||
Projekt aktuelleProjekt = await projektService.Get(actualState.ProjektID);
|
|
||||||
Schacht schacht = await schachtService.CreateSchacht(aktuelleProjekt);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.Extensions.Configuration;
|
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
|
||||||
using Microsoft.Extensions.Hosting;
|
|
||||||
using SewerStammGen.EntityFramework;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SewerStammGen.HostBuilders
|
|
||||||
{
|
|
||||||
static class AddDBContextHostBuilderExtensions
|
|
||||||
{
|
|
||||||
public static IHostBuilder AddDBContext(this IHostBuilder hostBuilder)
|
|
||||||
{
|
|
||||||
hostBuilder.ConfigureServices((context, services) =>
|
|
||||||
{
|
|
||||||
string? connectionString = "";
|
|
||||||
Action<DbContextOptionsBuilder>? configureDbContext = null;
|
|
||||||
string? databaseToUse = context.Configuration.GetConnectionString("databaseToUse");
|
|
||||||
if (databaseToUse != null)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (databaseToUse.Equals("default"))
|
|
||||||
{
|
|
||||||
connectionString = context.Configuration.GetConnectionString("default");
|
|
||||||
configureDbContext = o =>
|
|
||||||
{
|
|
||||||
o.EnableSensitiveDataLogging();
|
|
||||||
o.UseNpgsql(connectionString);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
else if (databaseToUse.Equals("sqlite"))
|
|
||||||
{
|
|
||||||
connectionString = context.Configuration.GetConnectionString("sqlite");
|
|
||||||
configureDbContext = o => o.UseSqlite(connectionString);
|
|
||||||
}
|
|
||||||
services.AddDbContext<SewerStammGenDbContext>(configureDbContext);
|
|
||||||
services.AddSingleton<SewerStammGenDbContextFactory>(new SewerStammGenDbContextFactory(configureDbContext));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
return hostBuilder;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
using Microsoft.Extensions.DependencyInjection;
|
|
||||||
using Microsoft.Extensions.Hosting;
|
|
||||||
using SewerStammGen.EntityFramework.Services;
|
|
||||||
using SewerStammGen.Shared.Contracts;
|
|
||||||
using SewerStammGen.Shared.Services;
|
|
||||||
using SewerStammGen.WPF.Interface.Navigator;
|
|
||||||
using SewerStammGen.WPF.ViewModel;
|
|
||||||
using SewerStammGen.WPF.ViewModel.State.Navigation;
|
|
||||||
using Shared.Contracts;
|
|
||||||
using Shared.Domain;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SewerStammGen.HostBuilders
|
|
||||||
{
|
|
||||||
internal static class AddServicesHostBuilderExtensions
|
|
||||||
{
|
|
||||||
public static IHostBuilder AddServices(this IHostBuilder host)
|
|
||||||
{
|
|
||||||
host.ConfigureServices(services =>
|
|
||||||
{
|
|
||||||
services.AddSingleton<IMainWindowNavigator, MainWindowNavigator>();
|
|
||||||
services.AddSingleton<ViewModelDelegateRenavigator<ProjektEditViewModel>>();
|
|
||||||
services.AddSingleton<IDataService<Projekt>, GenericDataService<Projekt>>();
|
|
||||||
services.AddSingleton<IDataService<Schacht>, GenericDataService<Schacht>>();
|
|
||||||
services.AddSingleton<IDataService<Kanal>, GenericDataService<Kanal>>();
|
|
||||||
services.AddSingleton<ISchachtDataService, SchachtDataService>();
|
|
||||||
services.AddSingleton<IHaltungDataService, HaltungDataService>();
|
|
||||||
services.AddSingleton<ISchachtService, SchachtService>();
|
|
||||||
});
|
|
||||||
return host;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,143 +0,0 @@
|
|||||||
using SewerStammGen.Shared.Contracts;
|
|
||||||
using SewerStammGen.WPF.Commands;
|
|
||||||
using SewerStammGen.WPF.ViewModel.State;
|
|
||||||
using Shared.Contracts;
|
|
||||||
using Shared.Domain;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Collections.ObjectModel;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Controls;
|
|
||||||
using System.Windows.Input;
|
|
||||||
|
|
||||||
namespace SewerStammGen.WPF.ViewModel
|
|
||||||
{
|
|
||||||
internal class HaltungEditViewModel : BaseViewModel
|
|
||||||
{
|
|
||||||
private readonly IActualState _actualState;
|
|
||||||
private readonly IHaltungDataService _kanalDataService;
|
|
||||||
private readonly ISchachtService _schachtService;
|
|
||||||
private Kanal _model;
|
|
||||||
|
|
||||||
public Kanal Model
|
|
||||||
{
|
|
||||||
get => _model;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_model = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public string _oberePunkt { get; set; }
|
|
||||||
public string _unterePunkt { get; set; }
|
|
||||||
|
|
||||||
public string ObereSchacht
|
|
||||||
{
|
|
||||||
get => _oberePunkt;
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (_oberePunkt != value)
|
|
||||||
{
|
|
||||||
_oberePunkt = value;
|
|
||||||
OnPropertyChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public string UntereSchacht
|
|
||||||
{
|
|
||||||
get => _unterePunkt;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (_unterePunkt != value)
|
|
||||||
{
|
|
||||||
_unterePunkt = value;
|
|
||||||
OnPropertyChanged();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public string Haltungsbezeichnung
|
|
||||||
{
|
|
||||||
get => _model.Objektbezeichnung;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if(_model.Objektbezeichnung != value)
|
|
||||||
{
|
|
||||||
_model.Objektbezeichnung = value;
|
|
||||||
OnPropertyChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public string Material
|
|
||||||
{
|
|
||||||
get => _model.Material;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if( _model.Material != value)
|
|
||||||
{
|
|
||||||
_model.Material = value;
|
|
||||||
OnPropertyChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public string Durchmesser
|
|
||||||
{
|
|
||||||
get => _model.DN.ToString();
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if(_model.DN.ToString() != value)
|
|
||||||
{
|
|
||||||
_model.DN = int.Parse(value);
|
|
||||||
OnPropertyChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public string Haltungslaenge
|
|
||||||
{
|
|
||||||
get => _model.Haltungslaenge.ToString();
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if(_model.Haltungslaenge.ToString() != value)
|
|
||||||
{
|
|
||||||
_model.Haltungslaenge = decimal.Parse(value);
|
|
||||||
OnPropertyChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public ICommand Speichern { get; set; }
|
|
||||||
|
|
||||||
public HaltungEditViewModel(IHaltungDataService kanalDataService,
|
|
||||||
ISchachtService schachtService,
|
|
||||||
IActualState actualState)
|
|
||||||
{
|
|
||||||
_actualState = actualState;
|
|
||||||
_kanalDataService = kanalDataService;
|
|
||||||
_schachtService = schachtService;
|
|
||||||
_model = new Kanal();
|
|
||||||
Speichern = new HaltungEditSaveCommand(this, kanalDataService, schachtService);
|
|
||||||
|
|
||||||
LoadModel();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private async void LoadModel()
|
|
||||||
{
|
|
||||||
_model = await _kanalDataService.Get(_actualState.HaltungID);
|
|
||||||
UntereSchacht = _model.EndSchacht.Objektbezeichnung;
|
|
||||||
ObereSchacht = _model.StartSchacht.Objektbezeichnung;
|
|
||||||
OnPropertyChanged(nameof(ObereSchacht));
|
|
||||||
OnPropertyChanged(nameof(UntereSchacht));
|
|
||||||
OnPropertyChanged(nameof(Haltungslaenge));
|
|
||||||
OnPropertyChanged(nameof(Haltungsbezeichnung));
|
|
||||||
OnPropertyChanged(nameof(Material));
|
|
||||||
OnPropertyChanged(nameof(Durchmesser));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,117 +0,0 @@
|
|||||||
using SewerStammGen.WPF.Interface.Navigator;
|
|
||||||
using SewerStammGen.WPF.ViewModel.State;
|
|
||||||
using Shared.Contracts;
|
|
||||||
using Shared.Domain;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Security.RightsManagement;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Input;
|
|
||||||
|
|
||||||
namespace SewerStammGen.WPF.ViewModel
|
|
||||||
{
|
|
||||||
internal class ProjektEditViewModel : BaseViewModel
|
|
||||||
{
|
|
||||||
private Projekt _model;
|
|
||||||
private int ProjektID;
|
|
||||||
private readonly IDataService<Projekt> _dataService;
|
|
||||||
private readonly IRenavigator _renavigator;
|
|
||||||
|
|
||||||
public ICommand Speichern { get; set; }
|
|
||||||
public string ProjektName
|
|
||||||
{
|
|
||||||
get => _model.Projektname;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if(_model.Projektname != value)
|
|
||||||
{
|
|
||||||
_model.Projektname = value;
|
|
||||||
OnPropertyChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public string Erstelldatum
|
|
||||||
{
|
|
||||||
get => _model.Erstelldatum;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (_model.Erstelldatum != value)
|
|
||||||
{
|
|
||||||
_model.Erstelldatum = value;
|
|
||||||
OnPropertyChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public string Strasse
|
|
||||||
{
|
|
||||||
get => _model.Strasse;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (_model.Strasse != value)
|
|
||||||
{
|
|
||||||
_model.Strasse = value;
|
|
||||||
OnPropertyChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public string Ort
|
|
||||||
{
|
|
||||||
get => _model.Ort;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (_model.Ort != value)
|
|
||||||
{
|
|
||||||
_model.Ort = value;
|
|
||||||
OnPropertyChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public ProjektEditViewModel(IDataService<Projekt> dataService, IRenavigator renavigator, IActualState actualState)
|
|
||||||
{
|
|
||||||
_dataService = dataService;
|
|
||||||
_renavigator = renavigator;
|
|
||||||
|
|
||||||
ProjektID = actualState.ProjektID;
|
|
||||||
|
|
||||||
_model = new Projekt();
|
|
||||||
Speichern = new RelayCommand((x) => this.SaveProject());
|
|
||||||
|
|
||||||
LoadProjekt();
|
|
||||||
}
|
|
||||||
|
|
||||||
private async void LoadProjekt()
|
|
||||||
{
|
|
||||||
|
|
||||||
_model = await _dataService.Get(ProjektID);
|
|
||||||
if(_model == null)
|
|
||||||
{
|
|
||||||
_model = new Projekt()
|
|
||||||
{
|
|
||||||
Auftraggeber = new Auftraggeber(),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
OnPropertyChanged(nameof(ProjektName));
|
|
||||||
OnPropertyChanged(nameof(Erstelldatum));
|
|
||||||
OnPropertyChanged(nameof(Strasse));
|
|
||||||
OnPropertyChanged(nameof(Ort));
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SaveProject()
|
|
||||||
{
|
|
||||||
if (_model.Id == 0) // Handelt sich um ein neuen Eintrag
|
|
||||||
{
|
|
||||||
_dataService.Create(_model);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_dataService.Update(_model.Id, _model);
|
|
||||||
}
|
|
||||||
_renavigator.Renavigate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,126 +0,0 @@
|
|||||||
using SewerStammGen.WPF.ViewModel.State;
|
|
||||||
using Shared.Contracts;
|
|
||||||
using Shared.Domain;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Input;
|
|
||||||
|
|
||||||
namespace SewerStammGen.WPF.ViewModel
|
|
||||||
{
|
|
||||||
public class ManholeEditViewModel : BaseViewModel
|
|
||||||
{
|
|
||||||
private readonly IActualState _actualState;
|
|
||||||
private readonly IDataService<Schacht> _schachtDataService;
|
|
||||||
|
|
||||||
private Schacht _model;
|
|
||||||
|
|
||||||
public ICommand Speichern { get; set; }
|
|
||||||
|
|
||||||
public string Objektbezeichnung
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _model.Objektbezeichnung;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if(_model.Objektbezeichnung != value)
|
|
||||||
{
|
|
||||||
_model.Objektbezeichnung = value;
|
|
||||||
OnPropertyChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public decimal RechtsWert
|
|
||||||
{
|
|
||||||
get => _model.RechtsWert;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if(_model.RechtsWert != value)
|
|
||||||
{
|
|
||||||
_model.RechtsWert = value;
|
|
||||||
OnPropertyChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public decimal HochWert
|
|
||||||
{
|
|
||||||
get => _model.HochWert; set
|
|
||||||
{
|
|
||||||
if (_model.HochWert != value)
|
|
||||||
{
|
|
||||||
_model.HochWert = value;
|
|
||||||
OnPropertyChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public decimal DeckelHoehe
|
|
||||||
{
|
|
||||||
get => _model.DeckelHoehe;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (_model.DeckelHoehe != value)
|
|
||||||
{
|
|
||||||
_model.DeckelHoehe = value;
|
|
||||||
OnPropertyChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public decimal SohlHoehe
|
|
||||||
{
|
|
||||||
get => _model.SohlHoehe;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (_model.SohlHoehe != value)
|
|
||||||
{
|
|
||||||
_model.SohlHoehe = value;
|
|
||||||
OnPropertyChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public EEntwaeserung Entwaeserung
|
|
||||||
{
|
|
||||||
get => _model.Entwaesserung;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (_model.Entwaesserung != value)
|
|
||||||
{
|
|
||||||
_model.Entwaesserung = value;
|
|
||||||
OnPropertyChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public ManholeEditViewModel(IDataService<Schacht> schachtDataService,IActualState actualState)
|
|
||||||
{
|
|
||||||
_actualState = actualState;
|
|
||||||
_schachtDataService = schachtDataService;
|
|
||||||
_model = new Schacht();
|
|
||||||
|
|
||||||
Speichern = new RelayCommand((x) => SaveSchacht());
|
|
||||||
|
|
||||||
LoadModel();
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SaveSchacht()
|
|
||||||
{
|
|
||||||
_schachtDataService.Update(_model.Id, _model);
|
|
||||||
}
|
|
||||||
|
|
||||||
private async void LoadModel()
|
|
||||||
{
|
|
||||||
_model = await _schachtDataService.Get(_actualState.SchachtID);
|
|
||||||
OnPropertyChanged(nameof(Entwaeserung));
|
|
||||||
OnPropertyChanged(nameof(Objektbezeichnung));
|
|
||||||
OnPropertyChanged(nameof(HochWert));
|
|
||||||
OnPropertyChanged(nameof(RechtsWert));
|
|
||||||
OnPropertyChanged(nameof(DeckelHoehe));
|
|
||||||
OnPropertyChanged(nameof(SohlHoehe));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
<UserControl x:Class="SewerStammGen.WPF.Views.HaltungListView"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:local="clr-namespace:SewerStammGen.WPF.Views"
|
|
||||||
mc:Ignorable="d"
|
|
||||||
d:DesignHeight="450" d:DesignWidth="800">
|
|
||||||
<Grid>
|
|
||||||
<StackPanel>
|
|
||||||
<DataGrid ItemsSource="{Binding Haltungen}" SelectedItem="{Binding SelectedHaltung}" IsReadOnly="False">
|
|
||||||
|
|
||||||
</DataGrid>
|
|
||||||
<Button Content="Hinzufügen" Command="{Binding AddCommand}" />
|
|
||||||
<Button Content="Editieren" Command="{Binding EditCommand}" />
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
</UserControl>
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
<UserControl x:Class="SewerStammGen.WPF.Views.ProjektEditView"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:local="clr-namespace:SewerStammGen.WPF.Views"
|
|
||||||
mc:Ignorable="d"
|
|
||||||
d:DesignHeight="450" d:DesignWidth="800">
|
|
||||||
<Grid>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition />
|
|
||||||
<ColumnDefinition />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="auto" />
|
|
||||||
<RowDefinition Height="auto" />
|
|
||||||
<RowDefinition Height="auto"/>
|
|
||||||
<RowDefinition Height="auto"/>
|
|
||||||
<RowDefinition Height="auto"/>
|
|
||||||
<RowDefinition />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<Label Grid.Column="0" Grid.Row="0" Content="Projektname" />
|
|
||||||
<Label Grid.Column="0" Grid.Row="1" Content="Erstelldatum" />
|
|
||||||
<Label Grid.Column="0" Grid.Row="2" Content="Strasse" />
|
|
||||||
<Label Grid.Column="0" Grid.Row="3" Content="Ort" />
|
|
||||||
|
|
||||||
<TextBox Grid.Column="1" Grid.Row="0" Text="{Binding ProjektName}" />
|
|
||||||
<TextBox Grid.Column="1" Grid.Row="1" Text="{Binding Erstelldatum}" />
|
|
||||||
<TextBox Grid.Column="1" Grid.Row="2" Text="{Binding Strasse}" />
|
|
||||||
<TextBox Grid.Column="1" Grid.Row="3" Text="{Binding Ort}" />
|
|
||||||
|
|
||||||
<Button Grid.ColumnSpan="2" Grid.Row="4" Content="Speichern" Command="{Binding Speichern}" />
|
|
||||||
</Grid>
|
|
||||||
</UserControl>
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
<UserControl x:Class="SewerStammGen.WPF.Views.SchachtEditView"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:local="clr-namespace:SewerStammGen.WPF.Views"
|
|
||||||
mc:Ignorable="d"
|
|
||||||
d:DesignHeight="450" d:DesignWidth="800">
|
|
||||||
<Grid>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="auto" />
|
|
||||||
<ColumnDefinition Width="520" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="auto" />
|
|
||||||
<RowDefinition Height="auto" />
|
|
||||||
<RowDefinition Height="auto" />
|
|
||||||
<RowDefinition Height="auto" />
|
|
||||||
<RowDefinition Height="auto" />
|
|
||||||
<RowDefinition Height="auto" />
|
|
||||||
<RowDefinition />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<Label Grid.Column="0" Grid.Row="0" Content="Bezeichnung" />
|
|
||||||
<Label Grid.Column="0" Grid.Row="1" Content="Rechtswert" />
|
|
||||||
<Label Grid.Column="0" Grid.Row="2" Content="Hochwert" />
|
|
||||||
<Label Grid.Column="0" Grid.Row="3" Content="Sohlhöhe" />
|
|
||||||
<Label Grid.Column="0" Grid.Row="4" Content="Deckelhöhe" />
|
|
||||||
<Label Grid.Column="0" Grid.Row="5" Content="Entwässerungsart" />
|
|
||||||
|
|
||||||
<TextBox Margin="2" Grid.Column="1" Grid.Row="0" Text="{Binding Objektbezeichnung}" />
|
|
||||||
<TextBox Margin="2" Grid.Column="1" Grid.Row="1" Text="{Binding RechtsWert}" />
|
|
||||||
<TextBox Margin="2" Grid.Column="1" Grid.Row="2" Text="{Binding HochWert}" />
|
|
||||||
<TextBox Margin="2" Grid.Column="1" Grid.Row="3" Text="{Binding SohlHoehe}" />
|
|
||||||
<TextBox Margin="2" Grid.Column="1" Grid.Row="4" Text="{Binding DeckelHoehe}" />
|
|
||||||
<DockPanel Grid.Column="1" Grid.Row="5">
|
|
||||||
<RadioButton Style="{StaticResource ToggleButtonList}" Content="Regenwasser" />
|
|
||||||
<RadioButton Style="{StaticResource ToggleButtonList}" Content="Schmutzwasser" />
|
|
||||||
<RadioButton Style="{StaticResource ToggleButtonList}" Content="Mischwasser" />
|
|
||||||
</DockPanel>
|
|
||||||
|
|
||||||
|
|
||||||
<StackPanel Grid.ColumnSpan="2" Grid.Row="6">
|
|
||||||
<Button Content="Speichern" Command="{Binding Speichern}" />
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
</UserControl>
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
<UserControl x:Class="SewerStammGen.WPF.Views.SchachtListView"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:local="clr-namespace:SewerStammGen.WPF.Views"
|
|
||||||
mc:Ignorable="d"
|
|
||||||
d:DesignHeight="450" d:DesignWidth="800">
|
|
||||||
<Grid>
|
|
||||||
<StackPanel>
|
|
||||||
<DataGrid ItemsSource="{Binding Schaechte}" AutoGenerateColumns="False" IsReadOnly="True" SelectionMode="Single" SelectedItem="{Binding SelectedSchacht}">
|
|
||||||
<DataGrid.Columns>
|
|
||||||
<DataGridTextColumn Header="Schachtnummer" Binding="{Binding Objektbezeichnung}" />
|
|
||||||
<DataGridTextColumn Header="Rechtswert" Binding="{Binding RechtsWert}" />
|
|
||||||
<DataGridTextColumn Header="Hochwert" Binding="{Binding HochWert}" />
|
|
||||||
<DataGridTextColumn Header="Sohlhöhe" Binding="{Binding SohlHoehe}" />
|
|
||||||
<DataGridTextColumn Header="Deckelhöhe" Binding="{Binding DeckelHoehe}" />
|
|
||||||
<DataGridTextColumn Header="Entwässerung" Binding="{Binding Entwaesserung}" />
|
|
||||||
</DataGrid.Columns>
|
|
||||||
</DataGrid>
|
|
||||||
<Button Content="Schacht hinzufügen" Command="{Binding AddSchachtCommand}" />
|
|
||||||
<Button Content="Schacht Editieren" Command="{Binding EditSchachtCommand}" />
|
|
||||||
<Button Content="Schacht Löschen" Command="{Binding DeleteSchachtCommand}" />
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
</UserControl>
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
<UserControl x:Class="SewerStammGen.WPF.Views.UCNormXML"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:local="clr-namespace:SewerStammGen.WPF.Views"
|
|
||||||
mc:Ignorable="d"
|
|
||||||
d:DesignHeight="450" d:DesignWidth="800">
|
|
||||||
<Grid>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition />
|
|
||||||
<RowDefinition />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<StackPanel Grid.Row="0">
|
|
||||||
<RadioButton GroupName="Norm">DIN - EN 13508 - 2: 2003 / Ohne nationale Festlegung</RadioButton>
|
|
||||||
<RadioButton GroupName="Norm">DIN - EN 13508 - 2: 2003 / Nationale Festlegung DWA M 149-2</RadioButton>
|
|
||||||
<RadioButton GroupName="Norm" IsEnabled="False">DIN - EN 13508 - 2: 2003 / andere nationale Festlegung (Bemerkung erforderlich)</RadioButton>
|
|
||||||
<RadioButton GroupName="Norm" IsEnabled="False">ISYBAU 2001</RadioButton>
|
|
||||||
<RadioButton GroupName="Norm" IsEnabled="False">ISYBAU 1996</RadioButton>
|
|
||||||
<RadioButton GroupName="Norm" IsEnabled="False">anderes Kodiersystem (Bemerkung erfolrderlich)</RadioButton>
|
|
||||||
<RadioButton GroupName="Norm">DIN - EN 13508 - 2: 2003 / Nationale Festlegung Arbeitshilfen Abwasser</RadioButton>
|
|
||||||
<RadioButton GroupName="Norm">DIN - EN 13508 - 2: 2011 / Ohne nationale Festlegung</RadioButton>
|
|
||||||
<RadioButton GroupName="Norm">DIN - EN 13508 - 2: 2011 / Nationale Festlegung DWA M 149 - 2</RadioButton>
|
|
||||||
<RadioButton GroupName="Norm">DIN - EN 13508 - 2: 2011 / Nationale Festlegung Arbeitshilfen Abwasser</RadioButton>
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<StackPanel Grid.Row="1">
|
|
||||||
<RadioButton GroupName="Regelwerk" IsEnabled="False">Arbeitshilfen Abwasser (ISYBAU 1996/2001)</RadioButton>
|
|
||||||
<RadioButton GroupName="Regelwerk">Arbeitshilfen Abwasser (ISYBAU 2006)</RadioButton>
|
|
||||||
<RadioButton GroupName="Regelwerk" IsEnabled="False">Sonstige Festlegungen</RadioButton>
|
|
||||||
<RadioButton GroupName="Regelwerk" IsEnabled="False">keine Angaben</RadioButton>
|
|
||||||
<RadioButton GroupName="Regelwerk">Arbeitshilfen Abwasser (ISYBAU 2013)</RadioButton>
|
|
||||||
<RadioButton GroupName="Regelwerk">Arbeitshilfen Abwasser (ISYBAU 2017)</RadioButton>
|
|
||||||
</StackPanel>
|
|
||||||
</Grid>
|
|
||||||
</UserControl>
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
|
||||||
<Style x:Key="ToggleButtonList" TargetType="{x:Type ToggleButton}">
|
|
||||||
<Setter Property="FrameworkElement.OverridesDefaultStyle" Value="True"/>
|
|
||||||
<Setter Property="FrameworkElement.FocusVisualStyle" Value="{x:Null}"/>
|
|
||||||
<Setter Property="Width" Value="170" />
|
|
||||||
<Setter Property="Height" Value="70" />
|
|
||||||
<Setter Property="Margin" Value="2" />
|
|
||||||
<Setter Property="Template">
|
|
||||||
<Setter.Value>
|
|
||||||
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
|
||||||
<Grid>
|
|
||||||
<Rectangle Name="rect" Fill="#FF808080" Stretch="Fill"/>
|
|
||||||
<ContentPresenter VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5" RecognizesAccessKey="True" TextBlock.FontFamily="Seggeo" TextBlock.FontSize="16" TextBlock.Foreground="#FFFFFFFF" TextBlock.FontWeight="Light" />
|
|
||||||
</Grid>
|
|
||||||
<ControlTemplate.Triggers>
|
|
||||||
<Trigger Property="UIElement.IsMouseOver" Value="True">
|
|
||||||
<Setter TargetName="rect" Property="Shape.Fill" Value="BlueViolet"/>
|
|
||||||
<Setter Property="Foreground" Value="#FFFFFFFF"/>
|
|
||||||
</Trigger>
|
|
||||||
<Trigger Property="ToggleButton.IsChecked" Value="True">
|
|
||||||
<Setter TargetName="rect" Property="Shape.Fill" Value="BlueViolet" />
|
|
||||||
<Setter Property="Foreground" Value="#FFFFFFFF" />
|
|
||||||
</Trigger>
|
|
||||||
</ControlTemplate.Triggers>
|
|
||||||
</ControlTemplate>
|
|
||||||
</Setter.Value>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
</ResourceDictionary>
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
"ConnectionStrings": {
|
|
||||||
"databaseToUse": "default",
|
|
||||||
"default": "Host = localhost; Database = SewerGen; Username = SewerGen; Password = SewerGen",
|
|
||||||
"sqlite": "Data Source=database.db"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
using Shared.Contracts;
|
|
||||||
using Shared.Domain;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SewerStammGen.Shared.Contracts
|
|
||||||
{
|
|
||||||
public interface ISchachtDataService : IDataService<Schacht>
|
|
||||||
{
|
|
||||||
Task<IEnumerable<Schacht>> GetAll(int projektID);
|
|
||||||
Task<Schacht> GetSchachtByNameAndProjekt(string name, int projektID);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
using Shared.Domain;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SewerStammGen.Shared.Contracts
|
|
||||||
{
|
|
||||||
public interface ISchachtService
|
|
||||||
{
|
|
||||||
Task<Schacht> CreateSchacht(Projekt proj);
|
|
||||||
Task<Schacht> FindSchachtByNameAndProjektID(string name, int projektID);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Shared.Domain
|
|
||||||
{
|
|
||||||
public class Auftraggeber : DBObject
|
|
||||||
{
|
|
||||||
public string? Name { get; set; }
|
|
||||||
public string? Strasse { get; set; }
|
|
||||||
public string? Ort { get; set; }
|
|
||||||
public string? Postleitzahl { get; set; }
|
|
||||||
public string? Ansprechpartner { get; set; }
|
|
||||||
public string? Telefonnummer { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Shared.Domain
|
|
||||||
{
|
|
||||||
public class Kanal : DBObject
|
|
||||||
{
|
|
||||||
public string? Objektbezeichnung { get; set; }
|
|
||||||
public Schacht? StartSchacht { get; set; }
|
|
||||||
public Schacht? EndSchacht { get; set; }
|
|
||||||
public int DN { get; set; }
|
|
||||||
public string? Material { get; set; }
|
|
||||||
public decimal Haltungslaenge { get; set; }
|
|
||||||
public virtual Projekt? Projekt { get; set; }
|
|
||||||
public EEntwaeserung Entwaesserung { get; set; }
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
using Shared.Enum;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Shared.Domain
|
|
||||||
{
|
|
||||||
public class Projekt : DBObject
|
|
||||||
{
|
|
||||||
public string? Projektname { get; set; }
|
|
||||||
public string? Erstelldatum { get; set; }
|
|
||||||
public string? Strasse { get;set; }
|
|
||||||
public string? Ort { get; set; }
|
|
||||||
public Auftraggeber Auftraggeber { get; set; }
|
|
||||||
public EExportType ExportType { get; set; }
|
|
||||||
public EKodierungssystem Kodierungssystem { get; set; }
|
|
||||||
public IList<Kanal> Kanaele { get; set; } = new List<Kanal>();
|
|
||||||
public IList<Schacht> Schaechte { get; set;} = new List<Schacht>();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Shared.Domain
|
|
||||||
{
|
|
||||||
public class Schacht : DBObject
|
|
||||||
{
|
|
||||||
public string? Objektbezeichnung { get; set; }
|
|
||||||
|
|
||||||
[Column(TypeName = "decimal(18,4)")]
|
|
||||||
public decimal RechtsWert { get; set; }
|
|
||||||
|
|
||||||
[Column(TypeName = "decimal(18,4)")]
|
|
||||||
public decimal HochWert { get; set; }
|
|
||||||
|
|
||||||
[Column(TypeName = "decimal(18,4)")]
|
|
||||||
public decimal SohlHoehe { get; set; }
|
|
||||||
|
|
||||||
[Column(TypeName = "decimal(18,4)")]
|
|
||||||
public decimal DeckelHoehe { get; set; }
|
|
||||||
|
|
||||||
public virtual Projekt? Projekt { get; set; }
|
|
||||||
public EEntwaeserung Entwaesserung { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum EEntwaeserung
|
|
||||||
{
|
|
||||||
Regenwasser,
|
|
||||||
Schmutzwasser,
|
|
||||||
Mischwasser
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
using SewerStammGen.Shared.Contracts;
|
|
||||||
using Shared.Contracts;
|
|
||||||
using Shared.Domain;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SewerStammGen.Shared.Services
|
|
||||||
{
|
|
||||||
public class SchachtService : ISchachtService
|
|
||||||
{
|
|
||||||
private readonly IDataService<Projekt> _projectService;
|
|
||||||
private readonly ISchachtDataService _schachtDataService;
|
|
||||||
|
|
||||||
public SchachtService(
|
|
||||||
IDataService<Projekt> projectService,
|
|
||||||
ISchachtDataService schachtDataService
|
|
||||||
)
|
|
||||||
{
|
|
||||||
_projectService = projectService;
|
|
||||||
_schachtDataService = schachtDataService;
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<Schacht> CreateSchacht(Projekt proj)
|
|
||||||
{
|
|
||||||
Schacht schacht = new Schacht() {
|
|
||||||
Projekt = proj
|
|
||||||
};
|
|
||||||
proj.Schaechte.Add(schacht);
|
|
||||||
await _projectService.Update(proj.Id, proj);
|
|
||||||
return schacht;
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<Schacht> FindSchachtByNameAndProjektID(string name, int projektID)
|
|
||||||
{
|
|
||||||
Schacht result = await _schachtDataService.GetSchachtByNameAndProjekt(name, projektID);
|
|
||||||
return result;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,13 +1,15 @@
|
|||||||
<Application x:Class="SewerStammGen.WPF.App"
|
<Application x:Class="StammGenerator.App"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:local="clr-namespace:SewerStammGen"
|
xmlns:local="clr-namespace:StammGenerator"
|
||||||
>
|
>
|
||||||
<Application.Resources>
|
<Application.Resources>
|
||||||
|
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<ResourceDictionary Source="./Views/styles/my_controls.xaml" />
|
<ResourceDictionary Source="./Views/styles/my_controls.xaml" />
|
||||||
</ResourceDictionary.MergedDictionaries>
|
</ResourceDictionary.MergedDictionaries>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|
||||||
</Application.Resources>
|
</Application.Resources>
|
||||||
</Application>
|
</Application>
|
||||||
@@ -1,9 +1,7 @@
|
|||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
|
||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
using SewerStammGen.EntityFramework;
|
using StammGenerator.HostBuilders;
|
||||||
using SewerStammGen.HostBuilders;
|
using StammGenerator.ViewModel;
|
||||||
using SewerStammGen.WPF.ViewModel;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Configuration;
|
using System.Configuration;
|
||||||
@@ -11,8 +9,12 @@ using System.Data;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
using CodeMeter;
|
||||||
|
using SewerStammGen.Shared;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Windows.Threading;
|
||||||
|
|
||||||
namespace SewerStammGen.WPF
|
namespace StammGenerator
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interaction logic for App.xaml
|
/// Interaction logic for App.xaml
|
||||||
@@ -22,8 +24,28 @@ namespace SewerStammGen.WPF
|
|||||||
private readonly IHost _host;
|
private readonly IHost _host;
|
||||||
public App()
|
public App()
|
||||||
{
|
{
|
||||||
|
new Mutex(initiallyOwned: true, "Stammdatengenerator", out bool result);
|
||||||
|
if(!result)
|
||||||
|
{
|
||||||
|
MessageBox.Show("Bitte nur 1 Instanz der Software Starten!","Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
|
Environment.Exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
using (WWRuntime wWRuntime = new WWRuntime(21))
|
||||||
|
{
|
||||||
|
if(wWRuntime.CheckDongleVorhanden())
|
||||||
|
{
|
||||||
|
wWRuntime.CleanDongle();
|
||||||
_host = CreateHostBuilder().Build();
|
_host = CreateHostBuilder().Build();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox.Show("Kein Dongle gefunden");
|
||||||
|
Environment.Exit(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
static IHostBuilder CreateHostBuilder(string[]? args = null)
|
static IHostBuilder CreateHostBuilder(string[]? args = null)
|
||||||
{
|
{
|
||||||
@@ -31,23 +53,17 @@ namespace SewerStammGen.WPF
|
|||||||
.AddConfiguration()
|
.AddConfiguration()
|
||||||
.AddServices()
|
.AddServices()
|
||||||
.AddViewModels()
|
.AddViewModels()
|
||||||
.AddStores()
|
.AddStores();
|
||||||
.AddDBContext();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnStartup(StartupEventArgs e)
|
protected override void OnStartup(StartupEventArgs e)
|
||||||
{
|
{
|
||||||
|
if (_host == null) return;
|
||||||
|
|
||||||
Application.Current.DispatcherUnhandledException += Current_DispatcherUnhandledException;
|
Application.Current.DispatcherUnhandledException += Current_DispatcherUnhandledException;
|
||||||
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
|
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
|
||||||
|
|
||||||
_host.Start();
|
_host.Start();
|
||||||
|
|
||||||
SewerStammGenDbContextFactory contextFactory = _host.Services.GetRequiredService<SewerStammGenDbContextFactory>();
|
|
||||||
using(SewerStammGenDbContext context = contextFactory.CreateDbContext())
|
|
||||||
{
|
|
||||||
context.Database.Migrate();
|
|
||||||
}
|
|
||||||
|
|
||||||
MainWindow? window = new MainWindow() { DataContext = _host.Services.GetRequiredService<MainWindowViewModel>() };
|
MainWindow? window = new MainWindow() { DataContext = _host.Services.GetRequiredService<MainWindowViewModel>() };
|
||||||
window.Show();
|
window.Show();
|
||||||
|
|
||||||
@@ -59,7 +75,7 @@ namespace SewerStammGen.WPF
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
Exception ex = (Exception)e.ExceptionObject;
|
Exception ex = (Exception)e.ExceptionObject;
|
||||||
string text = "An application error occured. Plrease contact the Administrator with the following information:\n\n";
|
string text = "Ein Software fehler ist Aufgetreten. Bitte kontaktiere uns mit folgende Information:\n\n";
|
||||||
MessageBox.Show(text + " " + ex.Message + "\n\n" + ex.StackTrace);
|
MessageBox.Show(text + " " + ex.Message + "\n\n" + ex.StackTrace);
|
||||||
}
|
}
|
||||||
catch (Exception ex2)
|
catch (Exception ex2)
|
||||||
@@ -68,7 +84,7 @@ namespace SewerStammGen.WPF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Current_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
|
private void Current_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
@@ -5,7 +5,7 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
namespace SewerStammGen.WPF.Commands
|
namespace StammGenerator.Commands
|
||||||
{
|
{
|
||||||
internal abstract class AsyncCommandBase : ICommand
|
internal abstract class AsyncCommandBase : ICommand
|
||||||
{
|
{
|
||||||
17
StammGenerator/Commands/AuftraggeberAddCommand.cs
Normal file
17
StammGenerator/Commands/AuftraggeberAddCommand.cs
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
using StammGenerator.Interface;
|
||||||
|
using StammGenerator.ViewModel;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StammGenerator.Commands
|
||||||
|
{
|
||||||
|
internal class AuftraggeberAddCommand: AsyncCommandBase
|
||||||
|
{
|
||||||
|
private readonly IActualState actualState;
|
||||||
|
private readonly IRenavigator renavigator;
|
||||||
|
|
||||||
|
public override Task ExecuteAsync(object? parameter)
|
||||||
|
{
|
||||||
|
throw new System.NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
17
StammGenerator/Commands/AuftraggeberEditCommand.cs
Normal file
17
StammGenerator/Commands/AuftraggeberEditCommand.cs
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
using StammGenerator.Interface;
|
||||||
|
using StammGenerator.ViewModel;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StammGenerator.Commands
|
||||||
|
{
|
||||||
|
internal class AuftraggeberEditCommand : AsyncCommandBase
|
||||||
|
{
|
||||||
|
private readonly IActualState actualState;
|
||||||
|
private readonly IRenavigator renavigator;
|
||||||
|
|
||||||
|
public override Task ExecuteAsync(object? parameter)
|
||||||
|
{
|
||||||
|
throw new System.NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
30
StammGenerator/Commands/HaltungAddCommand.cs
Normal file
30
StammGenerator/Commands/HaltungAddCommand.cs
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
using SewerStammGen.Shared.Domain;
|
||||||
|
using StammGenerator.Interface;
|
||||||
|
using StammGenerator.ViewModel;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StammGenerator.Commands
|
||||||
|
{
|
||||||
|
internal class HaltungAddCommand : AsyncCommandBase
|
||||||
|
{
|
||||||
|
private readonly IActualState actualState;
|
||||||
|
private readonly IRenavigator renavigator;
|
||||||
|
|
||||||
|
public HaltungAddCommand(IActualState actualState, IRenavigator renavigator)
|
||||||
|
{
|
||||||
|
this.actualState = actualState;
|
||||||
|
this.renavigator = renavigator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override async Task ExecuteAsync(object? parameter)
|
||||||
|
{
|
||||||
|
Kanal haltung = new Kanal()
|
||||||
|
{
|
||||||
|
Id = -1,
|
||||||
|
Projekt = new Projekt() { Id = actualState.ProjektID },
|
||||||
|
};
|
||||||
|
actualState.SetHaltung(haltung);
|
||||||
|
renavigator.Renavigate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,26 +1,21 @@
|
|||||||
using SewerStammGen.Shared.Contracts;
|
using StammGenerator.Commands;
|
||||||
using SewerStammGen.WPF.Interface.Navigator;
|
using StammGenerator.Interface;
|
||||||
using SewerStammGen.WPF.ViewModel;
|
using StammGenerator.ViewModel;
|
||||||
using SewerStammGen.WPF.ViewModel.State;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace SewerStammGen.WPF.Commands
|
namespace StammGenerator.Commands
|
||||||
{
|
{
|
||||||
internal class HaltungEditCommand : AsyncCommandBase
|
internal class HaltungEditCommand : AsyncCommandBase
|
||||||
{
|
{
|
||||||
private IHaltungDataService haltungDataService;
|
|
||||||
private IActualState actualState;
|
private IActualState actualState;
|
||||||
private IRenavigator renavigator;
|
private IRenavigator renavigator;
|
||||||
private HaltungListViewModel haltungListViewModel;
|
private HaltungListViewModel haltungListViewModel;
|
||||||
|
|
||||||
|
|
||||||
public HaltungEditCommand(IHaltungDataService haltungDataService, IActualState actualState, IRenavigator renavigator, HaltungListViewModel haltungListViewModel)
|
public HaltungEditCommand(IActualState actualState, IRenavigator renavigator, HaltungListViewModel haltungListViewModel)
|
||||||
{
|
{
|
||||||
this.haltungDataService = haltungDataService;
|
|
||||||
this.actualState = actualState;
|
this.actualState = actualState;
|
||||||
this.renavigator = renavigator;
|
this.renavigator = renavigator;
|
||||||
this.haltungListViewModel = haltungListViewModel;
|
this.haltungListViewModel = haltungListViewModel;
|
||||||
38
StammGenerator/Commands/HaltungEditSaveCommand.cs
Normal file
38
StammGenerator/Commands/HaltungEditSaveCommand.cs
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
using SewerStammGen.Shared.Contracts;
|
||||||
|
using SewerStammGen.Shared.Domain;
|
||||||
|
using StammGenerator.Commands;
|
||||||
|
using StammGenerator.Interface;
|
||||||
|
using StammGenerator.ViewModel;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StammGenerator.Commands
|
||||||
|
{
|
||||||
|
internal class HaltungEditSaveCommand : AsyncCommandBase
|
||||||
|
{
|
||||||
|
private readonly IHaltungDataService _haltungDataService;
|
||||||
|
private readonly IRenavigator _renavigator;
|
||||||
|
private readonly Kanal _model;
|
||||||
|
|
||||||
|
public HaltungEditSaveCommand(IHaltungDataService haltungDataService,IRenavigator renavigator,HaltungEditViewModel haltungEditViewModel)
|
||||||
|
{
|
||||||
|
|
||||||
|
this._haltungDataService = haltungDataService;
|
||||||
|
this._renavigator = renavigator;
|
||||||
|
this._model = haltungEditViewModel.Model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override async Task ExecuteAsync(object? parameter)
|
||||||
|
{
|
||||||
|
if(_model.Id == -1) // Neu anlegen
|
||||||
|
{
|
||||||
|
await _haltungDataService.Create(_model);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
await _haltungDataService.Update(_model);
|
||||||
|
}
|
||||||
|
|
||||||
|
_renavigator.Renavigate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
61
StammGenerator/Commands/ProjectExportCommand.cs
Normal file
61
StammGenerator/Commands/ProjectExportCommand.cs
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
using SewerStammGen.Shared;
|
||||||
|
using SewerStammGen.Shared.Contracts;
|
||||||
|
using SewerStammGen.Shared.Domain;
|
||||||
|
using Shared.Contracts;
|
||||||
|
using StammGenerator.Commands;
|
||||||
|
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;
|
||||||
|
using WWTech_KanalSchnittstelle.Exporter;
|
||||||
|
|
||||||
|
namespace StammGenerator.Commands
|
||||||
|
{
|
||||||
|
internal class ProjectExportCommand : AsyncCommandBase
|
||||||
|
{
|
||||||
|
private readonly ProjektListViewModel _projektListViewModel;
|
||||||
|
//private Projekt _selectedProjekt;
|
||||||
|
private readonly IHaltungDataService _haltungDataService;
|
||||||
|
private readonly ISchachtDataService _schachtDataService;
|
||||||
|
|
||||||
|
|
||||||
|
public ProjectExportCommand(ProjektListViewModel projektListViewModel, IHaltungDataService haltungDataService, ISchachtDataService schachtDataService)
|
||||||
|
{
|
||||||
|
_projektListViewModel = projektListViewModel;
|
||||||
|
_haltungDataService = haltungDataService;
|
||||||
|
_schachtDataService = schachtDataService;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override async Task ExecuteAsync(object? parameter)
|
||||||
|
{
|
||||||
|
if (_projektListViewModel.SelectedProjekt == null) return;
|
||||||
|
IWWLog wwLog = null ;
|
||||||
|
Projekt _selectedProjekt = _projektListViewModel.SelectedProjekt;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
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("./export/"+_selectedProjekt.Id.ToString(), _selectedProjekt.Kodierungssystem, haltungen.ToList(), schaechte.ToList(), wwLog);
|
||||||
|
}
|
||||||
|
catch(NotImplementedException)
|
||||||
|
{
|
||||||
|
MessageBoxResult result = MessageBox.Show(string.Format("Schnittstelle Export format: {0} ist nicht Implementiert", _selectedProjekt.ExportType), "Fehlende Implementation", MessageBoxButton.OK, MessageBoxImage.Exclamation);
|
||||||
|
}
|
||||||
|
catch(DongleNotFoundException)
|
||||||
|
{
|
||||||
|
MessageBoxResult result = MessageBox.Show("Dongle nicht vorhanden");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,22 +1,20 @@
|
|||||||
using SewerStammGen.WPF.Interface.Navigator;
|
using SewerStammGen.Shared.Contracts;
|
||||||
using SewerStammGen.WPF.ViewModel.State;
|
using SewerStammGen.Shared.Domain;
|
||||||
using Shared.Contracts;
|
using StammGenerator.Commands;
|
||||||
using Shared.Domain;
|
using StammGenerator.Interface;
|
||||||
using System;
|
using StammGenerator.ViewModel;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace SewerStammGen.WPF.Commands
|
namespace StammGenerator.Commands
|
||||||
{
|
{
|
||||||
internal class ProjektAddCommand : AsyncCommandBase
|
internal class ProjektAddCommand : AsyncCommandBase
|
||||||
{
|
{
|
||||||
private readonly IActualState _actualState;
|
private readonly IActualState _actualState;
|
||||||
private readonly IDataService<Projekt> _generic;
|
private readonly IProjektDataService _generic;
|
||||||
private readonly IRenavigator _renavigator;
|
private readonly IRenavigator _renavigator;
|
||||||
|
|
||||||
public ProjektAddCommand(IDataService<Projekt> generic, IActualState actualState, IRenavigator renavigator)
|
public ProjektAddCommand(IProjektDataService generic, IActualState actualState, IRenavigator renavigator)
|
||||||
{
|
{
|
||||||
_renavigator = renavigator;
|
_renavigator = renavigator;
|
||||||
_generic = generic;
|
_generic = generic;
|
||||||
@@ -35,7 +33,7 @@ namespace SewerStammGen.WPF.Commands
|
|||||||
Schaechte = new List<Schacht>(),
|
Schaechte = new List<Schacht>(),
|
||||||
Kanaele = new List<Kanal>()
|
Kanaele = new List<Kanal>()
|
||||||
};
|
};
|
||||||
//newProjekt = await _generic.Create(newProjekt);
|
newProjekt = await _generic.Create(newProjekt);
|
||||||
_actualState.SetProjekt(newProjekt);
|
_actualState.SetProjekt(newProjekt);
|
||||||
_renavigator.Renavigate();
|
_renavigator.Renavigate();
|
||||||
|
|
||||||
@@ -1,12 +1,11 @@
|
|||||||
using SewerStammGen.WPF.Interface.Navigator;
|
using SewerStammGen.Shared.Domain;
|
||||||
using SewerStammGen.WPF.ViewModel;
|
|
||||||
using SewerStammGen.WPF.ViewModel.State;
|
|
||||||
using Shared.Contracts;
|
using Shared.Contracts;
|
||||||
using Shared.Domain;
|
using StammGenerator.Commands;
|
||||||
using System.Runtime.CompilerServices;
|
using StammGenerator.Interface;
|
||||||
|
using StammGenerator.ViewModel;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace SewerStammGen.WPF.Commands
|
namespace StammGenerator.Commands
|
||||||
{
|
{
|
||||||
internal class ProjektEditCommand : AsyncCommandBase
|
internal class ProjektEditCommand : AsyncCommandBase
|
||||||
{
|
{
|
||||||
@@ -1,10 +1,8 @@
|
|||||||
using SewerStammGen.WPF.ViewModel;
|
using StammGenerator.Commands;
|
||||||
using SewerStammGen.WPF.ViewModel.State;
|
using StammGenerator.ViewModel;
|
||||||
using Shared.Domain;
|
|
||||||
using System;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace SewerStammGen.WPF.Commands
|
namespace StammGenerator.Commands
|
||||||
{
|
{
|
||||||
internal class ProjektSelectCommand : AsyncCommandBase
|
internal class ProjektSelectCommand : AsyncCommandBase
|
||||||
{
|
{
|
||||||
31
StammGenerator/Commands/SchachtAddCommand.cs
Normal file
31
StammGenerator/Commands/SchachtAddCommand.cs
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
using SewerStammGen.Shared.Domain;
|
||||||
|
using StammGenerator.Commands;
|
||||||
|
using StammGenerator.Interface;
|
||||||
|
using StammGenerator.ViewModel;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StammGenerator.Commands
|
||||||
|
{
|
||||||
|
class SchachtAddCommand : AsyncCommandBase
|
||||||
|
{
|
||||||
|
private readonly IActualState actualState;
|
||||||
|
private readonly IRenavigator renavigator;
|
||||||
|
|
||||||
|
|
||||||
|
public SchachtAddCommand(IActualState actualState, IRenavigator renavigator)
|
||||||
|
{
|
||||||
|
this.actualState = actualState;
|
||||||
|
this.renavigator = renavigator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override async Task ExecuteAsync(object? parameter)
|
||||||
|
{
|
||||||
|
Schacht newSchacht = new Schacht()
|
||||||
|
{
|
||||||
|
Projekt = new Projekt() { Id = actualState.ProjektID },
|
||||||
|
};
|
||||||
|
actualState.SetSchacht(newSchacht);
|
||||||
|
renavigator.Renavigate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,14 +1,11 @@
|
|||||||
using SewerStammGen.Shared.Contracts;
|
using SewerStammGen.Shared.Contracts;
|
||||||
using SewerStammGen.WPF.Interface.Navigator;
|
using StammGenerator.Commands;
|
||||||
using SewerStammGen.WPF.ViewModel;
|
using StammGenerator.Interface;
|
||||||
using SewerStammGen.WPF.ViewModel.State;
|
using StammGenerator.ViewModel;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace SewerStammGen.WPF.Commands
|
namespace StammGenerator.Commands
|
||||||
{
|
{
|
||||||
class SchachtDeleteCommand : AsyncCommandBase
|
class SchachtDeleteCommand : AsyncCommandBase
|
||||||
{
|
{
|
||||||
@@ -1,25 +1,19 @@
|
|||||||
using SewerStammGen.Shared.Contracts;
|
using StammGenerator.Commands;
|
||||||
using SewerStammGen.WPF.Interface.Navigator;
|
using StammGenerator.Interface;
|
||||||
using SewerStammGen.WPF.ViewModel;
|
using StammGenerator.ViewModel;
|
||||||
using SewerStammGen.WPF.ViewModel.State;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace SewerStammGen.WPF.Commands
|
namespace StammGenerator.Commands
|
||||||
{
|
{
|
||||||
class SchachtEditCommand : AsyncCommandBase
|
class SchachtEditCommand : AsyncCommandBase
|
||||||
{
|
{
|
||||||
private ISchachtDataService schachtService;
|
|
||||||
private IActualState actualState;
|
private IActualState actualState;
|
||||||
private IRenavigator renavigator;
|
private IRenavigator renavigator;
|
||||||
private ManholeListViewModel manholeListViewModel;
|
private ManholeListViewModel manholeListViewModel;
|
||||||
|
|
||||||
public SchachtEditCommand(ISchachtDataService schachtService, IActualState actualState, IRenavigator renavigator, ManholeListViewModel manholeListViewModel)
|
public SchachtEditCommand(IActualState actualState, IRenavigator renavigator, ManholeListViewModel manholeListViewModel)
|
||||||
{
|
{
|
||||||
this.schachtService = schachtService;
|
|
||||||
this.actualState = actualState;
|
this.actualState = actualState;
|
||||||
this.renavigator = renavigator;
|
this.renavigator = renavigator;
|
||||||
this.manholeListViewModel = manholeListViewModel;
|
this.manholeListViewModel = manholeListViewModel;
|
||||||
@@ -1,13 +1,9 @@
|
|||||||
using SewerStammGen.Enum;
|
using StammGenerator.Commands;
|
||||||
using SewerStammGen.WPF.Interface;
|
using StammGenerator.Enum;
|
||||||
using SewerStammGen.WPF.Interface.Navigator;
|
using StammGenerator.Interface;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace SewerStammGen.WPF.Commands
|
namespace StammGenerator.Commands
|
||||||
{
|
{
|
||||||
internal class UpdateCurrentViewModelCommand : AsyncCommandBase
|
internal class UpdateCurrentViewModelCommand : AsyncCommandBase
|
||||||
{
|
{
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
using System;
|
using SewerStammGen.Shared.Enum;
|
||||||
|
using System;
|
||||||
|
using System.CodeDom;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
@@ -7,7 +9,7 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Data;
|
using System.Windows.Data;
|
||||||
|
|
||||||
namespace SewerStammGen.WPF.Views.Converters
|
namespace StammGenerator.Converters
|
||||||
{
|
{
|
||||||
public class EqualValueToParameterConverter : IValueConverter
|
public class EqualValueToParameterConverter : IValueConverter
|
||||||
{
|
{
|
||||||
@@ -18,6 +20,10 @@ namespace SewerStammGen.WPF.Views.Converters
|
|||||||
|
|
||||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
{
|
{
|
||||||
|
if (targetType == typeof(EEntwaeserung)) return (EEntwaeserung)parameter;
|
||||||
|
if (targetType == typeof(EExportType)) return (EExportType)parameter;
|
||||||
|
if (targetType == typeof(EKodierungssystem)) return (EKodierungssystem)parameter;
|
||||||
|
if (targetType == typeof(ESchachtType)) return (ESchachtType)parameter;
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,12 +4,13 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace SewerStammGen.Enum
|
namespace StammGenerator.Enum
|
||||||
{
|
{
|
||||||
public enum EMainWindowViewType
|
public enum EMainWindowViewType
|
||||||
{
|
{
|
||||||
Home,
|
Home,
|
||||||
ProjectList,
|
ProjectList,
|
||||||
|
AuftraggeberList,
|
||||||
SchachtList,
|
SchachtList,
|
||||||
SchachtEdit,
|
SchachtEdit,
|
||||||
HaltungList,
|
HaltungList,
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user