60 lines
1.4 KiB
C#
60 lines
1.4 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
|
|
{
|
|
public class ProjektViewModel : BaseViewModel,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;
|
|
}
|
|
}
|
|
}
|