Leistungsverzeichnis hinzugefügt
This commit is contained in:
@@ -16,6 +16,11 @@ namespace KanSan.ViewModel
|
||||
string ortTeil;
|
||||
string baustelleNummer;
|
||||
|
||||
public Baustelle Baustelle
|
||||
{
|
||||
get => baustelle;
|
||||
}
|
||||
|
||||
public string OrtTeil
|
||||
{
|
||||
get => ortTeil;
|
||||
|
||||
@@ -22,6 +22,10 @@
|
||||
<ProjectReference Include="..\KanSan.Base\KanSan.Base.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Leistungsverzeichnis\" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
|
||||
<Exec Command="git rev-parse HEAD >"$(ProjectDir)\version.txt" />
|
||||
</Target>
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
using KanSan.Base;
|
||||
using KanSan.Base.Interfaces;
|
||||
using KanSan.Base.Interfaces.UI;
|
||||
using KanSan.Base.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace KanSan.ViewModel
|
||||
{
|
||||
public class LeistungsverzeichnisPositionenListViewModel : ILeistungsverzeichnisPositionListViewModel
|
||||
{
|
||||
IUnitOfWork unitOfWork = new UnitOfWork(new KanSanContext());
|
||||
List<LeistungsverzeichnisPosition> lvPositionen;
|
||||
public List<LeistungsverzeichnisPosition> LVPositionen => lvPositionen;
|
||||
|
||||
public LeistungsverzeichnisPositionenListViewModel(string tag)
|
||||
{
|
||||
if(tag == string.Empty)
|
||||
{
|
||||
lvPositionen = unitOfWork.LeistungsverzeichnisRepository.Get().ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
lvPositionen = unitOfWork.LeistungsverzeichnisRepository.Get(x => x.Tag.Equals(tag)).ToList();
|
||||
if (lvPositionen == null) lvPositionen = new List<LeistungsverzeichnisPosition>();
|
||||
}
|
||||
}
|
||||
|
||||
public LeistungsverzeichnisPosition NeueLeistungsverzeichnisPosition()
|
||||
{
|
||||
Guid guid = Guid.NewGuid();
|
||||
LeistungsverzeichnisPosition leistungsverzeichnisPosition = new LeistungsverzeichnisPosition()
|
||||
{
|
||||
GuidNr = guid,
|
||||
};
|
||||
unitOfWork.LeistungsverzeichnisRepository.Insert(leistungsverzeichnisPosition);
|
||||
unitOfWork.Commit();
|
||||
return leistungsverzeichnisPosition;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@ namespace KanSan.ViewModel
|
||||
decimal anzahl;
|
||||
string bemerkung;
|
||||
Taetigkeiten model;
|
||||
LeitungsverzeichnisPosition leistungsverzeichnis;
|
||||
LeistungsverzeichnisPosition leistungsverzeichnis;
|
||||
#region getsetters
|
||||
public Fahrzeug Fahrzeug
|
||||
{
|
||||
@@ -71,7 +71,7 @@ namespace KanSan.ViewModel
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
public LeitungsverzeichnisPosition Leistungsverzeichnis
|
||||
public LeistungsverzeichnisPosition Leistungsverzeichnis
|
||||
{
|
||||
get => leistungsverzeichnis;
|
||||
set
|
||||
|
||||
Reference in New Issue
Block a user