SchachtDataService hinzugefügt
This commit is contained in:
@@ -15,22 +15,22 @@ namespace SewerStammGen.WPF.Commands
|
||||
{
|
||||
private readonly IActualState actualState;
|
||||
private readonly IRenavigator renavigator;
|
||||
private readonly IDataService<Projekt> projektService;
|
||||
|
||||
|
||||
public SchachtAddCommand(IDataService<Projekt> projektService, IActualState actualState, IRenavigator renavigator)
|
||||
public SchachtAddCommand(IActualState actualState, IRenavigator renavigator)
|
||||
{
|
||||
this.actualState = actualState;
|
||||
this.renavigator = renavigator;
|
||||
this.projektService = projektService;
|
||||
|
||||
}
|
||||
|
||||
public override async Task ExecuteAsync(object? parameter)
|
||||
{
|
||||
Projekt aktuelleProjekt = await projektService.Get(actualState.ProjektID);
|
||||
// Schacht schacht = await schachtService.CreateSchacht(aktuelleProjekt);
|
||||
|
||||
Schacht newSchacht = new Schacht()
|
||||
{
|
||||
Projekt = new Projekt() { Id = actualState.ProjektID },
|
||||
};
|
||||
actualState.SetSchacht(newSchacht);
|
||||
renavigator.Renavigate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user