diff --git a/SanSystem/MassenStatistik.cs b/SanSystem/MassenStatistik.cs index 200084f..78b8720 100644 --- a/SanSystem/MassenStatistik.cs +++ b/SanSystem/MassenStatistik.cs @@ -25,6 +25,10 @@ namespace SanSystem BuildBericht(SearchForWaranties()); } + static string ConvertToDecimals(double input, uint kommazahl = 2) + { + return input.ToString("0.00"); + } void BuildBericht(List list) { @@ -38,17 +42,20 @@ namespace SanSystem { DataRow dr = inliner.NewRow(); dr["hausnummer"] = objekt.Hausnummer; - if(objekt.HaltungGemessen.Day == targetDatum.Day && + /*if(objekt.HaltungGemessen.Day == targetDatum.Day && objekt.HaltungGemessen.Month == targetDatum.Month && objekt.HaltungGemessen.Year == targetDatum.Year) - { + /*{ dr["vorbereitet"] = "ja"; } else { dr["vorbereitet"] = "nein am " + objekt.HaltungGemessen.ToShortDateString(); - } + }*/ + //{ + dr["vorbereitet"] = "am " + objekt.HaltungGemessen.ToShortDateString(); + //} int schachtanbindungen = 0; foreach (Sanieren mainsan in objekt.Sanierung) { @@ -62,10 +69,10 @@ namespace SanSystem { double linerLang = objekt.Haltungslaenge + objekt.Schachtlaenge + 0.5; gesamtLiner += linerLang; - dr["liner_laenge"] = linerLang; - dr["kalibrierschlauch"] = objekt.Haltungslaenge + (objekt.Schachtlaenge * 2) + 0.3; - dr["preliner"] = linerLang - 0.5; - dr["harzmenge"] = linerLang * (mainsan as InlinerSanierung).HarzBedarf; + dr["liner_laenge"] = ConvertToDecimals(linerLang); + dr["kalibrierschlauch"] = ConvertToDecimals(objekt.Haltungslaenge + (objekt.Schachtlaenge * 2) + 0.3); + dr["preliner"] = ConvertToDecimals(linerLang - 0.5); + dr["harzmenge"] = ConvertToDecimals(linerLang * (mainsan as InlinerSanierung).HarzBedarf); gesamtHarz += linerLang * (mainsan as InlinerSanierung).Harzbedarf; } if (mainsan is SchachtAnbindung) @@ -78,8 +85,8 @@ namespace SanSystem inliner.Rows.Add(dr); } - grundDaten["gesamtHarz"] = gesamtHarz; - grundDaten["gesamtliner"] = gesamtLiner; + grundDaten["gesamtHarz"] = ConvertToDecimals(gesamtHarz); + grundDaten["gesamtliner"] = ConvertToDecimals(gesamtLiner); grundDaten["Ausdruck_datum"] = targetDatum.ToLongDateString(); grundDaten["Ort"] = inspektionsobjekts.Last().OrtName; grundDaten["Strasse"] = inspektionsobjekts.Last().StrasseName; diff --git a/SanSystem/UCInliner.cs b/SanSystem/UCInliner.cs index 234aecd..4e2d52e 100644 --- a/SanSystem/UCInliner.cs +++ b/SanSystem/UCInliner.cs @@ -169,6 +169,7 @@ namespace SanSystem newClient.DeleteFile(file); } + MessageBox.Show("Daten wurden heruntergeladen und von der Anlage gelöscht", "Fertig", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (TimeoutException ex) { diff --git a/SanSystem/documents/JUME/KalibrierungAuflistung.docx b/SanSystem/documents/JUME/KalibrierungAuflistung.docx index 9859345..34fb5df 100644 Binary files a/SanSystem/documents/JUME/KalibrierungAuflistung.docx and b/SanSystem/documents/JUME/KalibrierungAuflistung.docx differ diff --git a/SanSystem/documents/JUME/Massenstatistik.docx b/SanSystem/documents/JUME/Massenstatistik.docx index b3a0b9e..e2a4f4c 100644 Binary files a/SanSystem/documents/JUME/Massenstatistik.docx and b/SanSystem/documents/JUME/Massenstatistik.docx differ