Projekt kann nun Selectiert werden
This commit is contained in:
@@ -2,16 +2,20 @@
|
||||
using KanSan.Base.Interfaces;
|
||||
using KanSan.Base.Interfaces.UI;
|
||||
using KanSan.Base.Models;
|
||||
using KanSan.ViewModel.Commands;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Text;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace KanSan.ViewModel
|
||||
{
|
||||
public class ProjektEditViewModel : BaseViewModel,INotifyPropertyChanged, IProjektEditViewModel
|
||||
{
|
||||
IUnitOfWork unitOfWork = new UnitOfWork(new KanSanContext());
|
||||
public ICommand SaveProjekt { get; set; }
|
||||
public ICommand RemoveProjekt { get; set; }
|
||||
private Projekt projekt;
|
||||
string projektnummer;
|
||||
string ort;
|
||||
@@ -41,6 +45,7 @@ namespace KanSan.ViewModel
|
||||
this.projekt = projekt;
|
||||
projektnummer = projekt.Projektnummer;
|
||||
ort = projekt.Ort;
|
||||
SaveProjekt = new RelayCommand(parameter => Speichern());
|
||||
}
|
||||
|
||||
public void Speichern()
|
||||
@@ -49,6 +54,7 @@ namespace KanSan.ViewModel
|
||||
projekt.Projektnummer = Projektnummer;
|
||||
unitOfWork.ProjekteRepository.Update(projekt);
|
||||
unitOfWork.Commit();
|
||||
Mediator.Notify("GoToListProjektScreen");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user