Auftraggber werden nun raussortiert und eingespeichert in globale Datenbank
This commit is contained in:
@@ -70,6 +70,7 @@ namespace Database
|
|||||||
loadedProjekt = new KlassenBIB.Projekt();
|
loadedProjekt = new KlassenBIB.Projekt();
|
||||||
|
|
||||||
UpdateDatabase.UpdateNewGuids();
|
UpdateDatabase.UpdateNewGuids();
|
||||||
|
UpdateDatabase.TransferAuftraggeber();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
using System;
|
using KlassenBIB;
|
||||||
|
using SanShared;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using System.Xaml;
|
||||||
|
|
||||||
namespace Database
|
namespace Database
|
||||||
{
|
{
|
||||||
@@ -26,5 +30,34 @@ namespace Database
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void TransferAuftraggeber()
|
||||||
|
{
|
||||||
|
List<string> projekte = new List<string>();
|
||||||
|
List<IAuftraggeber> auftraggebers = new List<IAuftraggeber>();
|
||||||
|
Projekt tempProjekt = null;
|
||||||
|
foreach(DirectoryInfo projekt in (new DirectoryInfo("./projekte").GetDirectories()))
|
||||||
|
{
|
||||||
|
projekte.Add(projekt.Name);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach(string t in projekte)
|
||||||
|
{
|
||||||
|
tempProjekt = XamlServices.Load(Path.Combine("projekte", t,string.Format("{0}.xaml",t))) as KlassenBIB.Projekt;
|
||||||
|
|
||||||
|
//auftraggebers.Add(tempProjekt.Auftraggeber);
|
||||||
|
if (Datenbank.Instance.MainDatenbank.AuftraggeberListe.Contains(tempProjekt.Auftraggeber))
|
||||||
|
{
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
Datenbank.Instance.MainDatenbank.AuftraggeberListe.Add(tempProjekt.Auftraggeber);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using SanShared;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@@ -9,7 +10,7 @@ namespace KlassenBIB
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class AuftraggeberListCollection : List<Auftraggeber>
|
public class AuftraggeberListCollection : List<IAuftraggeber>
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,6 +44,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="AbwasserTechnischeAnlageCollection.cs" />
|
<Compile Include="AbwasserTechnischeAnlageCollection.cs" />
|
||||||
|
<Compile Include="AnlagenType.cs" />
|
||||||
<Compile Include="Auftraggeber.cs" />
|
<Compile Include="Auftraggeber.cs" />
|
||||||
<Compile Include="AuftraggeberListCollection.cs" />
|
<Compile Include="AuftraggeberListCollection.cs" />
|
||||||
<Compile Include="BilderCollection.cs" />
|
<Compile Include="BilderCollection.cs" />
|
||||||
|
|||||||
@@ -17,6 +17,9 @@ namespace KlassenBIB
|
|||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public AuftraggeberListCollection AuftraggeberListe { get; set; }
|
public AuftraggeberListCollection AuftraggeberListe { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
public MainDataBase()
|
public MainDataBase()
|
||||||
{
|
{
|
||||||
AuftraggeberListe = new AuftraggeberListCollection();
|
AuftraggeberListe = new AuftraggeberListCollection();
|
||||||
|
|||||||
Reference in New Issue
Block a user