Merge branch 'ChargeEinbauOverview'
This commit is contained in:
@@ -47,6 +47,7 @@
|
|||||||
<Compile Include="Collections\ImprägnierBericht.cs" />
|
<Compile Include="Collections\ImprägnierBericht.cs" />
|
||||||
<Compile Include="Collections\Projekte.cs" />
|
<Compile Include="Collections\Projekte.cs" />
|
||||||
<Compile Include="DB.cs" />
|
<Compile Include="DB.cs" />
|
||||||
|
<Compile Include="LinerChargen.cs" />
|
||||||
<Compile Include="Sanierung\Renovation\AbstractImprägnier.cs" />
|
<Compile Include="Sanierung\Renovation\AbstractImprägnier.cs" />
|
||||||
<Compile Include="Collections\AbwasserTechnischeAnlage.cs" />
|
<Compile Include="Collections\AbwasserTechnischeAnlage.cs" />
|
||||||
<Compile Include="Sanierung\Renovation\UVAnlagenTyp.cs" />
|
<Compile Include="Sanierung\Renovation\UVAnlagenTyp.cs" />
|
||||||
|
|||||||
41
KlassenBIB/LinerChargen.cs
Normal file
41
KlassenBIB/LinerChargen.cs
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace KlassenBIB
|
||||||
|
{
|
||||||
|
public static class LinerChargen
|
||||||
|
{
|
||||||
|
public static Dictionary<string, List<string>> GenLinerChargenOverview(List<Projekt> ProjektListe)
|
||||||
|
{
|
||||||
|
Dictionary<string, List<string>> Daten = new Dictionary<string, List<string>>();
|
||||||
|
foreach(Projekt projekt in ProjektListe)
|
||||||
|
{
|
||||||
|
foreach(Inspektionsobjekt objekt in projekt.Objekte)
|
||||||
|
{
|
||||||
|
foreach(Sanierung sanierung in objekt.Sanierung)
|
||||||
|
{
|
||||||
|
if (!(sanierung is InlinerSanierung)) continue;
|
||||||
|
|
||||||
|
if (!((sanierung as InlinerSanierung).Imprägnierungsbericht is WerkseitigImprägniert)) continue;
|
||||||
|
|
||||||
|
WerkseitigImprägniert imprignierung = ((sanierung as InlinerSanierung).Imprägnierungsbericht as WerkseitigImprägniert);
|
||||||
|
string datenbezeichnung = projekt.Nummer + " # " + objekt.Objektbezeichnung;
|
||||||
|
if (Daten.ContainsKey(imprignierung.Imprägniernummer))
|
||||||
|
{
|
||||||
|
Daten[imprignierung.Imprägniernummer].Add(datenbezeichnung);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Daten.Add(imprignierung.Imprägniernummer, new List<string>() { datenbezeichnung });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return Daten;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -289,8 +289,30 @@ namespace SanSystem
|
|||||||
|
|
||||||
private void VerbrauchToolStripMenuItem_Click(object sender, EventArgs e)
|
private void VerbrauchToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
FrmGetDataFromBluelight frmGetDataFromBluelight = new FrmGetDataFromBluelight();
|
/*FrmGetDataFromBluelight frmGetDataFromBluelight = new FrmGetDataFromBluelight();
|
||||||
frmGetDataFromBluelight.ShowDialog();
|
frmGetDataFromBluelight.ShowDialog();*/
|
||||||
|
Dictionary<string,List<string>> daten = KlassenBIB.LinerChargen.GenLinerChargenOverview(Datenbank.Instance.TeufelDB.Projekte);
|
||||||
|
List<string> content = new List<string>();
|
||||||
|
foreach (KeyValuePair<string, List<string>> x in daten)
|
||||||
|
{
|
||||||
|
content.Add(x.Key);
|
||||||
|
|
||||||
|
content.Add("================");
|
||||||
|
foreach(string values in x.Value)
|
||||||
|
{
|
||||||
|
content.Add(values);
|
||||||
|
}
|
||||||
|
content.Add("##############");
|
||||||
|
}
|
||||||
|
|
||||||
|
string[] datencontent = new string[content.Count];
|
||||||
|
for(int i = 0; i < content.Count; i++)
|
||||||
|
{
|
||||||
|
datencontent[i] = content[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
File.WriteAllLines("linercharges.txt", datencontent);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user