Auftraggeber Datenbank hinzugefügt
This commit is contained in:
@@ -28,6 +28,20 @@ namespace Database
|
|||||||
}
|
}
|
||||||
|
|
||||||
public KlassenBIB.Projekt loadedProjekt = null;
|
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;
|
private string projektpfad = string.Empty;
|
||||||
public bool LoadProjekt(string projekt, string projektpfad)
|
public bool LoadProjekt(string projekt, string projektpfad)
|
||||||
@@ -193,6 +207,7 @@ namespace Database
|
|||||||
|
|
||||||
public void SaveProjekt()
|
public void SaveProjekt()
|
||||||
{
|
{
|
||||||
|
XamlServices.Save("./projekte/MainDatenbank.xaml", MainDatenbank);
|
||||||
XamlServices.Save(projektpfad, loadedProjekt);
|
XamlServices.Save(projektpfad, loadedProjekt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
15
KlassenBIB/AuftraggeberListCollection.cs
Normal file
15
KlassenBIB/AuftraggeberListCollection.cs
Normal 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>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -45,12 +45,14 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="AbwasserTechnischeAnlageCollection.cs" />
|
<Compile Include="AbwasserTechnischeAnlageCollection.cs" />
|
||||||
<Compile Include="Auftraggeber.cs" />
|
<Compile Include="Auftraggeber.cs" />
|
||||||
|
<Compile Include="AuftraggeberListCollection.cs" />
|
||||||
<Compile Include="BilderCollection.cs" />
|
<Compile Include="BilderCollection.cs" />
|
||||||
<Compile Include="ChargeNummerCollection.cs" />
|
<Compile Include="ChargeNummerCollection.cs" />
|
||||||
<Compile Include="Hutprofil.cs" />
|
<Compile Include="Hutprofil.cs" />
|
||||||
<Compile Include="IImportedObjekte.cs" />
|
<Compile Include="IImportedObjekte.cs" />
|
||||||
<Compile Include="InlinerSanierung.cs" />
|
<Compile Include="InlinerSanierung.cs" />
|
||||||
<Compile Include="Kurzliner.cs" />
|
<Compile Include="Kurzliner.cs" />
|
||||||
|
<Compile Include="MainDataBase.cs" />
|
||||||
<Compile Include="Projekt.cs" />
|
<Compile Include="Projekt.cs" />
|
||||||
<Compile Include="Inspektionskuerzeln.cs" />
|
<Compile Include="Inspektionskuerzeln.cs" />
|
||||||
<Compile Include="InspektionskuerzelnCollection.cs" />
|
<Compile Include="InspektionskuerzelnCollection.cs" />
|
||||||
|
|||||||
25
KlassenBIB/MainDataBase.cs
Normal file
25
KlassenBIB/MainDataBase.cs
Normal 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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user