Client wird gespeichert mittels interface
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using DaSaSo.Domain.Model;
|
||||
using DaSaSo.Domain.Services;
|
||||
using DaSaSo.ViewModel.Interface;
|
||||
using Microsoft.Toolkit.Mvvm.Input;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -14,17 +15,19 @@ namespace DaSaSo.ViewModel
|
||||
{
|
||||
private Client _model;
|
||||
private IDataService<Client> _dataService;
|
||||
private readonly IActualProject _actualProject;
|
||||
|
||||
public Client Model { get => _model; set => _model = value; }
|
||||
|
||||
public IRelayCommand SaveClientCommand { get; set; }
|
||||
|
||||
|
||||
public ClientEditViewModel(IDataService<Client> dataService, Client model)
|
||||
public ClientEditViewModel(IDataService<Client> dataService, IActualProject actualProject)
|
||||
{
|
||||
this._model = model;
|
||||
this._dataService = dataService;
|
||||
SaveClientCommand = new RelayCommand(SaveClient);
|
||||
_actualProject = actualProject;
|
||||
this._model = _actualProject.AktuellClient;
|
||||
}
|
||||
|
||||
private void SaveClient()
|
||||
|
||||
Reference in New Issue
Block a user