72 lines
1.7 KiB
C#
72 lines
1.7 KiB
C#
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
|
|
{
|
|
class BaustelleViewModel : PropertyChangedClass,INotifyPropertyChanged
|
|
{
|
|
private Baustelle _baustelle;
|
|
IUnitOfWork unitOfWork = new UnitOfWork(new KanSanContext());
|
|
|
|
private string ort;
|
|
private string strasse;
|
|
private string projektnummer;
|
|
public string Ort
|
|
{
|
|
get
|
|
{
|
|
return ort;
|
|
}
|
|
set
|
|
{
|
|
if (ort == value) return;
|
|
ort = value;
|
|
OnPropertyChanged();
|
|
}
|
|
}
|
|
public string Strasse
|
|
{
|
|
get
|
|
{
|
|
return strasse;
|
|
}
|
|
set
|
|
{
|
|
if (strasse == value) return;
|
|
strasse = value;
|
|
OnPropertyChanged();
|
|
}
|
|
}
|
|
public string Projektnummer
|
|
{
|
|
get
|
|
{
|
|
return projektnummer;
|
|
}
|
|
set
|
|
{
|
|
if (projektnummer == value) return;
|
|
projektnummer = value;
|
|
OnPropertyChanged();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public BaustelleViewModel()
|
|
{
|
|
_baustelle = unitOfWork.BaustellenRepository.Get().First();
|
|
ort = _baustelle.Ort;
|
|
strasse = _baustelle.Strasse;
|
|
projektnummer = _baustelle.Projektnummer;
|
|
}
|
|
}
|
|
}
|