Projekt kann nun Selectiert werden

This commit is contained in:
HuskyTeufel
2021-08-31 13:56:13 +02:00
parent ade84e30e3
commit 97fdc31e21
4 changed files with 28 additions and 1 deletions

View File

@@ -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");
}
}
}