Ordner umstrukturierungen
This commit is contained in:
59
KanSan.ViewModel/Projekt/ProjektViewModel.cs
Normal file
59
KanSan.ViewModel/Projekt/ProjektViewModel.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
using KanSan.Base;
|
||||
using KanSan.Base.Interfaces;
|
||||
using KanSan.Base.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
namespace KanSan.ViewModel
|
||||
{
|
||||
public class ProjektViewModel : PropertyChangedClass,INotifyPropertyChanged
|
||||
{
|
||||
private Projekt _baustelle;
|
||||
IUnitOfWork unitOfWork = new UnitOfWork(new KanSanContext());
|
||||
|
||||
|
||||
private string ortTeil;
|
||||
private string baustelleNummer;
|
||||
public string OrtTeil
|
||||
{
|
||||
get
|
||||
{
|
||||
return ortTeil;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (ortTeil == value) return;
|
||||
ortTeil = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public string BaustelleNummer
|
||||
{
|
||||
get
|
||||
{
|
||||
return baustelleNummer;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (baustelleNummer == value) return;
|
||||
baustelleNummer = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public ProjektViewModel()
|
||||
{
|
||||
_baustelle = unitOfWork.ProjekteRepository.Get().First();
|
||||
ortTeil = _baustelle.Ort;
|
||||
|
||||
baustelleNummer = _baustelle.Projektnummer;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user