Es können jetzt von xml 2006 importiert werden
This commit is contained in:
@@ -21,11 +21,12 @@ namespace BerichtGen
|
||||
/// <summary>
|
||||
/// Erstellt
|
||||
/// </summary>
|
||||
/// <param name="vorlage">Die zuverwendete Vorlagenname</param>
|
||||
/// <param name="documentname">Die name zum Speichern der Datei</param>
|
||||
/// <param name="source">Die zuverwendete Vorlagenname</param>
|
||||
/// <param name="savepath">Pfad zum Speichern</param>
|
||||
/// <param name="daten">Inhalt vom Dokument </param>
|
||||
/// <param name="erzeugeDoc">Ein doc datei soll erzeugt werden</param>
|
||||
/// <param name="filename"></param>
|
||||
/// <param name="bilderObjects">Zur zeit ohne Implementierung</param>
|
||||
/// <param name="tableContents">Für Tabellen anzeige</param>
|
||||
/// <param name="erzeugeDOC">Ein doc datei soll erzeugt werden</param>
|
||||
/// <param name="erzeugePDF">Ein Pdf datei soll erzeugt werden</param>
|
||||
public void Erzeuge(string source, string savepath,string filename, Hashtable daten,List<BilderObject> bilderObjects,DataTable tableContents, bool erzeugeDOC = false , bool erzeugePDF = true)
|
||||
{
|
||||
|
||||
@@ -26,6 +26,16 @@ namespace BerichtGen
|
||||
List<BilderObject> bilderObjects;
|
||||
|
||||
DataTable tableContent = null;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="firma"></param>
|
||||
/// <param name="vorlage"></param>
|
||||
/// <param name="speicherpfad"></param>
|
||||
/// <param name="filename"></param>
|
||||
/// <param name="grunddaten"></param>
|
||||
/// <param name="bilderObjects"></param>
|
||||
/// <param name="tableContent"></param>
|
||||
public FrmOptions(string firma, string vorlage, string speicherpfad,string filename, Hashtable grunddaten, List<BilderObject> bilderObjects, DataTable tableContent = null)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
@@ -10,9 +10,16 @@ using System.Windows.Forms;
|
||||
|
||||
namespace BerichtGen
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public partial class FrmPDFViewer : Form
|
||||
{
|
||||
string pfad;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="pfad"></param>
|
||||
public FrmPDFViewer(string pfad)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
@@ -6,6 +6,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class AbwasserTechnischeAnlageCollection : List<Inspektionsobjekt>
|
||||
{
|
||||
}
|
||||
|
||||
@@ -6,6 +6,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class BilderCollection : List<SavedBilder>
|
||||
{
|
||||
}
|
||||
|
||||
28
KlassenBIB/IImportedObjekte.cs
Normal file
28
KlassenBIB/IImportedObjekte.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface zur Import von Daten
|
||||
/// </summary>
|
||||
public interface IImportedObjekte
|
||||
{
|
||||
/// <summary>
|
||||
/// Angaben zur XMLDatei die importiert werden soll
|
||||
/// </summary>
|
||||
string XMLFile { get; set; }
|
||||
/// <summary>
|
||||
/// Angaben zur Projektnummern die eingetragen werden soll in die Objekte
|
||||
/// </summary>
|
||||
string Projektnummer { get; set; }
|
||||
/// <summary>
|
||||
/// Funktion der die Inspektionsobjekte übergibt
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
List<Inspektionsobjekt> GetInspektionsobjekte();
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,10 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
/// <summary>
|
||||
/// Inliner class
|
||||
///
|
||||
/// </summary>
|
||||
public sealed class InlinerSanierung : Sanieren, IMakeProtokol
|
||||
{
|
||||
double kalibrierUnterdruck = -0.5;
|
||||
|
||||
@@ -6,18 +6,58 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class Inspektionskuerzeln
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public decimal Station { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Hauptkode { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Charakterisierung1 { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Charakterisierung2 { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public uint Quantifizierung1 { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public uint Quantifizierung2 { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public uint LageAmUmfangStart { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public uint LageAmUmfangEnde { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool ImVerbindung { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FotoReferenz { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string VideoReferenz { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Anmerkung { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Browsable(false)]
|
||||
public class InspektionskuerzelnCollection : List<Inspektionskuerzeln>
|
||||
{
|
||||
|
||||
@@ -7,27 +7,76 @@ using System.Windows.Markup;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[ContentProperty("Sanierung")]
|
||||
public class Inspektionsobjekt
|
||||
{
|
||||
private string strasseName = "none";
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string StrasseName { get => strasseName; set => strasseName = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string OrtName { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Hausnummer { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Projektnummer { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Objektbezeichnung { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string VonPunkt { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string BisPunkt { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string RohrMaterial { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public uint Kanalrohrweite { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public double Haltungslaenge { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public double Schachtlaenge { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime HaltungGemessen { get; set; }
|
||||
public InspektionskuerzelnCollection Schadenskuerzeln { get; private set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public InspektionskuerzelnCollection Schadenskuerzeln { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Bemerkung { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public SanierungCollection Sanierung { get;set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public Inspektionsobjekt()
|
||||
{
|
||||
Schadenskuerzeln = new InspektionskuerzelnCollection();
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="AbwasserTechnischeAnlageCollection.cs" />
|
||||
<Compile Include="BilderCollection.cs" />
|
||||
<Compile Include="IImportedObjekte.cs" />
|
||||
<Compile Include="InlinerSanierung.cs" />
|
||||
<Compile Include="Projekt.cs" />
|
||||
<Compile Include="Inspektionskuerzeln.cs" />
|
||||
|
||||
@@ -8,13 +8,27 @@ using System.Windows.Markup;
|
||||
[assembly: XmlnsDefinition("http://schemas.cosysda.de/sanVerwaltung/xaml","KlassenBIB")]
|
||||
namespace KlassenBIB
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[ContentProperty("Objekte")]
|
||||
public class Projekt
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Nummer { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Ort { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public AbwasserTechnischeAnlageCollection Objekte { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public Projekt()
|
||||
{
|
||||
Objekte = new AbwasserTechnischeAnlageCollection();
|
||||
|
||||
@@ -28,6 +28,9 @@ namespace KlassenBIB
|
||||
Inspektionsobjekt inspektionsobjekt;
|
||||
protected string pfadZurSan;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Browsable(false)]
|
||||
public Sanierung()
|
||||
{
|
||||
@@ -36,9 +39,16 @@ namespace KlassenBIB
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="projektpfad"></param>
|
||||
/// <returns></returns>
|
||||
public abstract string CheckVerzeichnisse(string projektpfad);
|
||||
//public Guid Guid { get => guid; set => guid = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public double TempAusen
|
||||
{
|
||||
get => tempAusen;
|
||||
@@ -52,14 +62,41 @@ namespace KlassenBIB
|
||||
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public double TempKanal { get => tempKanal; set => tempKanal = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Wetter { get => wetter; set => wetter = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool GenehmigungVorhanden { get => genehmigungVorhanden; set => genehmigungVorhanden = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool WasserhaltungEingerichtet { get => wasserhaltungEingerichtet; set => wasserhaltungEingerichtet = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool STVOAbsicherung { get => sTVOAbsicherung; set => sTVOAbsicherung = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool HDReinigung { get => hDReinigung; set => hDReinigung = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime HDReinigungDatum { get => hDReinigungDatum; set => hDReinigungDatum = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public Inspektionsobjekt Inspektionsobjekt { get => inspektionsobjekt; set => inspektionsobjekt = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
protected string PfadZurSan {
|
||||
get
|
||||
{
|
||||
@@ -67,7 +104,9 @@ namespace KlassenBIB
|
||||
}
|
||||
}
|
||||
//public DateTime SanierungsDatum { get => sanierungsDatum; set => sanierungsDatum = value; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
private void NotifyPropertyChanged([CallerMemberName] string propertyName = null)
|
||||
{
|
||||
|
||||
@@ -6,12 +6,26 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class SavedBilder
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Bildname { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Speicherpfad { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Bemerkung { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public override string ToString()
|
||||
{
|
||||
return Bildname;
|
||||
|
||||
@@ -7,23 +7,36 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace KlassenBIB
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class SchachtAnbindung : Sanieren
|
||||
{
|
||||
string schachtNummer;
|
||||
BilderCollection savedBilders;
|
||||
|
||||
#region GettersSetters
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string SchachtNummer { get => schachtNummer; set => schachtNummer = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public BilderCollection SavedBilders { get => savedBilders; set => savedBilders = value; }
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public SchachtAnbindung()
|
||||
{
|
||||
Verzeichnispfad = "Schachtanbindung";
|
||||
SavedBilders = new BilderCollection();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public override string CheckVerzeichnisse(string projektpfad)
|
||||
{
|
||||
string path = Path.Combine(projektpfad, PfadZurSan);
|
||||
|
||||
@@ -22,6 +22,7 @@ namespace KlassenBIB.Tests
|
||||
[TestMethod()]
|
||||
public void XAMLSerializeTest()
|
||||
{
|
||||
/*
|
||||
Projekt projekt = new Projekt();
|
||||
projekt.Nummer = "16/219";
|
||||
projekt.Ort = "Oldenburg";
|
||||
@@ -68,6 +69,7 @@ namespace KlassenBIB.Tests
|
||||
|
||||
|
||||
XamlServices.Save("projekt1.xaml", projekt);
|
||||
*/
|
||||
}
|
||||
[TestMethod()]
|
||||
public void InspektionsobjektTest()
|
||||
|
||||
@@ -6,10 +6,22 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace SanShared
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class BilderObject
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Kommentar { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Path { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int ImgID { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,20 +7,37 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace SanShared.Exceptions
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class LangNotFoundException : Exception
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public LangNotFoundException()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
public LangNotFoundException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
/// <param name="innerException"></param>
|
||||
public LangNotFoundException(string message, Exception innerException) : base(message, innerException)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="context"></param>
|
||||
protected LangNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -6,9 +6,18 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace SanShared
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public interface ILanguage
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
Dictionary<string, string> Fehlermeldungen { get; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
Dictionary<string, string> Labels { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,8 +7,16 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace SanShared
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public interface IMakeProtokol
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="destinationPath"></param>
|
||||
/// <returns></returns>
|
||||
Hashtable MakeProtokoll(string destinationPath);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,16 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace SanShared
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public interface ITemperature
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
/// <returns></returns>
|
||||
double GetTemperatur(out string message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,14 +6,25 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace SanShared
|
||||
{
|
||||
/// <summary>
|
||||
/// CSV Dateistruktur
|
||||
/// </summary>
|
||||
public class UVcsvStrukture
|
||||
{
|
||||
DateTime zeitstempel;
|
||||
double temperatur;
|
||||
double druck;
|
||||
|
||||
/// <summary>
|
||||
/// Zeitstempel vom Eintrag
|
||||
/// </summary>
|
||||
public DateTime Zeitstempel { get => zeitstempel; set => zeitstempel = value; }
|
||||
/// <summary>
|
||||
/// Temperatur anzeige vom Eintrag
|
||||
/// </summary>
|
||||
public double Temperatur { get => temperatur; set => temperatur = value; }
|
||||
/// <summary>
|
||||
/// Druckanzeige vom Eintrag
|
||||
/// </summary>
|
||||
public double Druck { get => druck; set => druck = value; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,6 +249,10 @@
|
||||
<Project>{c949087e-20e1-4a17-b021-faead363c1d8}</Project>
|
||||
<Name>SanShared</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\SchnittstelleImporter\SchnittstelleImporter.csproj">
|
||||
<Project>{E1564A4D-39FD-489B-8029-AEEF33033EF2}</Project>
|
||||
<Name>SchnittstelleImporter</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\TempCAN\TempCAN.csproj">
|
||||
<Project>{e4979419-5eae-4b6d-a6a0-9632c1de87a0}</Project>
|
||||
<Name>TempCAN</Name>
|
||||
|
||||
30
SanSystem/frmMain.Designer.cs
generated
30
SanSystem/frmMain.Designer.cs
generated
@@ -33,9 +33,10 @@
|
||||
this.neuToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.öffnenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.speichernToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.massenstatistikToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
this.toolStripStatus_projekt_Label = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.massenstatistikToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.stammdatenImportierenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mainmenu.SuspendLayout();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
@@ -57,7 +58,8 @@
|
||||
//
|
||||
this.projektToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.neuToolStripMenuItem,
|
||||
this.öffnenToolStripMenuItem});
|
||||
this.öffnenToolStripMenuItem,
|
||||
this.stammdatenImportierenToolStripMenuItem});
|
||||
this.projektToolStripMenuItem.Name = "projektToolStripMenuItem";
|
||||
this.projektToolStripMenuItem.Size = new System.Drawing.Size(56, 20);
|
||||
this.projektToolStripMenuItem.Text = "Projekt";
|
||||
@@ -65,14 +67,14 @@
|
||||
// neuToolStripMenuItem
|
||||
//
|
||||
this.neuToolStripMenuItem.Name = "neuToolStripMenuItem";
|
||||
this.neuToolStripMenuItem.Size = new System.Drawing.Size(111, 22);
|
||||
this.neuToolStripMenuItem.Size = new System.Drawing.Size(207, 22);
|
||||
this.neuToolStripMenuItem.Text = "Neu";
|
||||
this.neuToolStripMenuItem.Click += new System.EventHandler(this.neuToolStripMenuItem_Click);
|
||||
//
|
||||
// öffnenToolStripMenuItem
|
||||
//
|
||||
this.öffnenToolStripMenuItem.Name = "öffnenToolStripMenuItem";
|
||||
this.öffnenToolStripMenuItem.Size = new System.Drawing.Size(111, 22);
|
||||
this.öffnenToolStripMenuItem.Size = new System.Drawing.Size(207, 22);
|
||||
this.öffnenToolStripMenuItem.Text = "Öffnen";
|
||||
this.öffnenToolStripMenuItem.Click += new System.EventHandler(this.öffnenToolStripMenuItem_Click);
|
||||
//
|
||||
@@ -83,6 +85,13 @@
|
||||
this.speichernToolStripMenuItem.Text = "Speichern";
|
||||
this.speichernToolStripMenuItem.Click += new System.EventHandler(this.speichernToolStripMenuItem_Click);
|
||||
//
|
||||
// massenstatistikToolStripMenuItem
|
||||
//
|
||||
this.massenstatistikToolStripMenuItem.Name = "massenstatistikToolStripMenuItem";
|
||||
this.massenstatistikToolStripMenuItem.Size = new System.Drawing.Size(99, 20);
|
||||
this.massenstatistikToolStripMenuItem.Text = "Massenstatistik";
|
||||
this.massenstatistikToolStripMenuItem.Click += new System.EventHandler(this.massenstatistikToolStripMenuItem_Click);
|
||||
//
|
||||
// statusStrip1
|
||||
//
|
||||
this.statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||||
@@ -100,12 +109,12 @@
|
||||
this.toolStripStatus_projekt_Label.Size = new System.Drawing.Size(44, 17);
|
||||
this.toolStripStatus_projekt_Label.Text = "Projekt";
|
||||
//
|
||||
// massenstatistikToolStripMenuItem
|
||||
// stammdatenImportierenToolStripMenuItem
|
||||
//
|
||||
this.massenstatistikToolStripMenuItem.Name = "massenstatistikToolStripMenuItem";
|
||||
this.massenstatistikToolStripMenuItem.Size = new System.Drawing.Size(99, 20);
|
||||
this.massenstatistikToolStripMenuItem.Text = "Massenstatistik";
|
||||
this.massenstatistikToolStripMenuItem.Click += new System.EventHandler(this.massenstatistikToolStripMenuItem_Click);
|
||||
this.stammdatenImportierenToolStripMenuItem.Name = "stammdatenImportierenToolStripMenuItem";
|
||||
this.stammdatenImportierenToolStripMenuItem.Size = new System.Drawing.Size(207, 22);
|
||||
this.stammdatenImportierenToolStripMenuItem.Text = "Stammdaten importieren";
|
||||
this.stammdatenImportierenToolStripMenuItem.Click += new System.EventHandler(this.stammdatenImportierenToolStripMenuItem_Click);
|
||||
//
|
||||
// frmMain
|
||||
//
|
||||
@@ -116,7 +125,7 @@
|
||||
this.Controls.Add(this.mainmenu);
|
||||
this.IsMdiContainer = true;
|
||||
this.MainMenuStrip = this.mainmenu;
|
||||
this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.Name = "frmMain";
|
||||
this.Text = "Kanalsanierungsverwaltung";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frm_main_FormClosing);
|
||||
@@ -140,6 +149,7 @@
|
||||
private System.Windows.Forms.ToolStripStatusLabel toolStripStatus_projekt_Label;
|
||||
private System.Windows.Forms.ToolStripMenuItem speichernToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem massenstatistikToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem stammdatenImportierenToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using Database;
|
||||
using FluentFTP;
|
||||
using KlassenBIB;
|
||||
using SchnittstelleImporter;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
@@ -108,5 +109,13 @@ namespace SanSystem
|
||||
FrmSelectMassenDate frmSelectMassenDate = new FrmSelectMassenDate();
|
||||
frmSelectMassenDate.ShowDialog();
|
||||
}
|
||||
|
||||
private void stammdatenImportierenToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
IImportedObjekte importedObjekte = new Import();
|
||||
importedObjekte.XMLFile = @"C:\Users\Damian\Desktop\XML\3_Zustandsdaten\ISYBAU_XML-2006-Zustandsdaten_DIN_EN_13508-2.xml";
|
||||
importedObjekte.Projektnummer = Global.Instance.ProjektNummer;
|
||||
Datenbank.Instance.loadedProjekt.Objekte.AddRange(importedObjekte.GetInspektionsobjekte());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -25,6 +25,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Language", "Language\Langua
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BerichtGen", "BerichtGen\BerichtGen.csproj", "{3022DA07-FD06-4AEA-9FC8-00D318E95A82}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SchnittstelleImporterTests", "SchnittstelleImporterTests\SchnittstelleImporterTests.csproj", "{9264791A-9D57-4133-BE47-75721057DBBB}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -71,6 +73,10 @@ Global
|
||||
{3022DA07-FD06-4AEA-9FC8-00D318E95A82}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3022DA07-FD06-4AEA-9FC8-00D318E95A82}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3022DA07-FD06-4AEA-9FC8-00D318E95A82}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9264791A-9D57-4133-BE47-75721057DBBB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9264791A-9D57-4133-BE47-75721057DBBB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9264791A-9D57-4133-BE47-75721057DBBB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9264791A-9D57-4133-BE47-75721057DBBB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
97
SchnittstelleImporter/Import.cs
Normal file
97
SchnittstelleImporter/Import.cs
Normal file
@@ -0,0 +1,97 @@
|
||||
using KlassenBIB;
|
||||
using SchnittstelleImporter.XML2006;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SchnittstelleImporter
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class Import : IImportedObjekte
|
||||
{
|
||||
string xmlFile;
|
||||
string projektnummer;
|
||||
/// <summary>
|
||||
/// Angabe zur XML datei
|
||||
/// </summary>
|
||||
public string XMLFile
|
||||
{
|
||||
get
|
||||
{
|
||||
return xmlFile;
|
||||
}
|
||||
set
|
||||
{
|
||||
xmlFile = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Angabe zur Projektnummer
|
||||
/// </summary>
|
||||
public string Projektnummer
|
||||
{
|
||||
get
|
||||
{
|
||||
return projektnummer;
|
||||
}
|
||||
set
|
||||
{
|
||||
projektnummer = value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<Inspektionsobjekt> GetInspektionsobjekte()
|
||||
{
|
||||
List<Inspektionsobjekt> result = new List<Inspektionsobjekt>();
|
||||
List<InspizierteAbwassertechnischeAnlage> anlagen = XMLParser.GetList(XMLFile);
|
||||
foreach(InspizierteAbwassertechnischeAnlage src in anlagen)
|
||||
{
|
||||
Inspektionsobjekt inspektionsobjekt = new Inspektionsobjekt();
|
||||
InspektionskuerzelnCollection inspektionskuerzelns = new InspektionskuerzelnCollection();
|
||||
|
||||
inspektionsobjekt.Projektnummer = projektnummer;
|
||||
inspektionsobjekt.Objektbezeichnung = src.Objektbezeichnung;
|
||||
inspektionsobjekt.OrtName = src.Lage.Ortname!= null? src.Lage.Ortname : "";
|
||||
inspektionsobjekt.StrasseName = src.Lage.Strassename != null ? src.Lage.Strassename : "noname";
|
||||
inspektionsobjekt.RohrMaterial = src.OptischeInspektion.Rohrleitung.Grunddaten.Material != null ? src.OptischeInspektion.Rohrleitung.Grunddaten.Material : "Unbekannt";
|
||||
inspektionsobjekt.Kanalrohrweite = src.OptischeInspektion.Rohrleitung.Grunddaten.Profilhoehe != 0 ? (uint)src.OptischeInspektion.Rohrleitung.Grunddaten.Profilhoehe : (uint)src.OptischeInspektion.Rohrleitung.Grunddaten.Profilbreite;
|
||||
inspektionsobjekt.Haltungslaenge = Convert.ToDouble(src.OptischeInspektion.Rohrleitung.Inspektionslaenge);
|
||||
inspektionsobjekt.VonPunkt = src.OptischeInspektion.Rohrleitung.Grunddaten.KnotenZulauf;
|
||||
inspektionsobjekt.BisPunkt = src.OptischeInspektion.Rohrleitung.Grunddaten.KnotenAblauf;
|
||||
inspektionsobjekt.Bemerkung = src.OptischeInspektion.Rohrleitung.Inspektionsrichtung;
|
||||
|
||||
|
||||
foreach(RZustand zustand in src.OptischeInspektion.Rohrleitung.Zustaende)
|
||||
{
|
||||
Inspektionskuerzeln inspektionskuerzeln = new Inspektionskuerzeln();
|
||||
inspektionskuerzeln.Station = zustand.Station;
|
||||
inspektionskuerzeln.Hauptkode = zustand.Inspektionskode;
|
||||
inspektionskuerzeln.Charakterisierung1 = zustand.Charakterisierung1;
|
||||
inspektionskuerzeln.Charakterisierung2 = zustand.Charakterisierung2;
|
||||
inspektionskuerzeln.ImVerbindung = zustand.Verbindung;
|
||||
|
||||
Quantifizierung quant1 = zustand.Quantifizierung1;
|
||||
Quantifizierung quant2 = zustand.Quantifizierung2;
|
||||
|
||||
inspektionskuerzeln.Quantifizierung1 = Convert.ToUInt32(quant1.Numerisch);
|
||||
inspektionskuerzeln.Quantifizierung2 = Convert.ToUInt32(quant2.Numerisch);
|
||||
|
||||
inspektionskuerzelns.Add(inspektionskuerzeln);
|
||||
}
|
||||
|
||||
inspektionsobjekt.Schadenskuerzeln = inspektionskuerzelns;
|
||||
result.Add(inspektionsobjekt);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -41,17 +41,23 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Import.cs" />
|
||||
<Compile Include="XML2006\Enums.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="XML2006\Anschlussdaten.cs" />
|
||||
<Compile Include="XML2006\Functions.cs" />
|
||||
<Compile Include="XML2006\InspizierteAbwassertechnischeAnlage.cs" />
|
||||
<Compile Include="XML2006\Lage.cs" />
|
||||
<Compile Include="XML2006\OptischeInspektion.cs" />
|
||||
<Compile Include="XML2006\RGrunddaten.cs" />
|
||||
<Compile Include="XML2006\Rohrleitung.cs" />
|
||||
<Compile Include="XML2006\RZustand.cs" />
|
||||
<Compile Include="XML2006\XMLParser.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\KlassenBIB\KlassenBIB.csproj">
|
||||
<Project>{c82bd650-466b-403f-bed9-2b1660771f54}</Project>
|
||||
<Name>KlassenBIB</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -14,12 +14,29 @@ namespace SchnittstelleImporter.XML2006
|
||||
string anschlussArt;
|
||||
string fixierung;
|
||||
string kommentar;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Objektbezeichnung { get => objektbezeichnung; set => objektbezeichnung = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public EKantenTyp Kantentyp { get => kantentyp; set => kantentyp = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public decimal Entfernung { get => entfernung; set => entfernung = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string AnschlussArt { get => anschlussArt; set => anschlussArt = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Fixierung { get => fixierung; set => fixierung = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Kommentar { get => kommentar; set => kommentar = value; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace SchnittstelleImporter.XML2006
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public enum EAnlagetyp
|
||||
{
|
||||
Haltung = 1,
|
||||
@@ -13,35 +16,53 @@ namespace SchnittstelleImporter.XML2006
|
||||
Schacht = 3,
|
||||
Bauwerk = 4
|
||||
}
|
||||
public enum EInspektionverfahren
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
enum EInspektionverfahren
|
||||
{
|
||||
TVUntersuchung,
|
||||
Begehung,
|
||||
VomSchacht,
|
||||
Other
|
||||
}
|
||||
public enum EWetter
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
enum EWetter
|
||||
{
|
||||
KEINNIEDERSCHLAG = 1,
|
||||
REGEN = 2,
|
||||
SCHNEE = 3
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public enum ERohrleitungstyp
|
||||
{
|
||||
HALTUNG,
|
||||
LEITUNG
|
||||
}
|
||||
public enum EObjektArt
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
enum EObjektArt
|
||||
{
|
||||
KANTE = 1,
|
||||
KNOTEN = 2
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public enum EKnotenTyp
|
||||
{
|
||||
SCHACHT = 0,
|
||||
ANSCHLUSSPUNKT = 1,
|
||||
BAUWERK = 2
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public enum EKantenTyp
|
||||
{
|
||||
HALTUNG,
|
||||
|
||||
@@ -12,7 +12,9 @@ namespace SchnittstelleImporter.XML2006
|
||||
Lage lage;
|
||||
EAnlagetyp anlagentyp;
|
||||
OptischeInspektion optischeInspektion;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Objektbezeichnung
|
||||
{
|
||||
get
|
||||
@@ -24,6 +26,9 @@ namespace SchnittstelleImporter.XML2006
|
||||
objektbezeichnung = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public EAnlagetyp Anlagentyp
|
||||
{
|
||||
get
|
||||
@@ -35,6 +40,9 @@ namespace SchnittstelleImporter.XML2006
|
||||
anlagentyp = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public OptischeInspektion OptischeInspektion
|
||||
{
|
||||
get
|
||||
@@ -46,6 +54,9 @@ namespace SchnittstelleImporter.XML2006
|
||||
optischeInspektion = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public Lage Lage
|
||||
{
|
||||
get
|
||||
@@ -57,6 +68,10 @@ namespace SchnittstelleImporter.XML2006
|
||||
lage = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return objektbezeichnung;
|
||||
|
||||
@@ -10,7 +10,9 @@ namespace SchnittstelleImporter.XML2006
|
||||
{
|
||||
string strassename;
|
||||
string ortname;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Strassename
|
||||
{
|
||||
get
|
||||
@@ -22,6 +24,9 @@ namespace SchnittstelleImporter.XML2006
|
||||
strassename = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Ortname
|
||||
{
|
||||
get
|
||||
@@ -33,6 +38,11 @@ namespace SchnittstelleImporter.XML2006
|
||||
ortname = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="strassename"></param>
|
||||
/// <param name="ortname"></param>
|
||||
public Lage(string strassename, string ortname)
|
||||
{
|
||||
this.strassename = strassename;
|
||||
|
||||
@@ -10,7 +10,9 @@ namespace SchnittstelleImporter.XML2006
|
||||
{
|
||||
DateTime inspektionstime;
|
||||
Rohrleitung rohrleitung;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime Inspektionstime
|
||||
{
|
||||
set
|
||||
@@ -22,6 +24,9 @@ namespace SchnittstelleImporter.XML2006
|
||||
return inspektionstime;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Inspektionsdatum
|
||||
{
|
||||
get
|
||||
@@ -34,6 +39,9 @@ namespace SchnittstelleImporter.XML2006
|
||||
//inspektionsdatum = value;
|
||||
}*/
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Inspektionszeit
|
||||
{
|
||||
get
|
||||
@@ -41,6 +49,9 @@ namespace SchnittstelleImporter.XML2006
|
||||
return inspektionstime.ToShortTimeString();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public Rohrleitung Rohrleitung
|
||||
{
|
||||
get
|
||||
|
||||
@@ -23,22 +23,65 @@ namespace SchnittstelleImporter.XML2006
|
||||
decimal regeleinzelrohrlaenge;
|
||||
int artAuskleidung;
|
||||
string innenschutz;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string KnotenZulauf { get => knotenZulauf; set => knotenZulauf = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public EKnotenTyp KnotenZulaufTyp { get => knotenZulaufTyp; set => knotenZulaufTyp = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string KnotenAblauf { get => knotenAblauf; set => knotenAblauf = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public EKnotenTyp KnotenAblaufTyp { get => knotenAblaufTyp; set => knotenAblaufTyp = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int Profilhoehe { get => profilhoehe; set => profilhoehe = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int Profilbreite { get => profilbreite; set => profilbreite = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int Profilart { get => profilart; set => profilart = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Material { get => material; set => material = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Kanalart { get => kanalart; set => kanalart = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public Anschlussdaten Anschlussddaten { get => anschlussddaten; set => anschlussddaten = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int HerkunftProfilmasse { get => herkunftProfilmasse; set => herkunftProfilmasse = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int HerkunftMaterial { get => herkunftMaterial; set => herkunftMaterial = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public decimal Regeleinzelrohrlaenge { get => regeleinzelrohrlaenge; set => regeleinzelrohrlaenge = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int ArtAuskleidung { get => artAuskleidung; set => artAuskleidung = value; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool HasGrundleitung
|
||||
{
|
||||
get
|
||||
@@ -46,7 +89,9 @@ namespace SchnittstelleImporter.XML2006
|
||||
return anschlussddaten != null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Innenschutz { get => innenschutz; set => innenschutz = value; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace SchnittstelleImporter.XML2006
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class Rohrleitung
|
||||
{
|
||||
ERohrleitungstyp rohrleitungstyp;
|
||||
@@ -13,7 +16,9 @@ namespace SchnittstelleImporter.XML2006
|
||||
string inspektionsrichtung;
|
||||
RGrunddaten grunddaten = null;
|
||||
List<RZustand> zustaende = null;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public ERohrleitungstyp Rohrleitungstyp
|
||||
{
|
||||
get
|
||||
@@ -25,7 +30,9 @@ namespace SchnittstelleImporter.XML2006
|
||||
rohrleitungstyp = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public decimal Inspektionslaenge
|
||||
{
|
||||
get
|
||||
@@ -37,6 +44,9 @@ namespace SchnittstelleImporter.XML2006
|
||||
inspektionslaenge = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Inspektionsrichtung
|
||||
{
|
||||
get
|
||||
@@ -54,6 +64,9 @@ namespace SchnittstelleImporter.XML2006
|
||||
inspektionsrichtung = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public List<RZustand> Zustaende
|
||||
{
|
||||
get
|
||||
@@ -65,6 +78,9 @@ namespace SchnittstelleImporter.XML2006
|
||||
zustaende = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public RGrunddaten Grunddaten
|
||||
{
|
||||
get
|
||||
|
||||
@@ -8,9 +8,17 @@ using System.Xml;
|
||||
|
||||
namespace SchnittstelleImporter.XML2006
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static class XMLParser
|
||||
{
|
||||
public static Dictionary<InspizierteAbwassertechnischeAnlage, string> anlageInFile = new Dictionary<InspizierteAbwassertechnischeAnlage, string>();
|
||||
/// <summary>
|
||||
/// Gibt eine Liste an anlagen zurück von einer XML Datei.
|
||||
/// </summary>
|
||||
/// <param name="xmldatei"></param>
|
||||
/// <returns></returns>
|
||||
public static List<InspizierteAbwassertechnischeAnlage> GetList(string xmldatei)
|
||||
{
|
||||
List<InspizierteAbwassertechnischeAnlage> result = new List<InspizierteAbwassertechnischeAnlage>();
|
||||
@@ -28,6 +36,7 @@ namespace SchnittstelleImporter.XML2006
|
||||
foreach (XmlNode node in inspizierteDaten)
|
||||
{
|
||||
InspizierteAbwassertechnischeAnlage anlage = GetAnlage(node);
|
||||
if (anlage == null) continue;
|
||||
result.Add(anlage);
|
||||
anlageInFile.Add(anlage, xmldatei);
|
||||
}
|
||||
@@ -112,7 +121,8 @@ namespace SchnittstelleImporter.XML2006
|
||||
optischeInspektion.Inspektionstime = dt;
|
||||
|
||||
if (intRohrleitung == null)
|
||||
throw new NotImplementedException("Schaechte sind noch nicht implementiert");
|
||||
return null;
|
||||
//throw new NotImplementedException("Schaechte sind noch nicht implementiert");
|
||||
|
||||
Rohrleitung rohr = new Rohrleitung();
|
||||
foreach (XmlNode d in intRohrleitung)
|
||||
@@ -256,6 +266,8 @@ namespace SchnittstelleImporter.XML2006
|
||||
case "Fotodatei": break;
|
||||
case "FotoSpeichermedium": break;
|
||||
case "Fotonummer": break;
|
||||
case "Timecode": break;
|
||||
case "GrundAbbruch": break;
|
||||
default: throw new NotImplementedException(d.Name);
|
||||
|
||||
}
|
||||
24
SchnittstelleImporterTests/ImportTests.cs
Normal file
24
SchnittstelleImporterTests/ImportTests.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using SchnittstelleImporter;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SchnittstelleImporter.Tests
|
||||
{
|
||||
[TestClass()]
|
||||
public class ImportTests
|
||||
{
|
||||
[TestMethod()]
|
||||
public void GetInspektionsobjekteTest()
|
||||
{
|
||||
Import import = new Import();
|
||||
import.XMLFile = @"C:\Users\Damian\Desktop\XML\3_Zustandsdaten\ISYBAU_XML-2006-Zustandsdaten_DIN_EN_13508-2.xml";
|
||||
import.GetInspektionsobjekte();
|
||||
|
||||
Assert.Fail();
|
||||
}
|
||||
}
|
||||
}
|
||||
36
SchnittstelleImporterTests/Properties/AssemblyInfo.cs
Normal file
36
SchnittstelleImporterTests/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Allgemeine Informationen über eine Assembly werden über folgende
|
||||
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||
// die einer Assembly zugeordnet sind.
|
||||
[assembly: AssemblyTitle("SchnittstelleImporterTests")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("SchnittstelleImporterTests")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Wenn ComVisible auf "false" festgelegt wird, sind die Typen innerhalb dieser Assembly
|
||||
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
|
||||
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
|
||||
[assembly: Guid("9264791a-9d57-4133-be47-75721057dbbb")]
|
||||
|
||||
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||
//
|
||||
// Hauptversion
|
||||
// Nebenversion
|
||||
// Buildnummer
|
||||
// Revision
|
||||
//
|
||||
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
|
||||
// übernehmen, indem Sie "*" eingeben:
|
||||
// [Assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
111
SchnittstelleImporterTests/SchnittstelleImporterTests.csproj
Normal file
111
SchnittstelleImporterTests/SchnittstelleImporterTests.csproj
Normal file
@@ -0,0 +1,111 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\MSTest.TestAdapter.1.2.1\build\net45\MSTest.TestAdapter.props" Condition="Exists('..\packages\MSTest.TestAdapter.1.2.1\build\net45\MSTest.TestAdapter.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{9264791A-9D57-4133-BE47-75721057DBBB}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>SchnittstelleImporterTests</RootNamespace>
|
||||
<AssemblyName>SchnittstelleImporterTests</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
|
||||
<IsCodedUITest>False</IsCodedUITest>
|
||||
<TestProjectType>UnitTest</TestProjectType>
|
||||
<TargetFrameworkProfile />
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MSTest.TestFramework.1.2.1\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MSTest.TestFramework.1.2.1\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
</ItemGroup>
|
||||
<Choose>
|
||||
<When Condition="('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'">
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<Otherwise />
|
||||
</Choose>
|
||||
<ItemGroup>
|
||||
<Compile Include="ImportTests.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="XML2006\XMLParserTests.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\KlassenBIB\KlassenBIB.csproj">
|
||||
<Project>{C82BD650-466B-403F-BED9-2B1660771F54}</Project>
|
||||
<Name>KlassenBIB</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\SchnittstelleImporter\SchnittstelleImporter.csproj">
|
||||
<Project>{E1564A4D-39FD-489B-8029-AEEF33033EF2}</Project>
|
||||
<Name>SchnittstelleImporter</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Choose>
|
||||
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}".</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.1.2.1\build\net45\MSTest.TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.1.2.1\build\net45\MSTest.TestAdapter.props'))" />
|
||||
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.1.2.1\build\net45\MSTest.TestAdapter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.1.2.1\build\net45\MSTest.TestAdapter.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\MSTest.TestAdapter.1.2.1\build\net45\MSTest.TestAdapter.targets" Condition="Exists('..\packages\MSTest.TestAdapter.1.2.1\build\net45\MSTest.TestAdapter.targets')" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
22
SchnittstelleImporterTests/XML2006/XMLParserTests.cs
Normal file
22
SchnittstelleImporterTests/XML2006/XMLParserTests.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using SchnittstelleImporter.XML2006;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SchnittstelleImporter.XML2006.Tests
|
||||
{
|
||||
[TestClass()]
|
||||
public class XMLParserTests
|
||||
{
|
||||
[TestMethod()]
|
||||
public void GetListTest()
|
||||
{
|
||||
string xmlfile = @"C:\Users\Damian\Desktop\XML\3_Zustandsdaten\ISYBAU_XML-2006-Zustandsdaten_DIN_EN_13508-2.xml";
|
||||
var x = XMLParser.GetList(xmlfile);
|
||||
Assert.Fail();
|
||||
}
|
||||
}
|
||||
}
|
||||
5
SchnittstelleImporterTests/packages.config
Normal file
5
SchnittstelleImporterTests/packages.config
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="MSTest.TestAdapter" version="1.2.1" targetFramework="net461" />
|
||||
<package id="MSTest.TestFramework" version="1.2.1" targetFramework="net461" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user