61 lines
1.5 KiB
C#
61 lines
1.5 KiB
C#
using Database;
|
|
using KlassenBIB;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Diagnostics;
|
|
using System.Drawing;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
|
|
namespace SanSystem
|
|
{
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public partial class frmProjektList : Form
|
|
{
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public frmProjektList()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void frmProjektList_Load(object sender, EventArgs e)
|
|
{
|
|
|
|
foreach(Projekt projekt in Datenbank.Instance.TeufelDB.Projekte)
|
|
{
|
|
if (projekt.Nummer == null)
|
|
{
|
|
Datenbank.Instance.TeufelDB.Projekte.Remove(projekt);
|
|
if(Debugger.IsAttached)
|
|
{
|
|
Debugger.Break();
|
|
}
|
|
else
|
|
{
|
|
continue;
|
|
}
|
|
}
|
|
lb_projekte.Items.Add(projekt.Nummer);
|
|
}
|
|
}
|
|
|
|
private void btn_ok_Click(object sender, EventArgs e)
|
|
{
|
|
string projekt = (string)lb_projekte.SelectedItem;
|
|
if (projekt == null) return;
|
|
Global.Instance.ProjektNummer = projekt;
|
|
Database.Datenbank.Instance.LoadProjekt(projekt);
|
|
this.Close();
|
|
}
|
|
}
|
|
}
|