SchachtDataService hinzugefügt
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using SewerStammGen.Shared.Contracts;
|
||||
using SewerStammGen.Shared.Domain;
|
||||
using SewerStammGen.WPF.Interface.Navigator;
|
||||
using SewerStammGen.WPF.ViewModel;
|
||||
using Shared.Contracts;
|
||||
using System;
|
||||
@@ -13,26 +14,22 @@ namespace SewerStammGen.WPF.Commands
|
||||
{
|
||||
internal class HaltungEditSaveCommand : AsyncCommandBase
|
||||
{
|
||||
private HaltungEditViewModel haltungEditViewModel;
|
||||
private IDataService<Kanal> kanalDataService;
|
||||
|
||||
private readonly HaltungEditViewModel _haltungEditViewModel;
|
||||
private readonly IHaltungDataService _haltungDataService;
|
||||
private readonly IRenavigator _renavigator;
|
||||
|
||||
public HaltungEditSaveCommand(HaltungEditViewModel haltungEditViewModel)
|
||||
public HaltungEditSaveCommand(IHaltungDataService haltungDataService,IRenavigator renavigator,HaltungEditViewModel haltungEditViewModel)
|
||||
{
|
||||
this.haltungEditViewModel = haltungEditViewModel;
|
||||
//this.kanalDataService = kanalDataService;
|
||||
|
||||
this._haltungEditViewModel = haltungEditViewModel;
|
||||
this._haltungDataService = haltungDataService;
|
||||
this._renavigator = renavigator;
|
||||
}
|
||||
|
||||
public override async Task ExecuteAsync(object? parameter)
|
||||
{
|
||||
if(haltungEditViewModel._oberePunkt != haltungEditViewModel.Model.StartSchacht.Objektbezeichnung)
|
||||
{
|
||||
//Schacht s = await schachtService.FindSchachtByNameAndProjektID(haltungEditViewModel._oberePunkt, haltungEditViewModel.Model.Projekt.Id);
|
||||
//haltungEditViewModel.Model.StartSchacht = s;
|
||||
}
|
||||
//haltungEditViewModel.Model = await kanalDataService.Update(haltungEditViewModel.Model.Id, haltungEditViewModel.Model);
|
||||
Trace.WriteLine("Daten gespeichert");
|
||||
_haltungEditViewModel.Model = await _haltungDataService.Update(_haltungEditViewModel.Model);
|
||||
|
||||
_renavigator.Renavigate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user