Auftraggeber Datenbank hinzugefügt

This commit is contained in:
Husky
2019-07-12 08:27:09 +02:00
parent 63cc7cbdf0
commit a75b69175c
4 changed files with 57 additions and 0 deletions

View File

@@ -28,6 +28,20 @@ namespace Database
}
public KlassenBIB.Projekt loadedProjekt = null;
public KlassenBIB.MainDataBase MainDatenbank = null;
public Datenbank()
{
string filepath = Path.Combine("./projekte","MainDatenbank.xaml");
if(File.Exists(filepath))
{
MainDatenbank = XamlServices.Load(filepath) as KlassenBIB.MainDataBase;
}
else
{
MainDatenbank = new MainDataBase();
}
}
private string projektpfad = string.Empty;
public bool LoadProjekt(string projekt, string projektpfad)
@@ -193,6 +207,7 @@ namespace Database
public void SaveProjekt()
{
XamlServices.Save("./projekte/MainDatenbank.xaml", MainDatenbank);
XamlServices.Save(projektpfad, loadedProjekt);
}
}

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace KlassenBIB
{
/// <summary>
///
/// </summary>
public class AuftraggeberListCollection : List<Auftraggeber>
{
}
}

View File

@@ -45,12 +45,14 @@
<ItemGroup>
<Compile Include="AbwasserTechnischeAnlageCollection.cs" />
<Compile Include="Auftraggeber.cs" />
<Compile Include="AuftraggeberListCollection.cs" />
<Compile Include="BilderCollection.cs" />
<Compile Include="ChargeNummerCollection.cs" />
<Compile Include="Hutprofil.cs" />
<Compile Include="IImportedObjekte.cs" />
<Compile Include="InlinerSanierung.cs" />
<Compile Include="Kurzliner.cs" />
<Compile Include="MainDataBase.cs" />
<Compile Include="Projekt.cs" />
<Compile Include="Inspektionskuerzeln.cs" />
<Compile Include="InspektionskuerzelnCollection.cs" />

View File

@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Markup;
namespace KlassenBIB
{
/// <summary>
///
/// </summary>
[ContentProperty("AuftraggeberListe")]
public class MainDataBase
{
/// <summary>
///
/// </summary>
public AuftraggeberListCollection AuftraggeberListe { get; set; }
public MainDataBase()
{
AuftraggeberListe = new AuftraggeberListCollection();
}
}
}