Compare commits
36 Commits
| 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 |
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";
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
-- Table: public.Auftraggebers
|
|
||||||
|
|
||||||
-- DROP TABLE IF EXISTS public."Auftraggebers";
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS public."Auftraggebers"
|
|
||||||
(
|
|
||||||
"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 ("Id")
|
|
||||||
)
|
|
||||||
|
|
||||||
TABLESPACE pg_default;
|
|
||||||
|
|
||||||
ALTER TABLE IF EXISTS public."Auftraggebers"
|
|
||||||
OWNER to "SewerGen";
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
-- Table: public.Kanaele
|
|
||||||
|
|
||||||
-- DROP TABLE IF EXISTS public."Kanaele";
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS public."Kanaele"
|
|
||||||
(
|
|
||||||
"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",
|
|
||||||
"StartSchachtId" integer,
|
|
||||||
"EndSchachtId" integer,
|
|
||||||
"DN" integer NOT NULL,
|
|
||||||
"Material" text COLLATE pg_catalog."default",
|
|
||||||
"Haltungslaenge" numeric NOT NULL,
|
|
||||||
"Entwaesserung" integer NOT NULL,
|
|
||||||
"ProjektId" integer,
|
|
||||||
CONSTRAINT "PK_Kanaele" PRIMARY KEY ("Id"),
|
|
||||||
CONSTRAINT "FK_Kanaele_Projekte_ProjektId" FOREIGN KEY ("ProjektId")
|
|
||||||
REFERENCES public."Projekte" ("Id") MATCH SIMPLE
|
|
||||||
ON UPDATE NO ACTION
|
|
||||||
ON DELETE NO ACTION,
|
|
||||||
CONSTRAINT "FK_Kanaele_Schaechte_EndSchachtId" FOREIGN KEY ("EndSchachtId")
|
|
||||||
REFERENCES public."Schaechte" ("Id") MATCH SIMPLE
|
|
||||||
ON UPDATE NO ACTION
|
|
||||||
ON DELETE NO ACTION,
|
|
||||||
CONSTRAINT "FK_Kanaele_Schaechte_StartSchachtId" FOREIGN KEY ("StartSchachtId")
|
|
||||||
REFERENCES public."Schaechte" ("Id") MATCH SIMPLE
|
|
||||||
ON UPDATE NO ACTION
|
|
||||||
ON DELETE NO ACTION
|
|
||||||
)
|
|
||||||
|
|
||||||
TABLESPACE pg_default;
|
|
||||||
|
|
||||||
ALTER TABLE IF EXISTS public."Kanaele"
|
|
||||||
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."Kanaele" USING btree
|
|
||||||
("EndSchachtId" 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."Kanaele" USING btree
|
|
||||||
("ProjektId" 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."Kanaele" USING btree
|
|
||||||
("StartSchachtId" ASC NULLS LAST)
|
|
||||||
TABLESPACE pg_default;
|
|
||||||
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;
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
-- Table: public.Projekte
|
|
||||||
|
|
||||||
-- DROP TABLE IF EXISTS public."Projekte";
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS public."Projekte"
|
|
||||||
(
|
|
||||||
"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,
|
|
||||||
"AuftraggeberId" integer NOT NULL DEFAULT 0,
|
|
||||||
CONSTRAINT "PK_Projekte" PRIMARY KEY ("Id"),
|
|
||||||
CONSTRAINT "FK_Projekte_Auftraggebers_AuftraggeberId" FOREIGN KEY ("AuftraggeberId")
|
|
||||||
REFERENCES public."Auftraggebers" ("Id") MATCH SIMPLE
|
|
||||||
ON UPDATE NO ACTION
|
|
||||||
ON DELETE CASCADE
|
|
||||||
)
|
|
||||||
|
|
||||||
TABLESPACE pg_default;
|
|
||||||
|
|
||||||
ALTER TABLE IF EXISTS public."Projekte"
|
|
||||||
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."Projekte" USING btree
|
|
||||||
("AuftraggeberId" 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;
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
-- Table: public.Schaechte
|
|
||||||
|
|
||||||
-- DROP TABLE IF EXISTS public."Schaechte";
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS public."Schaechte"
|
|
||||||
(
|
|
||||||
"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",
|
|
||||||
"RechtsWert" numeric(18,4) NOT NULL,
|
|
||||||
"HochWert" numeric(18,4) NOT NULL,
|
|
||||||
"SohlHoehe" numeric(18,4) NOT NULL,
|
|
||||||
"DeckelHoehe" numeric(18,4) NOT NULL,
|
|
||||||
"Entwaesserung" integer NOT NULL,
|
|
||||||
"ProjektId" integer,
|
|
||||||
CONSTRAINT "PK_Schaechte" PRIMARY KEY ("Id"),
|
|
||||||
CONSTRAINT "FK_Schaechte_Projekte_ProjektId" FOREIGN KEY ("ProjektId")
|
|
||||||
REFERENCES public."Projekte" ("Id") MATCH SIMPLE
|
|
||||||
ON UPDATE NO ACTION
|
|
||||||
ON DELETE NO ACTION
|
|
||||||
)
|
|
||||||
|
|
||||||
TABLESPACE pg_default;
|
|
||||||
|
|
||||||
ALTER TABLE IF EXISTS public."Schaechte"
|
|
||||||
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."Schaechte" USING btree
|
|
||||||
("ProjektId" 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;
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
namespace SewerStammGen.Console
|
|
||||||
{
|
|
||||||
internal class Program
|
|
||||||
{
|
|
||||||
static void Main(string[] args)
|
|
||||||
{
|
|
||||||
Console.WriteLine("Hello, World!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
<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="..\Shared\SewerStammGen.Shared.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
@@ -11,33 +11,42 @@ namespace SewerStammGen.ConsoleApp
|
|||||||
{
|
{
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
IProjektDataService projektService = new ProjektDataService();
|
Test t = new();
|
||||||
|
|
||||||
Projekt neuesProjekt = new Projekt()
|
|
||||||
{
|
|
||||||
Erstelldatum = "test",
|
|
||||||
Projektname = "test",
|
|
||||||
Kodierungssystem = EKodierungssystem.EN13508_2_2011,
|
|
||||||
ExportType = EExportType.XML2006,
|
|
||||||
Ort = "test",
|
|
||||||
Strasse = "test",
|
|
||||||
};
|
|
||||||
|
|
||||||
//test(neuesProjekt, projektService);
|
|
||||||
readtest(projektService);
|
|
||||||
Console.WriteLine("Hello, World!");
|
|
||||||
}
|
|
||||||
|
|
||||||
private static async void readtest(IProjektDataService projektService)
|
|
||||||
{
|
|
||||||
var m = await projektService.GetAll();
|
|
||||||
Debugger.Break();
|
Debugger.Break();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static async void test(Projekt neuesProjekt, IProjektDataService projektService)
|
class Test
|
||||||
|
{
|
||||||
|
char[] zeile = new char[1476];
|
||||||
|
public Test()
|
||||||
{
|
{
|
||||||
var m = await projektService.Create(neuesProjekt);
|
zeile = new char[1476];
|
||||||
Console.WriteLine(m.Id);
|
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++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -10,7 +10,6 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\SewerStammGen.DAL\SewerStammGen.DAL.csproj" />
|
<ProjectReference Include="..\SewerStammGen.DAL\SewerStammGen.DAL.csproj" />
|
||||||
<ProjectReference Include="..\SewerStammGen.Shared\SewerStammGen.Shared.csproj" />
|
<ProjectReference Include="..\SewerStammGen.Shared\SewerStammGen.Shared.csproj" />
|
||||||
<ProjectReference Include="..\Shared\SewerStammGen.Shared.csproj" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using SewerStammGen.Shared.Contracts;
|
|||||||
using SewerStammGen.Shared.Domain;
|
using SewerStammGen.Shared.Domain;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -11,12 +12,12 @@ namespace SewerStammGen.DAL.Services.PostgresqlData
|
|||||||
{
|
{
|
||||||
public class AuftraggeberDataService : PostgresqlDataService, IAuftraggeberDataService
|
public class AuftraggeberDataService : PostgresqlDataService, IAuftraggeberDataService
|
||||||
{
|
{
|
||||||
public AuftraggeberDataService(string connectionstring) : base(connectionstring,"Auftraggebers") { }
|
public AuftraggeberDataService(string connectionstring) : base(connectionstring,"auftraggeber") { }
|
||||||
|
|
||||||
public async Task<Auftraggeber> Create(Auftraggeber entity)
|
public async Task<Auftraggeber> Create(Auftraggeber entity)
|
||||||
{
|
{
|
||||||
string command = "INSERT INTO "+tableName+" (\"Name\", \"Strasse\", \"Ort\", \"Postleitzahl\", \"Ansprechpartner\", \"Telefonnummer\") " +
|
string command = "INSERT INTO "+tableName+" (name, strasse, ort, postleitzahl, ansprechpartner, telefonnummer) " +
|
||||||
"VALUES(@1,@2,@3,@4,@5,@6) RETURNING \"Id\"";
|
"VALUES(@1,@2,@3,@4,@5,@6) RETURNING auftraggeber_id";
|
||||||
|
|
||||||
await using (var cmd = new NpgsqlCommand(command, conn))
|
await using (var cmd = new NpgsqlCommand(command, conn))
|
||||||
{
|
{
|
||||||
@@ -37,7 +38,7 @@ namespace SewerStammGen.DAL.Services.PostgresqlData
|
|||||||
public async Task<Auftraggeber> Get(int id)
|
public async Task<Auftraggeber> Get(int id)
|
||||||
{
|
{
|
||||||
Auftraggeber result = new Auftraggeber();
|
Auftraggeber result = new Auftraggeber();
|
||||||
using (var cmd = new NpgsqlCommand($"SELECT * FROM "+tableName+" WHERE \"Id\" = @1", conn))
|
using (var cmd = new NpgsqlCommand($"SELECT * FROM "+tableName+" WHERE auftraggeber_id = @1", conn))
|
||||||
{
|
{
|
||||||
cmd.Parameters.AddWithValue("1", id);
|
cmd.Parameters.AddWithValue("1", id);
|
||||||
using var reader = await cmd.ExecuteReaderAsync();
|
using var reader = await cmd.ExecuteReaderAsync();
|
||||||
@@ -75,9 +76,22 @@ namespace SewerStammGen.DAL.Services.PostgresqlData
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task<Auftraggeber> Update(Auftraggeber entity)
|
public async Task<Auftraggeber> Update(Auftraggeber entity)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
using Npgsql;
|
using Npgsql;
|
||||||
using SewerStammGen.Shared.Contracts;
|
using SewerStammGen.Shared.Contracts;
|
||||||
using SewerStammGen.Shared.Domain;
|
using SewerStammGen.Shared.Domain;
|
||||||
|
using SewerStammGen.Shared.Enum;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -11,13 +13,29 @@ namespace SewerStammGen.DAL.Services.PostgresqlData
|
|||||||
{
|
{
|
||||||
public class HaltungDataService : PostgresqlDataService, IHaltungDataService
|
public class HaltungDataService : PostgresqlDataService, IHaltungDataService
|
||||||
{
|
{
|
||||||
public HaltungDataService(string connectionstring) : base(connectionstring, "Kanaele")
|
public HaltungDataService(string connectionstring) : base(connectionstring, "haltung")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task<Kanal> Create(Kanal entity)
|
public async Task<Kanal> Create(Kanal entity)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
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)
|
public Task<Kanal> Get(int id)
|
||||||
@@ -36,7 +54,7 @@ namespace SewerStammGen.DAL.Services.PostgresqlData
|
|||||||
ISchachtDataService schachtDataService = new SchachtDataService(connString);
|
ISchachtDataService schachtDataService = new SchachtDataService(connString);
|
||||||
IEnumerable<Schacht> schaechte = await schachtDataService.GetAllByProjekt(projektID);
|
IEnumerable<Schacht> schaechte = await schachtDataService.GetAllByProjekt(projektID);
|
||||||
|
|
||||||
string command = "SELECT * FROM " + tableName + " WHERE \"ProjektId\" = @1";
|
string command = $"SELECT * FROM {tableName} WHERE ref_projekt_id = @1";
|
||||||
using (var cmd = new NpgsqlCommand(command, conn))
|
using (var cmd = new NpgsqlCommand(command, conn))
|
||||||
{
|
{
|
||||||
cmd.Parameters.AddWithValue("1", projektID);
|
cmd.Parameters.AddWithValue("1", projektID);
|
||||||
@@ -46,8 +64,11 @@ namespace SewerStammGen.DAL.Services.PostgresqlData
|
|||||||
{
|
{
|
||||||
Kanal adding = parseHaltung(reader);
|
Kanal adding = parseHaltung(reader);
|
||||||
|
|
||||||
adding.StartSchacht = schaechte.Where(x => x.Id == reader.GetInt32(2)).Last();
|
int startSchachtID = reader.GetInt32(2);
|
||||||
adding.EndSchacht = schaechte.Where(x => x.Id == reader.GetInt32(3)).Last();
|
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);
|
result.Add(adding);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -77,9 +98,25 @@ namespace SewerStammGen.DAL.Services.PostgresqlData
|
|||||||
return await GetAllByProjekt(projekt.Id);
|
return await GetAllByProjekt(projekt.Id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task<Kanal> Update(Kanal entity)
|
public async Task<Kanal> Update(Kanal entity)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
|
||||||
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ namespace SewerStammGen.DAL.Services.PostgresqlData
|
|||||||
dataSource = dataSourceBuilder.Build();
|
dataSource = dataSourceBuilder.Build();
|
||||||
|
|
||||||
conn = dataSource.OpenConnection();
|
conn = dataSource.OpenConnection();
|
||||||
this.tableName = string.Format("public.\"{0}\"", tableName);
|
this.tableName = string.Format("public.{0}", tableName);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,21 +14,29 @@ namespace SewerStammGen.DAL.Services.PostgresqlData
|
|||||||
{
|
{
|
||||||
public class ProjektDataService : PostgresqlDataService, IProjektDataService
|
public class ProjektDataService : PostgresqlDataService, IProjektDataService
|
||||||
{
|
{
|
||||||
public ProjektDataService(string connectionstring) : base(connectionstring,"Projekte")
|
public ProjektDataService(string connectionstring) : base(connectionstring,"projekt")
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<Projekt> Create(Projekt entity)
|
public async Task<Projekt> Create(Projekt entity)
|
||||||
{
|
{
|
||||||
string command = "INSERT INTO "+tableName+" (\"Projektname\", \"Erstelldatum\", \"Strasse\", \"Ort\", \"ExportType\", \"Kodierungssystem\",\"AuftraggeberId\") " +
|
string command = $"INSERT INTO {tableName} (projektname, erstelldatum, strasse, ort, exporttype, kodierungssystem,ref_auftraggeber_id) " +
|
||||||
"VALUES(@1,@2,@3,@4,@5,@6,@7) RETURNING \"Id\"";
|
$"VALUES(@1,@2,@3,@4,@5,@6,@7) RETURNING projekt_id";
|
||||||
|
|
||||||
if (entity.Auftraggeber.Id == 0)
|
if (entity.Auftraggeber.Id == 0)
|
||||||
{
|
{
|
||||||
IAuftraggeberDataService auftraggeberDataService = new AuftraggeberDataService(connString);
|
IAuftraggeberDataService auftraggeberDataService = new AuftraggeberDataService(connString);
|
||||||
var s = await auftraggeberDataService.GetAll();
|
var s = await auftraggeberDataService.GetAll();
|
||||||
entity.Auftraggeber = s.ToList().Last();
|
// 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))
|
await using (var cmd = new NpgsqlCommand(command, conn))
|
||||||
@@ -44,6 +52,7 @@ namespace SewerStammGen.DAL.Services.PostgresqlData
|
|||||||
reader.Read();
|
reader.Read();
|
||||||
entity.Id = reader.GetInt32(0);
|
entity.Id = reader.GetInt32(0);
|
||||||
}
|
}
|
||||||
|
entity.AuftraggeberTemporar = true;
|
||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,7 +61,7 @@ namespace SewerStammGen.DAL.Services.PostgresqlData
|
|||||||
{
|
{
|
||||||
Projekt result = new Projekt();
|
Projekt result = new Projekt();
|
||||||
IAuftraggeberDataService auftraggeberDataService = new AuftraggeberDataService(connString);
|
IAuftraggeberDataService auftraggeberDataService = new AuftraggeberDataService(connString);
|
||||||
using (var cmd = new NpgsqlCommand($"SELECT * FROM "+tableName+" WHERE \"Id\" = @1", conn))
|
using (var cmd = new NpgsqlCommand($"SELECT * FROM {tableName} WHERE projekt_id = @1", conn))
|
||||||
{
|
{
|
||||||
cmd.Parameters.AddWithValue("1", id);
|
cmd.Parameters.AddWithValue("1", id);
|
||||||
using var reader = await cmd.ExecuteReaderAsync();
|
using var reader = await cmd.ExecuteReaderAsync();
|
||||||
@@ -84,7 +93,7 @@ namespace SewerStammGen.DAL.Services.PostgresqlData
|
|||||||
IEnumerable<Auftraggeber> auftraggebers = await auftraggeberDataService.GetAll();
|
IEnumerable<Auftraggeber> auftraggebers = await auftraggeberDataService.GetAll();
|
||||||
|
|
||||||
List<Projekt> result = new List<Projekt>();
|
List<Projekt> result = new List<Projekt>();
|
||||||
using (var cmd = new NpgsqlCommand($"SELECT * FROM " + tableName, conn))
|
using (var cmd = new NpgsqlCommand($"SELECT * FROM {tableName}", conn))
|
||||||
using (var reader = await cmd.ExecuteReaderAsync())
|
using (var reader = await cmd.ExecuteReaderAsync())
|
||||||
{
|
{
|
||||||
while (reader.Read())
|
while (reader.Read())
|
||||||
@@ -99,7 +108,7 @@ namespace SewerStammGen.DAL.Services.PostgresqlData
|
|||||||
|
|
||||||
public async Task<Projekt> Update(Projekt entity)
|
public async Task<Projekt> Update(Projekt entity)
|
||||||
{
|
{
|
||||||
string command = "UPDATE "+tableName+" SET \"Projektname\"=@1, \"Erstelldatum\"=@2, \"Strasse\"=@3, \"Ort\"=@4, \"ExportType\"=@5, \"Kodierungssystem\"=@6 WHERE \"Id\" = @8";
|
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))
|
using (var cmd = new NpgsqlCommand(command, conn))
|
||||||
{
|
{
|
||||||
cmd.Parameters.AddWithValue("1", entity.Projektname);
|
cmd.Parameters.AddWithValue("1", entity.Projektname);
|
||||||
@@ -108,6 +117,7 @@ namespace SewerStammGen.DAL.Services.PostgresqlData
|
|||||||
cmd.Parameters.AddWithValue("4", entity.Ort);
|
cmd.Parameters.AddWithValue("4", entity.Ort);
|
||||||
cmd.Parameters.AddWithValue("5", (int)entity.ExportType);
|
cmd.Parameters.AddWithValue("5", (int)entity.ExportType);
|
||||||
cmd.Parameters.AddWithValue("6", (int)entity.Kodierungssystem);
|
cmd.Parameters.AddWithValue("6", (int)entity.Kodierungssystem);
|
||||||
|
cmd.Parameters.AddWithValue("7", entity.Auftraggeber.Id);
|
||||||
cmd.Parameters.AddWithValue("8", entity.Id);
|
cmd.Parameters.AddWithValue("8", entity.Id);
|
||||||
int res = await cmd.ExecuteNonQueryAsync();
|
int res = await cmd.ExecuteNonQueryAsync();
|
||||||
Trace.WriteLine(res);
|
Trace.WriteLine(res);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using Npgsql;
|
using Npgsql;
|
||||||
using SewerStammGen.Shared.Contracts;
|
using SewerStammGen.Shared.Contracts;
|
||||||
using SewerStammGen.Shared.Domain;
|
using SewerStammGen.Shared.Domain;
|
||||||
|
using SewerStammGen.Shared.Enum;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -11,23 +12,30 @@ namespace SewerStammGen.DAL.Services.PostgresqlData
|
|||||||
{
|
{
|
||||||
public class SchachtDataService : PostgresqlDataService, ISchachtDataService
|
public class SchachtDataService : PostgresqlDataService, ISchachtDataService
|
||||||
{
|
{
|
||||||
public SchachtDataService(string connectionstring) : base(connectionstring,"Schaechte")
|
public SchachtDataService(string connectionstring) : base(connectionstring,"schacht")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<Schacht> Create(Schacht entity)
|
public async Task<Schacht> Create(Schacht entity)
|
||||||
{
|
{
|
||||||
string command = "INSERT INTO " + tableName + " (\"Objektbezeichnung\",\"RechtsWert\",\"HochWert\",\"SohlHoehe\",\"DeckelHoehe\",\"Entwaesserung\",\"ProjektId\") VALUES " +
|
string command = "INSERT INTO " + tableName + " (" +
|
||||||
"(@1,@2,@3,@4,@5,@6,@7) RETURNING \"Id\"";
|
"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))
|
using(var cmd = new NpgsqlCommand(command,conn))
|
||||||
{
|
{
|
||||||
cmd.Parameters.AddWithValue("1", entity.Objektbezeichnung);
|
cmd.Parameters.AddWithValue("1", entity.Objektbezeichnung);
|
||||||
cmd.Parameters.AddWithValue("2", entity.RechtsWert);
|
cmd.Parameters.AddWithValue("2", entity.DeckelRechtsWert);
|
||||||
cmd.Parameters.AddWithValue("3", entity.HochWert);
|
cmd.Parameters.AddWithValue("3", entity.DeckelHochWert);
|
||||||
cmd.Parameters.AddWithValue("4", entity.SohlHoehe);
|
cmd.Parameters.AddWithValue("4", entity.SohlRechtsWert);
|
||||||
cmd.Parameters.AddWithValue("5", entity.DeckelHoehe);
|
cmd.Parameters.AddWithValue("5", entity.SohlHochWert);
|
||||||
cmd.Parameters.AddWithValue("6", (int)entity.Entwaesserung);
|
cmd.Parameters.AddWithValue("6", entity.SohlHoehe);
|
||||||
cmd.Parameters.AddWithValue("7", entity.Projekt.Id);
|
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();
|
using var reader = await cmd.ExecuteReaderAsync();
|
||||||
reader.Read();
|
reader.Read();
|
||||||
entity.Id = reader.GetInt32(0);
|
entity.Id = reader.GetInt32(0);
|
||||||
@@ -45,25 +53,30 @@ namespace SewerStammGen.DAL.Services.PostgresqlData
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
private Schacht parseSchacht(NpgsqlDataReader? reader)
|
private Schacht parseSchacht(NpgsqlDataReader reader)
|
||||||
{
|
{
|
||||||
return new Schacht()
|
return new Schacht()
|
||||||
{
|
{
|
||||||
Id = reader.GetInt32(0),
|
Id = reader.GetInt32(0),
|
||||||
Objektbezeichnung = reader.IsDBNull(1) ? "": reader.GetString(1),
|
Objektbezeichnung = reader.IsDBNull(1) ? "": reader.GetString(1),
|
||||||
RechtsWert = reader.GetDecimal(2),
|
DeckelRechtsWert = reader.GetDecimal(2),
|
||||||
HochWert = reader.GetDecimal(3),
|
DeckelHochWert = reader.GetDecimal(3),
|
||||||
SohlHoehe = reader.GetDecimal(4),
|
DeckelHoehe = reader.GetDecimal(4),
|
||||||
DeckelHoehe = reader.GetDecimal(5),
|
SohlRechtsWert = reader.GetDecimal(5),
|
||||||
Entwaesserung = (EEntwaeserung)reader.GetInt32(6),
|
SohlHochWert = reader.GetDecimal(6),
|
||||||
Projekt = new Projekt() { Id = reader.GetInt32(7) },
|
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)
|
public async Task<IEnumerable<Schacht>> GetAllByProjekt(int projektID)
|
||||||
{
|
{
|
||||||
List<Schacht> result = new List<Schacht>();
|
List<Schacht> result = new List<Schacht>();
|
||||||
string command = @"SELECT * FROM " + tableName + " WHERE \"ProjektId\" = @1";
|
string command = @"SELECT * FROM " + tableName + " WHERE ref_projekt_id = @1";
|
||||||
using (var cmd = new NpgsqlCommand(command, conn))
|
using (var cmd = new NpgsqlCommand(command, conn))
|
||||||
{
|
{
|
||||||
cmd.Parameters.AddWithValue("1", projektID);
|
cmd.Parameters.AddWithValue("1", projektID);
|
||||||
@@ -86,24 +99,39 @@ namespace SewerStammGen.DAL.Services.PostgresqlData
|
|||||||
|
|
||||||
public async Task<Schacht> Update(Schacht entity)
|
public async Task<Schacht> Update(Schacht entity)
|
||||||
{
|
{
|
||||||
string command = @"UPDATE " + tableName + "SET \"Objektbezeichnung\" =@1, \"RechtsWert\"=@2," +
|
// TODO: Typo in Schachtype beheben. Dies erfordert jedoch ein Datenbank updater Siehe Issue #7
|
||||||
" \"HochWert\"=@3, \"SohlHoehe\"=@4, \"DeckelHoehe\"=@5, \"Entwaesserung\"=@6," +
|
string command = @"UPDATE " + tableName + " SET " +
|
||||||
" \"ProjektId\"=@7 WHERE \"Id\"=@8";
|
"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))
|
using(var cmd = new NpgsqlCommand(command,conn))
|
||||||
{
|
{
|
||||||
cmd.Parameters.AddWithValue("1", entity.Objektbezeichnung);
|
cmd.Parameters.AddWithValue("1", entity.Objektbezeichnung);
|
||||||
cmd.Parameters.AddWithValue("2", entity.RechtsWert);
|
cmd.Parameters.AddWithValue("2", entity.DeckelRechtsWert);
|
||||||
cmd.Parameters.AddWithValue("3", entity.HochWert);
|
cmd.Parameters.AddWithValue("3", entity.DeckelHochWert);
|
||||||
cmd.Parameters.AddWithValue("4", entity.SohlHoehe);
|
cmd.Parameters.AddWithValue("4", entity.DeckelHoehe);
|
||||||
cmd.Parameters.AddWithValue("5", entity.DeckelHoehe);
|
cmd.Parameters.AddWithValue("5", entity.SohlRechtsWert);
|
||||||
cmd.Parameters.AddWithValue("6", (int)entity.Entwaesserung);
|
cmd.Parameters.AddWithValue("6", entity.SohlHochWert);
|
||||||
cmd.Parameters.AddWithValue("7", entity.Projekt.Id);
|
cmd.Parameters.AddWithValue("7", entity.SohlHoehe);
|
||||||
cmd.Parameters.AddWithValue("8", entity.Id);
|
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();
|
await cmd.ExecuteNonQueryAsync();
|
||||||
}
|
}
|
||||||
return entity;
|
return entity;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<bool> InsertSchachtBulk(List<Schacht> schacht)
|
||||||
|
{
|
||||||
|
foreach(var item in schacht)
|
||||||
|
{
|
||||||
|
await Create(item);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\SewerStammGen.Shared\SewerStammGen.Shared.csproj" />
|
<ProjectReference Include="..\SewerStammGen.Shared\SewerStammGen.Shared.csproj" />
|
||||||
<ProjectReference Include="..\Shared\SewerStammGen.Shared.csproj" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
using System;
|
using SewerStammGen.Shared.Contracts;
|
||||||
|
using SewerStammGen.Shared.Domain;
|
||||||
|
using SewerStammGen.Shared.Enum;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@@ -6,8 +9,8 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace Shared.Contracts
|
namespace Shared.Contracts
|
||||||
{
|
{
|
||||||
internal interface IExport
|
public interface IExport
|
||||||
{
|
{
|
||||||
bool Export();
|
Task<bool> Export(string projektname,EKodierungssystem kodierungssystem,List<Kanal> haltungen, List<Schacht> schaechte, IWWLog log);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
using System;
|
using SewerStammGen.Shared.Domain;
|
||||||
|
using SewerStammGen.Shared.Enum;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@@ -6,8 +8,8 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace Shared.Contracts
|
namespace Shared.Contracts
|
||||||
{
|
{
|
||||||
internal interface IImport
|
public interface IImport
|
||||||
{
|
{
|
||||||
|
List<Schacht> LoadSchaechte(string filename, string vermesser);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,5 +13,6 @@ namespace SewerStammGen.Shared.Contracts
|
|||||||
{
|
{
|
||||||
Task<IEnumerable<Schacht>> GetAllByProjekt(int projektID);
|
Task<IEnumerable<Schacht>> GetAllByProjekt(int projektID);
|
||||||
Task<IEnumerable<Schacht>> GetAllByProjekt(Projekt projekt);
|
Task<IEnumerable<Schacht>> GetAllByProjekt(Projekt projekt);
|
||||||
|
Task<bool> InsertSchachtBulk(List<Schacht> schacht);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
13
SewerStammGen.Shared/Contracts/IWWLog.cs
Normal file
13
SewerStammGen.Shared/Contracts/IWWLog.cs
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SewerStammGen.Shared.Contracts
|
||||||
|
{
|
||||||
|
public interface IWWLog
|
||||||
|
{
|
||||||
|
void Log(string message);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,5 +14,12 @@ namespace SewerStammGen.Shared.Domain
|
|||||||
public string Postleitzahl { get; set; } = String.Empty;
|
public string Postleitzahl { get; set; } = String.Empty;
|
||||||
public string Ansprechpartner { get; set; } = String.Empty;
|
public string Ansprechpartner { get; set; } = String.Empty;
|
||||||
public string Telefonnummer { 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using SewerStammGen.Shared.Enum;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|||||||
@@ -14,10 +14,14 @@ namespace SewerStammGen.Shared.Domain
|
|||||||
public string Erstelldatum { get; set; } = String.Empty;
|
public string Erstelldatum { get; set; } = String.Empty;
|
||||||
public string Strasse { get; set; } = String.Empty;
|
public string Strasse { get; set; } = String.Empty;
|
||||||
public string Ort { get; set; } = String.Empty;
|
public string Ort { get; set; } = String.Empty;
|
||||||
public Auftraggeber Auftraggeber { get; set; }
|
public Auftraggeber Auftraggeber { get; set; } = new Auftraggeber();
|
||||||
public EExportType ExportType { get; set; }
|
public EExportType ExportType { get; set; }
|
||||||
public EKodierungssystem Kodierungssystem { get; set; }
|
public EKodierungssystem Kodierungssystem { get; set; }
|
||||||
public IList<Kanal> Kanaele { get; set; } = new List<Kanal>();
|
public IList<Kanal> Kanaele { get; set; } = new List<Kanal>();
|
||||||
public IList<Schacht> Schaechte { get; set;} = new List<Schacht>();
|
public IList<Schacht> Schaechte { get; set;} = new List<Schacht>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public bool AuftraggeberTemporar { get; set; } = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using SewerStammGen.Shared.Enum;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -10,18 +11,16 @@ namespace SewerStammGen.Shared.Domain
|
|||||||
public class Schacht : DBObject
|
public class Schacht : DBObject
|
||||||
{
|
{
|
||||||
public string Objektbezeichnung { get; set; } = String.Empty;
|
public string Objektbezeichnung { get; set; } = String.Empty;
|
||||||
public decimal RechtsWert { get; set; }
|
public decimal DeckelRechtsWert { get; set; }
|
||||||
public decimal HochWert { get; set; }
|
public decimal DeckelHochWert { get; set; }
|
||||||
public decimal SohlHoehe { get; set; }
|
|
||||||
public decimal DeckelHoehe { 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 Projekt Projekt { get; set; } = new Projekt();
|
||||||
public EEntwaeserung Entwaesserung { get; set; }
|
public EEntwaeserung Entwaesserung { get; set; }
|
||||||
}
|
public ESchachtType SchachtType { get; set; }
|
||||||
|
public string Vermesser { get; set; } = String.Empty;
|
||||||
public enum EEntwaeserung
|
public string AufnahmeDatum { get; set; } = String.Empty;
|
||||||
{
|
|
||||||
Regenwasser,
|
|
||||||
Schmutzwasser,
|
|
||||||
Mischwasser
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
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
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace SewerStammGen.Shared.Enum
|
namespace SewerStammGen.Shared.Enum
|
||||||
{
|
{
|
||||||
|
[Flags]
|
||||||
public enum EExportType
|
public enum EExportType
|
||||||
{
|
{
|
||||||
KANDIS4,
|
KANDIS4,
|
||||||
@@ -13,6 +14,8 @@ namespace SewerStammGen.Shared.Enum
|
|||||||
M150,
|
M150,
|
||||||
XML2006,
|
XML2006,
|
||||||
XML2013,
|
XML2013,
|
||||||
XML2017
|
XML2017,
|
||||||
|
KANDIS = KANDIS4 | KANDIS6,
|
||||||
|
XML = XML2006 | XML2013 | XML2017
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
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
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -12,4 +12,8 @@
|
|||||||
<None Remove="Services\**" />
|
<None Remove="Services\**" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Wibu.CodeMeter.WibuCmNET" Version="7.60.5615.502" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</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,133 +0,0 @@
|
|||||||
using SewerStammGen.Shared.Contracts;
|
|
||||||
using SewerStammGen.Shared.Domain;
|
|
||||||
using SewerStammGen.WPF.Commands;
|
|
||||||
using SewerStammGen.WPF.Interface.Navigator;
|
|
||||||
using SewerStammGen.WPF.ViewModel.State;
|
|
||||||
using Shared.Contracts;
|
|
||||||
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 _haltungDataService;
|
|
||||||
|
|
||||||
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 haltungDataService,
|
|
||||||
IActualState actualState,
|
|
||||||
IRenavigator renavigator)
|
|
||||||
{
|
|
||||||
_actualState = actualState;
|
|
||||||
_haltungDataService = haltungDataService;
|
|
||||||
|
|
||||||
_model = _actualState.SelectedHaltung;
|
|
||||||
_oberePunkt = _model.StartSchacht.Objektbezeichnung;
|
|
||||||
_unterePunkt = _model.EndSchacht.Objektbezeichnung;
|
|
||||||
Speichern = new HaltungEditSaveCommand(_haltungDataService,renavigator,this);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,111 +0,0 @@
|
|||||||
using SewerStammGen.Shared.Domain;
|
|
||||||
using SewerStammGen.WPF.Interface.Navigator;
|
|
||||||
using SewerStammGen.WPF.ViewModel.State;
|
|
||||||
using Shared.Contracts;
|
|
||||||
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()
|
|
||||||
{
|
|
||||||
_dataService.Update(_model);
|
|
||||||
|
|
||||||
_renavigator.Renavigate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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,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,7 +1,7 @@
|
|||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
using SewerStammGen.HostBuilders;
|
using StammGenerator.HostBuilders;
|
||||||
using SewerStammGen.WPF.ViewModel;
|
using StammGenerator.ViewModel;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Configuration;
|
using System.Configuration;
|
||||||
@@ -9,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
|
||||||
@@ -20,7 +24,27 @@ namespace SewerStammGen.WPF
|
|||||||
private readonly IHost _host;
|
private readonly IHost _host;
|
||||||
public App()
|
public App()
|
||||||
{
|
{
|
||||||
_host = CreateHostBuilder().Build();
|
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();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox.Show("Kein Dongle gefunden");
|
||||||
|
Environment.Exit(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static IHostBuilder CreateHostBuilder(string[]? args = null)
|
static IHostBuilder CreateHostBuilder(string[]? args = null)
|
||||||
@@ -30,18 +54,16 @@ namespace SewerStammGen.WPF
|
|||||||
.AddServices()
|
.AddServices()
|
||||||
.AddViewModels()
|
.AddViewModels()
|
||||||
.AddStores();
|
.AddStores();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
MainWindow? window = new MainWindow() { DataContext = _host.Services.GetRequiredService<MainWindowViewModel>() };
|
MainWindow? window = new MainWindow() { DataContext = _host.Services.GetRequiredService<MainWindowViewModel>() };
|
||||||
window.Show();
|
window.Show();
|
||||||
|
|
||||||
@@ -53,7 +75,7 @@ namespace SewerStammGen.WPF
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
Exception ex = (Exception)e.ExceptionObject;
|
Exception ex = (Exception)e.ExceptionObject;
|
||||||
string text = "An application error occured. Please 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)
|
||||||
@@ -62,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,14 +1,9 @@
|
|||||||
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
|
||||||
{
|
{
|
||||||
@@ -1,33 +1,36 @@
|
|||||||
using SewerStammGen.Shared.Contracts;
|
using SewerStammGen.Shared.Contracts;
|
||||||
using SewerStammGen.Shared.Domain;
|
using SewerStammGen.Shared.Domain;
|
||||||
using SewerStammGen.WPF.Interface.Navigator;
|
using StammGenerator.Commands;
|
||||||
using SewerStammGen.WPF.ViewModel;
|
using StammGenerator.Interface;
|
||||||
using Shared.Contracts;
|
using StammGenerator.ViewModel;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace SewerStammGen.WPF.Commands
|
namespace StammGenerator.Commands
|
||||||
{
|
{
|
||||||
internal class HaltungEditSaveCommand : AsyncCommandBase
|
internal class HaltungEditSaveCommand : AsyncCommandBase
|
||||||
{
|
{
|
||||||
private readonly HaltungEditViewModel _haltungEditViewModel;
|
|
||||||
private readonly IHaltungDataService _haltungDataService;
|
private readonly IHaltungDataService _haltungDataService;
|
||||||
private readonly IRenavigator _renavigator;
|
private readonly IRenavigator _renavigator;
|
||||||
|
private readonly Kanal _model;
|
||||||
|
|
||||||
public HaltungEditSaveCommand(IHaltungDataService haltungDataService,IRenavigator renavigator,HaltungEditViewModel haltungEditViewModel)
|
public HaltungEditSaveCommand(IHaltungDataService haltungDataService,IRenavigator renavigator,HaltungEditViewModel haltungEditViewModel)
|
||||||
{
|
{
|
||||||
this._haltungEditViewModel = haltungEditViewModel;
|
|
||||||
this._haltungDataService = haltungDataService;
|
this._haltungDataService = haltungDataService;
|
||||||
this._renavigator = renavigator;
|
this._renavigator = renavigator;
|
||||||
|
this._model = haltungEditViewModel.Model;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override async Task ExecuteAsync(object? parameter)
|
public override async Task ExecuteAsync(object? parameter)
|
||||||
{
|
{
|
||||||
_haltungEditViewModel.Model = await _haltungDataService.Update(_haltungEditViewModel.Model);
|
if(_model.Id == -1) // Neu anlegen
|
||||||
|
{
|
||||||
|
await _haltungDataService.Create(_model);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
await _haltungDataService.Update(_model);
|
||||||
|
}
|
||||||
|
|
||||||
_renavigator.Renavigate();
|
_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,15 +1,12 @@
|
|||||||
using SewerStammGen.Shared.Contracts;
|
using SewerStammGen.Shared.Contracts;
|
||||||
using SewerStammGen.Shared.Domain;
|
using SewerStammGen.Shared.Domain;
|
||||||
using SewerStammGen.WPF.Interface.Navigator;
|
using StammGenerator.Commands;
|
||||||
using SewerStammGen.WPF.ViewModel.State;
|
using StammGenerator.Interface;
|
||||||
using Shared.Contracts;
|
using StammGenerator.ViewModel;
|
||||||
using System;
|
|
||||||
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
|
||||||
{
|
{
|
||||||
@@ -1,12 +1,11 @@
|
|||||||
using SewerStammGen.Shared.Domain;
|
using SewerStammGen.Shared.Domain;
|
||||||
using SewerStammGen.WPF.Interface.Navigator;
|
|
||||||
using SewerStammGen.WPF.ViewModel;
|
|
||||||
using SewerStammGen.WPF.ViewModel.State;
|
|
||||||
using Shared.Contracts;
|
using Shared.Contracts;
|
||||||
using System.Runtime.CompilerServices;
|
using StammGenerator.Commands;
|
||||||
|
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,9 +1,8 @@
|
|||||||
using SewerStammGen.WPF.ViewModel;
|
using StammGenerator.Commands;
|
||||||
using SewerStammGen.WPF.ViewModel.State;
|
using StammGenerator.ViewModel;
|
||||||
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
|
||||||
{
|
{
|
||||||
@@ -1,15 +1,10 @@
|
|||||||
using SewerStammGen.Shared.Contracts;
|
using SewerStammGen.Shared.Domain;
|
||||||
using SewerStammGen.Shared.Domain;
|
using StammGenerator.Commands;
|
||||||
using SewerStammGen.WPF.Interface.Navigator;
|
using StammGenerator.Interface;
|
||||||
using SewerStammGen.WPF.ViewModel.State;
|
using StammGenerator.ViewModel;
|
||||||
using Shared.Contracts;
|
|
||||||
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 SchachtAddCommand : AsyncCommandBase
|
class SchachtAddCommand : AsyncCommandBase
|
||||||
{
|
{
|
||||||
@@ -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,14 +1,9 @@
|
|||||||
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
|
||||||
{
|
{
|
||||||
@@ -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,
|
||||||
@@ -6,7 +6,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace SewerStammGen.HostBuilders
|
namespace StammGenerator.HostBuilders
|
||||||
{
|
{
|
||||||
static class AddConfigurationHostBuilderExtensions
|
static class AddConfigurationHostBuilderExtensions
|
||||||
{
|
{
|
||||||
@@ -9,7 +9,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace SewerStammGen.HostBuilders
|
namespace StammGenerator.HostBuilders
|
||||||
{
|
{
|
||||||
static class AddDBContextHostBuilderExtensions
|
static class AddDBContextHostBuilderExtensions
|
||||||
{
|
{
|
||||||
@@ -2,20 +2,11 @@
|
|||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
using SewerStammGen.Shared.Contracts;
|
using SewerStammGen.Shared.Contracts;
|
||||||
using SewerStammGen.WPF.Interface.Navigator;
|
using StammGenerator.Interface;
|
||||||
using SewerStammGen.WPF.ViewModel;
|
using StammGenerator.ViewModel;
|
||||||
using SewerStammGen.WPF.ViewModel.State.Navigation;
|
|
||||||
using Shared.Contracts;
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SewerStammGen.HostBuilders
|
namespace StammGenerator.HostBuilders
|
||||||
{
|
{
|
||||||
internal static class AddServicesHostBuilderExtensions
|
internal static class AddServicesHostBuilderExtensions
|
||||||
{
|
{
|
||||||
@@ -33,10 +24,10 @@ namespace SewerStammGen.HostBuilders
|
|||||||
{
|
{
|
||||||
string? connectionstring = context.Configuration.GetConnectionString("postgresql");
|
string? connectionstring = context.Configuration.GetConnectionString("postgresql");
|
||||||
if(connectionstring == null) throw new ArgumentNullException(nameof(connectionstring));
|
if(connectionstring == null) throw new ArgumentNullException(nameof(connectionstring));
|
||||||
services.AddSingleton<IProjektDataService>(_=> new DAL.Services.PostgresqlData.ProjektDataService(connectionstring));
|
services.AddSingleton<IProjektDataService>(_=> new SewerStammGen.DAL.Services.PostgresqlData.ProjektDataService(connectionstring));
|
||||||
services.AddSingleton<IAuftraggeberDataService>(_ => new DAL.Services.PostgresqlData.AuftraggeberDataService(connectionstring));
|
services.AddSingleton<IAuftraggeberDataService>(_ => new SewerStammGen.DAL.Services.PostgresqlData.AuftraggeberDataService(connectionstring));
|
||||||
services.AddSingleton<ISchachtDataService>(_ => new DAL.Services.PostgresqlData.SchachtDataService(connectionstring));
|
services.AddSingleton<ISchachtDataService>(_ => new SewerStammGen.DAL.Services.PostgresqlData.SchachtDataService(connectionstring));
|
||||||
services.AddSingleton<IHaltungDataService>(_ => new DAL.Services.PostgresqlData.HaltungDataService(connectionstring));
|
services.AddSingleton<IHaltungDataService>(_ => new SewerStammGen.DAL.Services.PostgresqlData.HaltungDataService(connectionstring));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,13 +1,8 @@
|
|||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
using SewerStammGen.WPF.ViewModel.State;
|
using StammGenerator.ViewModel;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace SewerStammGen.HostBuilders
|
namespace StammGenerator.HostBuilders
|
||||||
{
|
{
|
||||||
static class AddStoresHostBuilderExtensions
|
static class AddStoresHostBuilderExtensions
|
||||||
{
|
{
|
||||||
@@ -1,22 +1,11 @@
|
|||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
using SewerStammGen.WPF.Commands;
|
|
||||||
using SewerStammGen.WPF.Interface;
|
|
||||||
using SewerStammGen.WPF.ViewModel;
|
|
||||||
using SewerStammGen.WPF.ViewModel.State.Navigation;
|
|
||||||
using SewerStammGen.WPF.ViewModel.Factories;
|
|
||||||
using Shared.Contracts;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Net.Security;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using SewerStammGen.WPF.ViewModel.State;
|
|
||||||
using SewerStammGen.Shared.Contracts;
|
using SewerStammGen.Shared.Contracts;
|
||||||
using SewerStammGen.Shared.Domain;
|
using StammGenerator.Interface;
|
||||||
|
using StammGenerator.ViewModel;
|
||||||
|
using StammGenerator.ViewModel.Factories;
|
||||||
|
|
||||||
namespace SewerStammGen.HostBuilders
|
namespace StammGenerator.HostBuilders
|
||||||
{
|
{
|
||||||
static class AddViewModelsHostBuilderExtensions
|
static class AddViewModelsHostBuilderExtensions
|
||||||
{
|
{
|
||||||
@@ -32,6 +21,7 @@ namespace SewerStammGen.HostBuilders
|
|||||||
|
|
||||||
services.AddSingleton<ViewModelDelegateRenavigator<ManholeListViewModel>>();
|
services.AddSingleton<ViewModelDelegateRenavigator<ManholeListViewModel>>();
|
||||||
services.AddSingleton<ViewModelDelegateRenavigator<ManholeEditViewModel>>();
|
services.AddSingleton<ViewModelDelegateRenavigator<ManholeEditViewModel>>();
|
||||||
|
services.AddSingleton<ViewModelDelegateRenavigator<ManholeImportViewModel>>();
|
||||||
|
|
||||||
services.AddSingleton<ViewModelDelegateRenavigator<HaltungListViewModel>>();
|
services.AddSingleton<ViewModelDelegateRenavigator<HaltungListViewModel>>();
|
||||||
services.AddSingleton<ViewModelDelegateRenavigator<HaltungEditViewModel>>();
|
services.AddSingleton<ViewModelDelegateRenavigator<HaltungEditViewModel>>();
|
||||||
@@ -48,7 +38,6 @@ namespace SewerStammGen.HostBuilders
|
|||||||
services.GetRequiredService<ISchachtDataService>(),
|
services.GetRequiredService<ISchachtDataService>(),
|
||||||
services.GetRequiredService<ViewModelDelegateRenavigator<ManholeEditViewModel>>(),
|
services.GetRequiredService<ViewModelDelegateRenavigator<ManholeEditViewModel>>(),
|
||||||
services.GetRequiredService<IActualState>()
|
services.GetRequiredService<IActualState>()
|
||||||
|
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -60,6 +49,24 @@ namespace SewerStammGen.HostBuilders
|
|||||||
services.GetRequiredService<ViewModelDelegateRenavigator<ManholeListViewModel>>()
|
services.GetRequiredService<ViewModelDelegateRenavigator<ManholeListViewModel>>()
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
services.AddSingleton<CreateViewModel<ManholeImportViewModel>>(services =>
|
||||||
|
{
|
||||||
|
return () => new ManholeImportViewModel(
|
||||||
|
services.GetRequiredService<ISchachtDataService>(),
|
||||||
|
services.GetRequiredService<ViewModelDelegateRenavigator<ManholeListViewModel>>(),
|
||||||
|
services.GetRequiredService<IActualState>()
|
||||||
|
);
|
||||||
|
});
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Auftraggeber
|
||||||
|
services.AddSingleton<CreateViewModel<AuftraggeberListViewModel>>(services =>
|
||||||
|
{
|
||||||
|
return () => new AuftraggeberListViewModel(
|
||||||
|
services.GetRequiredService<IAuftraggeberDataService>()
|
||||||
|
);
|
||||||
|
});
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Haltungen
|
#region Haltungen
|
||||||
@@ -77,7 +84,8 @@ namespace SewerStammGen.HostBuilders
|
|||||||
return () => new HaltungEditViewModel(
|
return () => new HaltungEditViewModel(
|
||||||
services.GetRequiredService<IHaltungDataService>(),
|
services.GetRequiredService<IHaltungDataService>(),
|
||||||
services.GetRequiredService<IActualState>(),
|
services.GetRequiredService<IActualState>(),
|
||||||
services.GetRequiredService<ViewModelDelegateRenavigator<HaltungListViewModel>>()
|
services.GetRequiredService<ViewModelDelegateRenavigator<HaltungListViewModel>>(),
|
||||||
|
services.GetRequiredService<ISchachtDataService>()
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
#endregion
|
#endregion
|
||||||
@@ -87,8 +95,10 @@ namespace SewerStammGen.HostBuilders
|
|||||||
{
|
{
|
||||||
return () => new ProjektEditViewModel(
|
return () => new ProjektEditViewModel(
|
||||||
services.GetRequiredService<IProjektDataService>(),
|
services.GetRequiredService<IProjektDataService>(),
|
||||||
services.GetRequiredService<ViewModelDelegateRenavigator<ProjektListViewModel>>(),
|
services.GetRequiredService<IAuftraggeberDataService>(),
|
||||||
services.GetRequiredService<IActualState>()
|
services.GetRequiredService<IActualState>(),
|
||||||
|
services.GetRequiredService<ViewModelDelegateRenavigator<ProjektListViewModel>>()
|
||||||
|
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -96,8 +106,11 @@ namespace SewerStammGen.HostBuilders
|
|||||||
{
|
{
|
||||||
return () => new ProjektListViewModel(
|
return () => new ProjektListViewModel(
|
||||||
services.GetRequiredService<IProjektDataService>(),
|
services.GetRequiredService<IProjektDataService>(),
|
||||||
|
services.GetRequiredService<IHaltungDataService>(),
|
||||||
|
services.GetRequiredService<ISchachtDataService>(),
|
||||||
|
services.GetRequiredService<IActualState>(),
|
||||||
services.GetRequiredService<ViewModelDelegateRenavigator<ProjektEditViewModel>>(),
|
services.GetRequiredService<ViewModelDelegateRenavigator<ProjektEditViewModel>>(),
|
||||||
services.GetRequiredService<IActualState>()
|
services.GetRequiredService<ViewModelDelegateRenavigator<ManholeImportViewModel>>()
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
#endregion
|
#endregion
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
using SewerStammGen.Enum;
|
using StammGenerator.Enum;
|
||||||
using SewerStammGen.WPF.ViewModel;
|
using StammGenerator.ViewModel;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace SewerStammGen.WPF.Interface
|
namespace StammGenerator.Interface
|
||||||
{
|
{
|
||||||
public interface IViewModelAbstractFactory
|
public interface IViewModelAbstractFactory
|
||||||
{
|
{
|
||||||
@@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace SewerStammGen.WPF.Interface.Navigator
|
namespace StammGenerator.Interface
|
||||||
{
|
{
|
||||||
public interface IMainWindowNavigator : INavigator
|
public interface IMainWindowNavigator : INavigator
|
||||||
{
|
{
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
using SewerStammGen.WPF.ViewModel;
|
using StammGenerator.ViewModel;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace SewerStammGen.WPF.Interface.Navigator
|
namespace StammGenerator.Interface
|
||||||
{
|
{
|
||||||
public interface INavigator
|
public interface INavigator
|
||||||
{
|
{
|
||||||
@@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace SewerStammGen.WPF.Interface.Navigator
|
namespace StammGenerator.Interface
|
||||||
{
|
{
|
||||||
public interface IRenavigator
|
public interface IRenavigator
|
||||||
{
|
{
|
||||||
@@ -1,17 +1,16 @@
|
|||||||
<Window x:Class="SewerStammGen.WPF.MainWindow"
|
<Window x:Class="StammGenerator.MainWindow"
|
||||||
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:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:my="clr-namespace:SewerStammGen.WPF.Views"
|
xmlns:local="clr-namespace:StammGenerator"
|
||||||
xmlns:local="clr-namespace:SewerStammGen.WPF"
|
|
||||||
xmlns:view="clr-namespace:SewerStammGen.WPF.Views"
|
|
||||||
xmlns:viewmodel="clr-namespace:SewerStammGen.WPF.ViewModel"
|
|
||||||
xmlns:controls="clr-namespace:SewerStammGen.WPF.Views.Controls"
|
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="{Binding ApplicationTitle}" Height="450" Width="800" FontSize="20"
|
|
||||||
WindowState="Maximized"
|
WindowState="Maximized"
|
||||||
>
|
xmlns:view="clr-namespace:StammGenerator.Views"
|
||||||
|
xmlns:viewmodel="clr-namespace:StammGenerator.ViewModel"
|
||||||
|
|
||||||
|
FontSize="18"
|
||||||
|
Title="MainWindow" Height="450" Width="800">
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
<DataTemplate DataType="{x:Type viewmodel:HomeViewModel}">
|
<DataTemplate DataType="{x:Type viewmodel:HomeViewModel}">
|
||||||
<view:HomeView />
|
<view:HomeView />
|
||||||
@@ -22,6 +21,9 @@
|
|||||||
<DataTemplate DataType="{x:Type viewmodel:ManholeEditViewModel}">
|
<DataTemplate DataType="{x:Type viewmodel:ManholeEditViewModel}">
|
||||||
<view:SchachtEditView />
|
<view:SchachtEditView />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
<DataTemplate DataType="{x:Type viewmodel:ManholeImportViewModel}">
|
||||||
|
<view:SchachtImportView />
|
||||||
|
</DataTemplate>
|
||||||
<DataTemplate DataType="{x:Type viewmodel:HaltungListViewModel}">
|
<DataTemplate DataType="{x:Type viewmodel:HaltungListViewModel}">
|
||||||
<view:HaltungListView />
|
<view:HaltungListView />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
@@ -29,6 +31,10 @@
|
|||||||
<view:HaltungEditView />
|
<view:HaltungEditView />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|
||||||
|
<DataTemplate DataType="{x:Type viewmodel:AuftraggeberListViewModel}">
|
||||||
|
<view:AuftraggeberListView />
|
||||||
|
</DataTemplate>
|
||||||
|
|
||||||
<DataTemplate DataType="{x:Type viewmodel:ProjektListViewModel}">
|
<DataTemplate DataType="{x:Type viewmodel:ProjektListViewModel}">
|
||||||
<view:ProjektListView />
|
<view:ProjektListView />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
@@ -45,7 +51,8 @@
|
|||||||
<ColumnDefinition Width="200" />
|
<ColumnDefinition Width="200" />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<controls:UCMainWindowNavigationBar Grid.Column="0" />
|
<view:MainWindowNavigationBar Grid.Column="0" />
|
||||||
|
|
||||||
<ContentControl Grid.Column="1" Content="{Binding CurrentViewModel}" />
|
<ContentControl Grid.Column="1" Content="{Binding CurrentViewModel}" />
|
||||||
<StatusBar Grid.Row="1" Grid.ColumnSpan="2">
|
<StatusBar Grid.Row="1" Grid.ColumnSpan="2">
|
||||||
<StatusBarItem Content="{Binding Projektnummer}" />
|
<StatusBarItem Content="{Binding Projektnummer}" />
|
||||||
@@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
|
|||||||
using System.Windows.Navigation;
|
using System.Windows.Navigation;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
|
|
||||||
namespace SewerStammGen.WPF
|
namespace StammGenerator
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interaction logic for MainWindow.xaml
|
/// Interaction logic for MainWindow.xaml
|
||||||
@@ -23,8 +23,6 @@ namespace SewerStammGen.WPF
|
|||||||
public MainWindow()
|
public MainWindow()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
//SewerConnector.DataContext = new ViewModel.SewerConnectorViewModel();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
26
StammGenerator/Services/OpenFileDialogService.cs
Normal file
26
StammGenerator/Services/OpenFileDialogService.cs
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
using Microsoft.Win32;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StammGenerator.Services
|
||||||
|
{
|
||||||
|
internal class OpenFileDialogService
|
||||||
|
{
|
||||||
|
public string OpenFileDialog()
|
||||||
|
{
|
||||||
|
OpenFileDialog dialog = new OpenFileDialog();
|
||||||
|
dialog.Filter = "CSV Files(.csv)|*.csv";
|
||||||
|
dialog.FilterIndex = 1;
|
||||||
|
dialog.Multiselect = false;
|
||||||
|
if(dialog.ShowDialog() == true)
|
||||||
|
{
|
||||||
|
return dialog.FileName;
|
||||||
|
}
|
||||||
|
return string.Empty;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,13 +10,13 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
|
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.39" />
|
<PackageReference Include="Wibu.CodeMeter.WibuCmNET" Version="7.60.5615.502" />
|
||||||
<PackageReference Include="Syncfusion.SfGrid.WPF" Version="20.4.0.54" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\SewerStammGen.DAL\SewerStammGen.DAL.csproj" />
|
<ProjectReference Include="..\SewerStammGen.DAL\SewerStammGen.DAL.csproj" />
|
||||||
<ProjectReference Include="..\SewerStammGen.Shared\SewerStammGen.Shared.csproj" />
|
<ProjectReference Include="..\SewerStammGen.Shared\SewerStammGen.Shared.csproj" />
|
||||||
|
<ProjectReference Include="..\WWTech_KanalSchnittstelle\WWTech_KanalSchnittstelle.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -7,16 +7,25 @@
|
|||||||
</ApplicationDefinition>
|
</ApplicationDefinition>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Update="Views\Auftraggeber\AuftraggeberListView.xaml.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Update="Views\Auftraggeber\AuftraggeberShow.xaml.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Update="Views\Haltung\HaltungEditView.xaml.cs">
|
<Compile Update="Views\Haltung\HaltungEditView.xaml.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Update="Views\Haltung\HaltungListView.xaml.cs">
|
<Compile Update="Views\Haltung\HaltungListView.xaml.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Update="Views\Controls\UCMainWindowNavigationBar.xaml.cs">
|
<Compile Update="Views\HomeView.xaml.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Update="Views\HomeView.xaml.cs">
|
<Compile Update="Views\MainWindowNavigationBar.xaml.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Update="Views\Projekt\ProjektSettings.xaml.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Update="Views\Projekt\ProjektEditView.xaml.cs">
|
<Compile Update="Views\Projekt\ProjektEditView.xaml.cs">
|
||||||
@@ -25,13 +34,13 @@
|
|||||||
<Compile Update="Views\Projekt\ProjektListView.xaml.cs">
|
<Compile Update="Views\Projekt\ProjektListView.xaml.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Update="Views\Schacht\SchachtListView.xaml.cs">
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Update="Views\Schacht\SchachtEditView.xaml.cs">
|
<Compile Update="Views\Schacht\SchachtEditView.xaml.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Update="Views\UCNormXML.xaml.cs">
|
<Compile Update="Views\Schacht\SchachtImportView.xaml.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Update="Views\Schacht\SchachtListView.xaml.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
@@ -39,16 +48,25 @@
|
|||||||
<Page Update="MainWindow.xaml">
|
<Page Update="MainWindow.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Update="Views\Auftraggeber\AuftraggeberListView.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Views\Auftraggeber\AuftraggeberShow.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
<Page Update="Views\Haltung\HaltungEditView.xaml">
|
<Page Update="Views\Haltung\HaltungEditView.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Update="Views\Haltung\HaltungListView.xaml">
|
<Page Update="Views\Haltung\HaltungListView.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Update="Views\Controls\UCMainWindowNavigationBar.xaml">
|
<Page Update="Views\HomeView.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Update="Views\HomeView.xaml">
|
<Page Update="Views\MainWindowNavigationBar.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Views\Projekt\ProjektSettings.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Update="Views\Projekt\ProjektEditView.xaml">
|
<Page Update="Views\Projekt\ProjektEditView.xaml">
|
||||||
@@ -57,16 +75,13 @@
|
|||||||
<Page Update="Views\Projekt\ProjektListView.xaml">
|
<Page Update="Views\Projekt\ProjektListView.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Update="Views\Schacht\SchachtListView.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</Page>
|
|
||||||
<Page Update="Views\styles\my_controls.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</Page>
|
|
||||||
<Page Update="Views\Schacht\SchachtEditView.xaml">
|
<Page Update="Views\Schacht\SchachtEditView.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Update="Views\UCNormXML.xaml">
|
<Page Update="Views\Schacht\SchachtImportView.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Views\Schacht\SchachtListView.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
@@ -0,0 +1,145 @@
|
|||||||
|
using SewerStammGen.Shared.Contracts;
|
||||||
|
using SewerStammGen.Shared.Domain;
|
||||||
|
using Shared.Contracts;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Input;
|
||||||
|
|
||||||
|
namespace StammGenerator.ViewModel
|
||||||
|
{
|
||||||
|
class AuftraggeberEditFrmViewModel : BaseViewModel
|
||||||
|
{
|
||||||
|
Auftraggeber _model;
|
||||||
|
public string Name
|
||||||
|
{
|
||||||
|
get => _model.Name;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if(_model.Name != value)
|
||||||
|
{
|
||||||
|
_model.Name = 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 string Postleitzahl
|
||||||
|
{
|
||||||
|
get => _model.Postleitzahl;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if(_model.Postleitzahl != value)
|
||||||
|
{
|
||||||
|
_model.Postleitzahl = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public string Telefonnummer
|
||||||
|
{
|
||||||
|
get => _model.Telefonnummer;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if(_model.Telefonnummer != value)
|
||||||
|
{
|
||||||
|
_model.Telefonnummer = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public string Ansprechpartner
|
||||||
|
{
|
||||||
|
get => _model.Ansprechpartner;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if(_model.Ansprechpartner != value)
|
||||||
|
{
|
||||||
|
_model.Ansprechpartner = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Auftraggeber? SelectedAuftraggber { get; set; } = null;
|
||||||
|
|
||||||
|
public ICommand ApplyCommand { get; set; }
|
||||||
|
|
||||||
|
private readonly IAuftraggeberDataService _auftraggeberDataService;
|
||||||
|
|
||||||
|
private IList<Auftraggeber> verfuegbareAuftraggeber = new List<Auftraggeber>();
|
||||||
|
public IList<Auftraggeber> VerfuegbareAuftraggeber
|
||||||
|
{
|
||||||
|
get => verfuegbareAuftraggeber;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
verfuegbareAuftraggeber = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnPropertyChanged([CallerMemberName] string? propertyName = null)
|
||||||
|
{
|
||||||
|
_model.DataChanged = true;
|
||||||
|
base.OnPropertyChanged(propertyName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public AuftraggeberEditFrmViewModel(Auftraggeber model, IAuftraggeberDataService auftraggeberDataService)
|
||||||
|
{
|
||||||
|
_model = model;
|
||||||
|
_auftraggeberDataService = auftraggeberDataService;
|
||||||
|
ApplyCommand = new RelayCommand((x) => this.Apply());
|
||||||
|
|
||||||
|
|
||||||
|
LoadAuftraggebers();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Apply()
|
||||||
|
{
|
||||||
|
if (SelectedAuftraggber == null) return;
|
||||||
|
_model = SelectedAuftraggber;
|
||||||
|
OnPropertyChanged(nameof(Name));
|
||||||
|
OnPropertyChanged(nameof(Strasse));
|
||||||
|
OnPropertyChanged(nameof(Ort));
|
||||||
|
OnPropertyChanged(nameof(Postleitzahl));
|
||||||
|
OnPropertyChanged(nameof(Telefonnummer));
|
||||||
|
OnPropertyChanged(nameof(Ansprechpartner));
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void LoadAuftraggebers()
|
||||||
|
{
|
||||||
|
VerfuegbareAuftraggeber.Clear();
|
||||||
|
IEnumerable<Auftraggeber> s = await _auftraggeberDataService.GetAll();
|
||||||
|
VerfuegbareAuftraggeber = s.ToList();
|
||||||
|
OnPropertyChanged(nameof(VerfuegbareAuftraggeber));
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
using SewerStammGen.Shared.Contracts;
|
||||||
|
using SewerStammGen.Shared.Domain;
|
||||||
|
using StammGenerator.Commands;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Input;
|
||||||
|
|
||||||
|
namespace StammGenerator.ViewModel
|
||||||
|
{
|
||||||
|
public class AuftraggeberListViewModel : BaseViewModel
|
||||||
|
{
|
||||||
|
private readonly ObservableCollection<Auftraggeber> _auftraggeber;
|
||||||
|
private readonly IAuftraggeberDataService _auftraggeberDataService;
|
||||||
|
|
||||||
|
public Auftraggeber? SelectedAuftraggeber { get; set; }
|
||||||
|
public ObservableCollection<Auftraggeber> Auftraggeber { get => _auftraggeber; }
|
||||||
|
public ICommand AddCommand { get; set; }
|
||||||
|
public ICommand EditCommand { get; set; }
|
||||||
|
|
||||||
|
public AuftraggeberListViewModel(IAuftraggeberDataService auftraggeberDataService)
|
||||||
|
{
|
||||||
|
_auftraggeber = new ObservableCollection<Auftraggeber>();
|
||||||
|
_auftraggeberDataService = auftraggeberDataService;
|
||||||
|
|
||||||
|
AddCommand = new AuftraggeberAddCommand();
|
||||||
|
EditCommand = new AuftraggeberEditCommand();
|
||||||
|
|
||||||
|
LoadAuftraggeber();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private async void LoadAuftraggeber()
|
||||||
|
{
|
||||||
|
var auftraggeber = await _auftraggeberDataService.GetAll();
|
||||||
|
InitCollection(_auftraggeber, auftraggeber);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InitCollection(ObservableCollection<Auftraggeber> dest, IEnumerable<Auftraggeber> source)
|
||||||
|
{
|
||||||
|
dest.Clear();
|
||||||
|
foreach(var sourceItem in source)
|
||||||
|
{
|
||||||
|
dest.Add(sourceItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace SewerStammGen.WPF.ViewModel
|
namespace StammGenerator.ViewModel
|
||||||
{
|
{
|
||||||
public delegate TViewModel CreateViewModel<TViewModel>() where TViewModel : BaseViewModel;
|
public delegate TViewModel CreateViewModel<TViewModel>() where TViewModel : BaseViewModel;
|
||||||
public class BaseViewModel : ObservableObject
|
public class BaseViewModel : ObservableObject
|
||||||
@@ -1,12 +1,13 @@
|
|||||||
using SewerStammGen.Enum;
|
using StammGenerator;
|
||||||
using SewerStammGen.WPF.Interface;
|
using StammGenerator.Enum;
|
||||||
|
using StammGenerator.Interface;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace SewerStammGen.WPF.ViewModel.Factories
|
namespace StammGenerator.ViewModel.Factories
|
||||||
{
|
{
|
||||||
public class MainWindowViewModelFactory : IViewModelAbstractFactory
|
public class MainWindowViewModelFactory : IViewModelAbstractFactory
|
||||||
{
|
{
|
||||||
@@ -16,6 +17,7 @@ namespace SewerStammGen.WPF.ViewModel.Factories
|
|||||||
private CreateViewModel<HaltungListViewModel> _createHaltungListViewModel;
|
private CreateViewModel<HaltungListViewModel> _createHaltungListViewModel;
|
||||||
//private CreateViewModel<SewerConnectorViewModel> _createSewerConnectorViewModel;
|
//private CreateViewModel<SewerConnectorViewModel> _createSewerConnectorViewModel;
|
||||||
private CreateViewModel<ProjektListViewModel> _createProjektListViewModel;
|
private CreateViewModel<ProjektListViewModel> _createProjektListViewModel;
|
||||||
|
private CreateViewModel<AuftraggeberListViewModel> _createAuftraggeberListViewModel;
|
||||||
|
|
||||||
public MainWindowViewModelFactory(
|
public MainWindowViewModelFactory(
|
||||||
CreateViewModel<HomeViewModel> createHomeViewModel,
|
CreateViewModel<HomeViewModel> createHomeViewModel,
|
||||||
@@ -23,7 +25,8 @@ namespace SewerStammGen.WPF.ViewModel.Factories
|
|||||||
CreateViewModel<ManholeListViewModel> createManholeListViewModel,
|
CreateViewModel<ManholeListViewModel> createManholeListViewModel,
|
||||||
CreateViewModel<HaltungListViewModel> createHaltungListViewModel,
|
CreateViewModel<HaltungListViewModel> createHaltungListViewModel,
|
||||||
|
|
||||||
CreateViewModel<ProjektListViewModel> createProjektListViewModel
|
CreateViewModel<ProjektListViewModel> createProjektListViewModel,
|
||||||
|
CreateViewModel<AuftraggeberListViewModel> createAuftraggeberListViewModel
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
_createHomeViewModel = createHomeViewModel;
|
_createHomeViewModel = createHomeViewModel;
|
||||||
@@ -32,6 +35,7 @@ namespace SewerStammGen.WPF.ViewModel.Factories
|
|||||||
_createProjektListViewModel = createProjektListViewModel;
|
_createProjektListViewModel = createProjektListViewModel;
|
||||||
_createManholeListViewModel = createManholeListViewModel;
|
_createManholeListViewModel = createManholeListViewModel;
|
||||||
_createHaltungListViewModel = createHaltungListViewModel;
|
_createHaltungListViewModel = createHaltungListViewModel;
|
||||||
|
_createAuftraggeberListViewModel = createAuftraggeberListViewModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BaseViewModel CreateViewModel(EMainWindowViewType viewType)
|
public BaseViewModel CreateViewModel(EMainWindowViewType viewType)
|
||||||
@@ -48,6 +52,8 @@ namespace SewerStammGen.WPF.ViewModel.Factories
|
|||||||
|
|
||||||
case EMainWindowViewType.ProjectList: return _createProjektListViewModel();
|
case EMainWindowViewType.ProjectList: return _createProjektListViewModel();
|
||||||
|
|
||||||
|
case EMainWindowViewType.AuftraggeberList: return _createAuftraggeberListViewModel();
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
210
StammGenerator/ViewModel/Haltung/HaltungEditViewModel.cs
Normal file
210
StammGenerator/ViewModel/Haltung/HaltungEditViewModel.cs
Normal file
@@ -0,0 +1,210 @@
|
|||||||
|
using SewerStammGen.Shared.Contracts;
|
||||||
|
using SewerStammGen.Shared.Domain;
|
||||||
|
using SewerStammGen.Shared.Enum;
|
||||||
|
using StammGenerator.Commands;
|
||||||
|
using StammGenerator.Interface;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Windows.Input;
|
||||||
|
|
||||||
|
namespace StammGenerator.ViewModel
|
||||||
|
{
|
||||||
|
internal class HaltungEditViewModel : BaseViewModel
|
||||||
|
{
|
||||||
|
private readonly IActualState _actualState;
|
||||||
|
private readonly IHaltungDataService _haltungDataService;
|
||||||
|
private readonly ISchachtDataService _schachtDataService;
|
||||||
|
private List<Schacht> avaibleSchaechte = new List<Schacht>();
|
||||||
|
private int _selectedObenIndex;
|
||||||
|
private int _selectedUntenIndex;
|
||||||
|
private Kanal _model;
|
||||||
|
|
||||||
|
public List<Schacht> AvSchaechte
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return avaibleSchaechte;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public EEntwaeserung Entwaeserung
|
||||||
|
{
|
||||||
|
get => _model.Entwaesserung;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if(_model.Entwaesserung != value)
|
||||||
|
{
|
||||||
|
_model.Entwaesserung = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int SelectedObenIndex
|
||||||
|
{
|
||||||
|
get => _selectedObenIndex;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (_selectedObenIndex != value)
|
||||||
|
{
|
||||||
|
_selectedObenIndex = value;
|
||||||
|
_model.StartSchacht = avaibleSchaechte[value];
|
||||||
|
RecalculateLength();
|
||||||
|
Haltungsbezeichnung = _model.StartSchacht.Objektbezeichnung;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public int SelectedUntenIndex
|
||||||
|
{
|
||||||
|
get => _selectedUntenIndex;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (_selectedUntenIndex != value)
|
||||||
|
{
|
||||||
|
_selectedUntenIndex = value;
|
||||||
|
_model.EndSchacht = avaibleSchaechte[value];
|
||||||
|
RecalculateLength();
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public Kanal Model
|
||||||
|
{
|
||||||
|
get => _model;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_model = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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 ICommand Abbrechen { get; set; }
|
||||||
|
|
||||||
|
public HaltungEditViewModel(
|
||||||
|
IHaltungDataService haltungDataService,
|
||||||
|
IActualState actualState,
|
||||||
|
IRenavigator renavigator,
|
||||||
|
ISchachtDataService schachtDataService)
|
||||||
|
{
|
||||||
|
_actualState = actualState;
|
||||||
|
_haltungDataService = haltungDataService;
|
||||||
|
_schachtDataService = schachtDataService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
_model = _actualState.SelectedHaltung;
|
||||||
|
|
||||||
|
Speichern = new HaltungEditSaveCommand(_haltungDataService, renavigator, this);
|
||||||
|
Abbrechen = new RelayCommand((x) => Abbruch(renavigator));
|
||||||
|
|
||||||
|
ladeVerfuegbareSchaechte();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void RecalculateLength()
|
||||||
|
{
|
||||||
|
|
||||||
|
double x1 = (double)Model.StartSchacht.DeckelRechtsWert;
|
||||||
|
double x2 = (double)Model.EndSchacht.DeckelRechtsWert;
|
||||||
|
double y1 = (double)Model.StartSchacht.DeckelHochWert;
|
||||||
|
double y2 = (double)Model.EndSchacht.DeckelHochWert;
|
||||||
|
|
||||||
|
|
||||||
|
double length = Math.Sqrt(((x1 - x2) * (x1 - x2)) + ((y1 - y2) * (y1 - y2)));
|
||||||
|
Haltungslaenge = string.Format("{0:0.00}", length);
|
||||||
|
OnPropertyChanged(nameof(Haltungslaenge));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Abbruch(IRenavigator renavigator)
|
||||||
|
{
|
||||||
|
renavigator.Renavigate();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void ladeVerfuegbareSchaechte()
|
||||||
|
{
|
||||||
|
var s = await _schachtDataService.GetAllByProjekt(_actualState.ProjektID);
|
||||||
|
avaibleSchaechte = s.ToList();
|
||||||
|
int counter = 0;
|
||||||
|
foreach (var d in avaibleSchaechte)
|
||||||
|
{
|
||||||
|
if (d.Id == Model.StartSchacht.Id)
|
||||||
|
{
|
||||||
|
SelectedObenIndex = counter;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
counter++;
|
||||||
|
}
|
||||||
|
counter = 0;
|
||||||
|
foreach (var d in avaibleSchaechte)
|
||||||
|
{
|
||||||
|
if (d.Id == Model.EndSchacht.Id)
|
||||||
|
{
|
||||||
|
SelectedUntenIndex = counter;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
counter++;
|
||||||
|
}
|
||||||
|
OnPropertyChanged(nameof(AvSchaechte));
|
||||||
|
OnPropertyChanged(nameof(SelectedObenIndex));
|
||||||
|
OnPropertyChanged(nameof(SelectedUntenIndex));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,17 +1,12 @@
|
|||||||
using SewerStammGen.Shared.Contracts;
|
using SewerStammGen.Shared.Contracts;
|
||||||
using SewerStammGen.Shared.Domain;
|
using SewerStammGen.Shared.Domain;
|
||||||
using SewerStammGen.WPF.Commands;
|
using StammGenerator.Commands;
|
||||||
using SewerStammGen.WPF.Interface.Navigator;
|
using StammGenerator.Interface;
|
||||||
using SewerStammGen.WPF.ViewModel.State;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
namespace SewerStammGen.WPF.ViewModel
|
namespace StammGenerator.ViewModel
|
||||||
{
|
{
|
||||||
public class HaltungListViewModel : BaseViewModel
|
public class HaltungListViewModel : BaseViewModel
|
||||||
{
|
{
|
||||||
@@ -34,7 +29,8 @@ namespace SewerStammGen.WPF.ViewModel
|
|||||||
|
|
||||||
|
|
||||||
EditCommand = new HaltungEditCommand(actualState, renavigator, this);
|
EditCommand = new HaltungEditCommand(actualState, renavigator, this);
|
||||||
AddCommand = new HaltungAddCommand();
|
AddCommand = new HaltungAddCommand(actualState, renavigator);
|
||||||
|
|
||||||
|
|
||||||
LoadHaltungen();
|
LoadHaltungen();
|
||||||
}
|
}
|
||||||
@@ -1,13 +1,14 @@
|
|||||||
using Microsoft.Xaml.Behaviors;
|
//using Microsoft.Xaml.Behaviors;
|
||||||
using Syncfusion.UI.Xaml.Grid;
|
//using Syncfusion.UI.Xaml.Grid;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace SewerStammGen.WPF.Views
|
namespace StammGenerator.Views
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
public class TextBoxFilterAction : TargetedTriggerAction<SfMultiColumnDropDownControl>
|
public class TextBoxFilterAction : TargetedTriggerAction<SfMultiColumnDropDownControl>
|
||||||
{
|
{
|
||||||
protected override void Invoke(object parameter)
|
protected override void Invoke(object parameter)
|
||||||
@@ -15,4 +16,5 @@ namespace SewerStammGen.WPF.Views
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace SewerStammGen.WPF.ViewModel
|
namespace StammGenerator.ViewModel
|
||||||
{
|
{
|
||||||
public class HomeViewModel : BaseViewModel
|
public class HomeViewModel : BaseViewModel
|
||||||
{
|
{
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
using SewerStammGen.WPF.Commands;
|
|
||||||
using SewerStammGen.Enum;
|
using StammGenerator.Enum;
|
||||||
using SewerStammGen.WPF.Interface;
|
|
||||||
using SewerStammGen.WPF.Interface.Navigator;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -9,9 +8,12 @@ using System.Runtime.CompilerServices;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using SewerStammGen.WPF.ViewModel.State;
|
|
||||||
|
|
||||||
namespace SewerStammGen.WPF.ViewModel
|
using SewerStammGen.Shared.Domain;
|
||||||
|
using StammGenerator.Interface;
|
||||||
|
using StammGenerator.Commands;
|
||||||
|
|
||||||
|
namespace StammGenerator.ViewModel
|
||||||
{
|
{
|
||||||
public class MainWindowViewModel : BaseViewModel
|
public class MainWindowViewModel : BaseViewModel
|
||||||
{
|
{
|
||||||
@@ -41,16 +43,11 @@ namespace SewerStammGen.WPF.ViewModel
|
|||||||
|
|
||||||
_actualState = actualState;
|
_actualState = actualState;
|
||||||
|
|
||||||
_actualState.ProjektChanged += ActualState_ProjektChanged;
|
|
||||||
|
|
||||||
|
_actualState.ProjektChanged += ActualState_ProjektChanged;
|
||||||
|
_actualState.LoadLastProjekt();
|
||||||
|
|
||||||
Navigator.StateChanged += Navigator_StateChanged;
|
Navigator.StateChanged += Navigator_StateChanged;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#if DEBUG
|
|
||||||
_actualState.ProjektID = 5;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ActualState_ProjektChanged(object? sender, EventArgs e)
|
private void ActualState_ProjektChanged(object? sender, EventArgs e)
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
namespace SewerStammGen.WPF.ViewModel
|
namespace StammGenerator.ViewModel
|
||||||
{
|
{
|
||||||
public class ObservableObject : INotifyPropertyChanged
|
public class ObservableObject : INotifyPropertyChanged
|
||||||
{
|
{
|
||||||
172
StammGenerator/ViewModel/Projekt/ProjektEditViewModel.cs
Normal file
172
StammGenerator/ViewModel/Projekt/ProjektEditViewModel.cs
Normal file
@@ -0,0 +1,172 @@
|
|||||||
|
using SewerStammGen.DAL.Services.PostgresqlData;
|
||||||
|
using SewerStammGen.Shared.Contracts;
|
||||||
|
using SewerStammGen.Shared.Domain;
|
||||||
|
using Shared.Contracts;
|
||||||
|
|
||||||
|
using StammGenerator.Interface;
|
||||||
|
using StammGenerator.Views;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Input;
|
||||||
|
|
||||||
|
namespace StammGenerator.ViewModel
|
||||||
|
{
|
||||||
|
internal class ProjektEditViewModel : BaseViewModel
|
||||||
|
{
|
||||||
|
private Projekt _model;
|
||||||
|
private int ProjektID;
|
||||||
|
private readonly IDataService<Projekt> _projectDataService;
|
||||||
|
private readonly IAuftraggeberDataService _auftraggeberDataService;
|
||||||
|
private Auftraggeber auftraggeber = new Auftraggeber();
|
||||||
|
private readonly IRenavigator _renavigator;
|
||||||
|
private bool AuftraggeberChanged = false;
|
||||||
|
|
||||||
|
public ProjektSettingsViewModel ProjektSettingsViewModel { get; set; }
|
||||||
|
|
||||||
|
public ICommand Speichern { get; set; }
|
||||||
|
public ICommand AuftraggeberChange { get; set; }
|
||||||
|
|
||||||
|
public Auftraggeber Auftraggeber
|
||||||
|
{
|
||||||
|
get => _model.Auftraggeber;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if(_model.Auftraggeber == value) return;
|
||||||
|
_model.Auftraggeber = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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(IProjektDataService projektDataService,IAuftraggeberDataService auftraggeberDataService, IActualState actualState, IRenavigator renavigator)
|
||||||
|
{
|
||||||
|
_projectDataService = projektDataService;
|
||||||
|
_auftraggeberDataService = auftraggeberDataService;
|
||||||
|
_renavigator = renavigator;
|
||||||
|
|
||||||
|
ProjektID = actualState.ProjektID;
|
||||||
|
|
||||||
|
_model = new Projekt();
|
||||||
|
Speichern = new RelayCommand((x) => this.SaveProject());
|
||||||
|
AuftraggeberChange = new RelayCommand((x) => this.ChangeAuftraggeber());
|
||||||
|
this.ProjektSettingsViewModel = new ProjektSettingsViewModel();
|
||||||
|
|
||||||
|
|
||||||
|
LoadProjekt();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ChangeAuftraggeber()
|
||||||
|
{
|
||||||
|
var win = new AuftraggeberShow();
|
||||||
|
win.DataContext = new AuftraggeberEditFrmViewModel(_model.Auftraggeber, _auftraggeberDataService);
|
||||||
|
win.Closed += AuftraggeberWin_Closed;
|
||||||
|
win.ShowDialog();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AuftraggeberWin_Closed(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
OnPropertyChanged(nameof(Auftraggeber));
|
||||||
|
AuftraggeberShow? shw = sender as AuftraggeberShow;
|
||||||
|
if (shw == null) return;
|
||||||
|
AuftraggeberEditFrmViewModel? mdl = shw.DataContext as AuftraggeberEditFrmViewModel;
|
||||||
|
if (mdl == null) return;
|
||||||
|
if (mdl.SelectedAuftraggber == null) return;
|
||||||
|
|
||||||
|
if (!_model.Auftraggeber.Id.Equals(mdl.SelectedAuftraggber.Id))
|
||||||
|
{
|
||||||
|
_model.Auftraggeber = mdl.SelectedAuftraggber;
|
||||||
|
AuftraggeberChanged = true;
|
||||||
|
}
|
||||||
|
OnPropertyChanged(nameof(Auftraggeber));
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void LoadProjekt()
|
||||||
|
{
|
||||||
|
|
||||||
|
_model = await _projectDataService.Get(ProjektID);
|
||||||
|
if(_model == null)
|
||||||
|
{
|
||||||
|
_model = new Projekt()
|
||||||
|
{
|
||||||
|
Auftraggeber = new Auftraggeber(),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
this.ProjektSettingsViewModel.Projekt = _model;
|
||||||
|
OnPropertyChanged(nameof(ProjektName));
|
||||||
|
OnPropertyChanged(nameof(Erstelldatum));
|
||||||
|
OnPropertyChanged(nameof(Strasse));
|
||||||
|
OnPropertyChanged(nameof(Ort));
|
||||||
|
OnPropertyChanged(nameof(ProjektSettingsViewModel));
|
||||||
|
OnPropertyChanged(nameof(Auftraggeber));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SaveProject()
|
||||||
|
{
|
||||||
|
// TODO: Zur Zeit ohne Funktion da die Klasse so nicht bearbeitet wird. State geht verloren
|
||||||
|
//if (_model.AuftraggeberTemporar && !_model.Auftraggeber.DataChanged)
|
||||||
|
// ChangeAuftraggeber();
|
||||||
|
if (_model.Auftraggeber.DataChanged && !AuftraggeberChanged)
|
||||||
|
_auftraggeberDataService.Update(_model.Auftraggeber);
|
||||||
|
_projectDataService.Update(_model);
|
||||||
|
|
||||||
|
_renavigator.Renavigate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,19 +1,14 @@
|
|||||||
using SewerStammGen.Shared.Contracts;
|
using SewerStammGen.DAL.Services.PostgresqlData;
|
||||||
|
using SewerStammGen.Shared.Contracts;
|
||||||
using SewerStammGen.Shared.Domain;
|
using SewerStammGen.Shared.Domain;
|
||||||
using SewerStammGen.WPF.Commands;
|
using StammGenerator.Commands;
|
||||||
using SewerStammGen.WPF.Interface.Navigator;
|
using StammGenerator.Interface;
|
||||||
using SewerStammGen.WPF.ViewModel;
|
|
||||||
using SewerStammGen.WPF.ViewModel.State;
|
|
||||||
using Shared.Contracts;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
namespace SewerStammGen.WPF.ViewModel
|
namespace StammGenerator.ViewModel
|
||||||
{
|
{
|
||||||
public class ProjektListViewModel : BaseViewModel
|
public class ProjektListViewModel : BaseViewModel
|
||||||
{
|
{
|
||||||
@@ -28,7 +23,8 @@ namespace SewerStammGen.WPF.ViewModel
|
|||||||
public ICommand EditCommand { get; set; }
|
public ICommand EditCommand { get; set; }
|
||||||
|
|
||||||
private Projekt? _selectedProjekt;
|
private Projekt? _selectedProjekt;
|
||||||
|
public ICommand SchachtImportCommand { get; set; }
|
||||||
|
public ICommand DatenExportCommand { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public Projekt? SelectedProjekt
|
public Projekt? SelectedProjekt
|
||||||
@@ -45,7 +41,7 @@ namespace SewerStammGen.WPF.ViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ProjektListViewModel(IProjektDataService generic, IRenavigator renavigator,IActualState actualState)
|
public ProjektListViewModel(IProjektDataService generic, IHaltungDataService haltungDataService, ISchachtDataService schachtDataService, IActualState actualState, IRenavigator renavigator, IRenavigator navigatetoImport)
|
||||||
{
|
{
|
||||||
_projekte = new ObservableCollection<Projekt>();
|
_projekte = new ObservableCollection<Projekt>();
|
||||||
if (generic == null) throw new ArgumentNullException(nameof(generic));
|
if (generic == null) throw new ArgumentNullException(nameof(generic));
|
||||||
@@ -56,6 +52,12 @@ namespace SewerStammGen.WPF.ViewModel
|
|||||||
EditCommand = new ProjektEditCommand(generic, actualState, renavigator, this);
|
EditCommand = new ProjektEditCommand(generic, actualState, renavigator, this);
|
||||||
|
|
||||||
LoadProjekte();
|
LoadProjekte();
|
||||||
|
|
||||||
|
SchachtImportCommand = new RelayCommand((x) =>
|
||||||
|
{
|
||||||
|
navigatetoImport.Renavigate();
|
||||||
|
});
|
||||||
|
DatenExportCommand = new ProjectExportCommand(this, haltungDataService, schachtDataService);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void LoadProjekte()
|
private async void LoadProjekte()
|
||||||
137
StammGenerator/ViewModel/Projekt/ProjektSettingsViewModel.cs
Normal file
137
StammGenerator/ViewModel/Projekt/ProjektSettingsViewModel.cs
Normal file
@@ -0,0 +1,137 @@
|
|||||||
|
using SewerStammGen.Shared.Domain;
|
||||||
|
using SewerStammGen.Shared.Enum;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
|
||||||
|
namespace StammGenerator.ViewModel
|
||||||
|
{
|
||||||
|
|
||||||
|
public class ProjektSettingsViewModel : BaseViewModel
|
||||||
|
{
|
||||||
|
private Visibility _xmlVisible;
|
||||||
|
private Visibility _kandisVisible;
|
||||||
|
private ESelectedNorm _selectedNorm;
|
||||||
|
private EKodierungssystem _selectedKodier;
|
||||||
|
private Projekt _projekt = new Projekt();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public ESelectedNorm SelectedNorm
|
||||||
|
{
|
||||||
|
get => _selectedNorm;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if(_selectedNorm != value)
|
||||||
|
{
|
||||||
|
_selectedNorm = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public EExportType SelectedExport
|
||||||
|
{
|
||||||
|
get => _projekt.ExportType;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if(value != _projekt.ExportType)
|
||||||
|
{
|
||||||
|
_projekt.ExportType = value;
|
||||||
|
|
||||||
|
if (_projekt.ExportType == EExportType.KANDIS)
|
||||||
|
{
|
||||||
|
KandisVisible = Visibility.Visible;
|
||||||
|
XmlVisible = Visibility.Collapsed;
|
||||||
|
}
|
||||||
|
else if(_projekt.ExportType == EExportType.XML)
|
||||||
|
{
|
||||||
|
XmlVisible = Visibility.Visible;
|
||||||
|
KandisVisible = Visibility.Collapsed;
|
||||||
|
}
|
||||||
|
|
||||||
|
OnPropertyChanged();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public EKodierungssystem SelectedKodier
|
||||||
|
{
|
||||||
|
get => _selectedKodier;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if(_selectedKodier != value)
|
||||||
|
{
|
||||||
|
_selectedKodier = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public Visibility XmlVisible
|
||||||
|
{
|
||||||
|
get => _xmlVisible;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if(_xmlVisible != value)
|
||||||
|
{
|
||||||
|
_xmlVisible = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public Visibility KandisVisible
|
||||||
|
{
|
||||||
|
get => _kandisVisible;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if(_kandisVisible != value)
|
||||||
|
{
|
||||||
|
_kandisVisible = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public Projekt Projekt
|
||||||
|
{
|
||||||
|
get => _projekt;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if(value != _projekt)
|
||||||
|
{
|
||||||
|
_projekt = value;
|
||||||
|
//SelectedExport = _projekt.ExportType;
|
||||||
|
if(_projekt.ExportType == EExportType.KANDIS)
|
||||||
|
{
|
||||||
|
_kandisVisible = Visibility.Visible;
|
||||||
|
_xmlVisible = Visibility.Collapsed;
|
||||||
|
}
|
||||||
|
else if(_projekt.ExportType == EExportType.XML)
|
||||||
|
{
|
||||||
|
_xmlVisible = Visibility.Visible;
|
||||||
|
_kandisVisible = Visibility.Collapsed;
|
||||||
|
}
|
||||||
|
OnPropertyChanged();
|
||||||
|
OnPropertyChanged(nameof(SelectedNorm));
|
||||||
|
OnPropertyChanged(nameof(SelectedExport));
|
||||||
|
OnPropertyChanged(nameof(KandisVisible));
|
||||||
|
OnPropertyChanged(nameof(XmlVisible));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public ProjektSettingsViewModel()
|
||||||
|
{
|
||||||
|
//SelectedExport = EExportType.XML;
|
||||||
|
//this.Projekt = new Projekt();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,7 +6,7 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
namespace SewerStammGen.WPF.ViewModel
|
namespace StammGenerator.ViewModel
|
||||||
{
|
{
|
||||||
[Serializable]
|
[Serializable]
|
||||||
class RelayCommand : ICommand
|
class RelayCommand : ICommand
|
||||||
@@ -1,16 +1,10 @@
|
|||||||
using SewerStammGen.Shared.Contracts;
|
using SewerStammGen.Shared.Contracts;
|
||||||
using SewerStammGen.Shared.Domain;
|
using SewerStammGen.Shared.Domain;
|
||||||
using SewerStammGen.WPF.Interface.Navigator;
|
using SewerStammGen.Shared.Enum;
|
||||||
using SewerStammGen.WPF.ViewModel.State;
|
using StammGenerator.Interface;
|
||||||
using Shared.Contracts;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
namespace SewerStammGen.WPF.ViewModel
|
namespace StammGenerator.ViewModel
|
||||||
{
|
{
|
||||||
public class ManholeEditViewModel : BaseViewModel
|
public class ManholeEditViewModel : BaseViewModel
|
||||||
{
|
{
|
||||||
@@ -36,25 +30,25 @@ namespace SewerStammGen.WPF.ViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public decimal RechtsWert
|
public decimal DeckelRechtsWert
|
||||||
{
|
{
|
||||||
get => _model.RechtsWert;
|
get => _model.DeckelRechtsWert;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if(_model.RechtsWert != value)
|
if(_model.DeckelRechtsWert != value)
|
||||||
{
|
{
|
||||||
_model.RechtsWert = value;
|
_model.DeckelRechtsWert = value;
|
||||||
OnPropertyChanged();
|
OnPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public decimal HochWert
|
public decimal DeckelHochWert
|
||||||
{
|
{
|
||||||
get => _model.HochWert; set
|
get => _model.DeckelHochWert; set
|
||||||
{
|
{
|
||||||
if (_model.HochWert != value)
|
if (_model.DeckelHochWert != value)
|
||||||
{
|
{
|
||||||
_model.HochWert = value;
|
_model.DeckelHochWert = value;
|
||||||
OnPropertyChanged();
|
OnPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -71,6 +65,30 @@ namespace SewerStammGen.WPF.ViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public decimal SohlHochWert
|
||||||
|
{
|
||||||
|
get => _model.SohlHochWert;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if(_model.SohlHochWert != value)
|
||||||
|
{
|
||||||
|
_model.SohlHochWert = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public decimal SohlRechtsWert
|
||||||
|
{
|
||||||
|
get => _model.SohlRechtsWert;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if(_model.SohlRechtsWert != value)
|
||||||
|
{
|
||||||
|
_model.SohlRechtsWert = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
public decimal SohlHoehe
|
public decimal SohlHoehe
|
||||||
{
|
{
|
||||||
get => _model.SohlHoehe;
|
get => _model.SohlHoehe;
|
||||||
@@ -83,6 +101,30 @@ namespace SewerStammGen.WPF.ViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public string Vermesser
|
||||||
|
{
|
||||||
|
get => _model.Vermesser;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if(_model.Vermesser != value)
|
||||||
|
{
|
||||||
|
_model.Vermesser = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public string AufnahmeDatum
|
||||||
|
{
|
||||||
|
get => _model.AufnahmeDatum;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if(_model.AufnahmeDatum != value)
|
||||||
|
{
|
||||||
|
_model.AufnahmeDatum = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
public EEntwaeserung Entwaeserung
|
public EEntwaeserung Entwaeserung
|
||||||
{
|
{
|
||||||
get => _model.Entwaesserung;
|
get => _model.Entwaesserung;
|
||||||
@@ -96,6 +138,19 @@ namespace SewerStammGen.WPF.ViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ESchachtType SchachtType
|
||||||
|
{
|
||||||
|
get => _model.SchachtType;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if(_model.SchachtType != value)
|
||||||
|
{
|
||||||
|
_model.SchachtType = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public ManholeEditViewModel(ISchachtDataService schachtDataService,IActualState actualState, IRenavigator renavigator)
|
public ManholeEditViewModel(ISchachtDataService schachtDataService,IActualState actualState, IRenavigator renavigator)
|
||||||
{
|
{
|
||||||
_schachtDataService = schachtDataService;
|
_schachtDataService = schachtDataService;
|
||||||
@@ -106,6 +161,11 @@ namespace SewerStammGen.WPF.ViewModel
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ManholeEditViewModel()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private async void SaveSchacht()
|
private async void SaveSchacht()
|
||||||
{
|
{
|
||||||
if (_model.Id == 0)
|
if (_model.Id == 0)
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user