Datenbank umgebaut
This commit is contained in:
42
KanSan/Klassen/Leistungsverzeichnis.cs
Normal file
42
KanSan/Klassen/Leistungsverzeichnis.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace KanSan.Klassen
|
||||
{
|
||||
public class Leistungsverzeichnis
|
||||
{
|
||||
public Guid ID { get; set; }
|
||||
public string Beschreibung { get; set; }
|
||||
public List<LeistungsverzeichnisPosition> Positionen { get; set; }
|
||||
public Leistungsverzeichnis(string beschreibung)
|
||||
{
|
||||
ID = Guid.NewGuid();
|
||||
Beschreibung = beschreibung;
|
||||
}
|
||||
|
||||
public void AddLeistungsverzeichnisPosition(string Positionnummer,string PositionsBeschreibung,string PositionEinheit, decimal PositionEinheitpreis)
|
||||
{
|
||||
if (Positionen == null) Positionen = new List<LeistungsverzeichnisPosition>();
|
||||
LeistungsverzeichnisPosition pos = new LeistungsverzeichnisPosition();
|
||||
pos.ID = Guid.NewGuid();
|
||||
pos.ref_leistungsverzeichnis = this;
|
||||
pos.Position = Positionnummer;
|
||||
pos.PositionBeschreibung = PositionsBeschreibung;
|
||||
pos.PositionEinheit = PositionEinheit;
|
||||
pos.PositionEinheitspreis = PositionEinheitpreis;
|
||||
|
||||
Positionen.Add(pos);
|
||||
}
|
||||
}
|
||||
|
||||
public class LeistungsverzeichnisPosition
|
||||
{
|
||||
public Guid ID { get; set; }
|
||||
public Leistungsverzeichnis ref_leistungsverzeichnis { get; set; }
|
||||
public string Position { get; set; }
|
||||
public string PositionBeschreibung { get; set; }
|
||||
public string PositionEinheit { get; set; }
|
||||
public decimal PositionEinheitspreis { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user