-a
This commit is contained in:
@@ -5,6 +5,12 @@
|
||||
<ProjectReference Include="..\Models\Models.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="vorlage.txt">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -78,16 +78,16 @@ namespace ProtokollWriter {
|
||||
hashtable["AUFTRAGGEBER_NAME"] = inspObjekt.Bauvorhaben.Auftraggeber.Name;
|
||||
hashtable["AUFTRAGGEBER_STRASSE"] = inspObjekt.Bauvorhaben.Auftraggeber.Strasse;
|
||||
hashtable["AUFTRAGGEBER_ORT"] = inspObjekt.Bauvorhaben.Auftraggeber.Ort;
|
||||
hashtable["AUFTRAGGEBER_TEL"] = inspObjekt.Bauvorhaben.Auftraggeber.Tel;
|
||||
hashtable["VONSCHACHT"] = inspObjekt.ObereSchacht;
|
||||
hashtable["BISSCHACHT"] = inspObjekt.UntereSchacht;
|
||||
hashtable["AUFTRAGGEBER_TEL"] = inspObjekt.Bauvorhaben.Auftraggeber.Tel != null ? inspObjekt.Bauvorhaben.Auftraggeber.Tel: "";
|
||||
hashtable["VONSCHACHT"] = inspObjekt.ObereSchacht != null? inspObjekt.ObereSchacht: "";
|
||||
hashtable["BISSCHACHT"] = inspObjekt.UntereSchacht != null? inspObjekt.UntereSchacht: "";
|
||||
hashtable["PROJEKTNR"] = "000";//Projektnummer;
|
||||
hashtable["HALTUNGNR"] = inspObjekt.Objektname != null ? inspObjekt.Objektname : inspObjekt.ObereSchacht;
|
||||
hashtable["MESSDATEI"] = inspObjekt.Objektname != null ? inspObjekt.Objektname : inspObjekt.ObereSchacht;
|
||||
hashtable["BAUVORHABEN_STRASSE"] = inspObjekt.Bauvorhaben.Strasse;
|
||||
hashtable["BAUVORHABEN_ORT"] = inspObjekt.Bauvorhaben.Ort;
|
||||
hashtable["BAUVORHABEN_STANDORT"] = inspObjekt.Bauvorhaben.Strasse;
|
||||
hashtable["BEMERKUNG"] = inspObjekt.Bemerkung;
|
||||
hashtable["BEMERKUNG"] = inspObjekt.Bemerkung != null? inspObjekt.Bemerkung : "";
|
||||
hashtable["PRUEFRESULTAT"] = "Cool";//inspObjekt.PressureTests[prüfungsnummer].Bestanden ? "Prüfung Bestanden" : "Prüfung N I C H T Bestanden";
|
||||
}
|
||||
void WriteFile() {
|
||||
@@ -99,7 +99,7 @@ namespace ProtokollWriter {
|
||||
int ende = zeile.IndexOf("}");
|
||||
string cmd = zeile.Substring(start+1,(ende-start) -1);
|
||||
|
||||
if(hashtable.ContainsKey(cmd)) {
|
||||
if(cmd != null && hashtable.ContainsKey(cmd)) {
|
||||
string rep = "{"+cmd+"}";
|
||||
string n = zeile.Replace(rep,hashtable[cmd].ToString());
|
||||
zeile = n;
|
||||
@@ -107,9 +107,9 @@ namespace ProtokollWriter {
|
||||
if(cmd.StartsWith("@")) {
|
||||
string n = "";
|
||||
|
||||
//foreach(MeasureData data in inspObjekt.PressureTests[prüfungsnummer].Measuredatas) {
|
||||
// n = string.Format("{0}{1} = {2};{3};{4};{5}\r\n",n,data.EintragID,data.EintragID+2,data.Datum,data.Pressure,data.MeasureType);
|
||||
//}
|
||||
foreach(MeasureData data in inspObjekt.pressureTests[prüfungsnummer].Measuredatas) {
|
||||
n = string.Format("{0}{1} = {2};{3};{4};{5}\r\n",n,data.EintragID,data.EintragID+2,data.Datum,data.Pressure,(int)data.MeasureType);
|
||||
}
|
||||
zeile = n;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user