Schächte werden nun hinzugefügt

This commit is contained in:
2023-03-31 15:01:39 +02:00
parent 70bba66df3
commit d4b38ff7ae
33 changed files with 927 additions and 30 deletions

View File

@@ -0,0 +1,46 @@
using SewerStammGen.Shared.Contracts;
using SewerStammGen.WPF.Interface.Navigator;
using SewerStammGen.WPF.ViewModel.State;
using Shared.Contracts;
using Shared.Domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SewerStammGen.WPF.Commands
{
class SchachtAddCommand : AsyncCommandBase
{
private readonly ISchachtDataService schachtDataService;
private readonly IActualState actualState;
private readonly IRenavigator renavigator;
private readonly IDataService<Projekt> projektService;
private readonly ISchachtService schachtService;
public SchachtAddCommand(ISchachtDataService schachtDataService,IDataService<Projekt> projektService, IActualState actualState, IRenavigator renavigator, ISchachtService schachtService)
{
this.schachtDataService = schachtDataService;
this.actualState = actualState;
this.renavigator = renavigator;
this.projektService = projektService;
this.schachtService = schachtService;
}
public override async Task ExecuteAsync(object? parameter)
{
/*var d = await projektService.Get(actualState.ProjektID);
Schacht newSchacht = new Schacht();
newSchacht.Projekt = d;
newSchacht.Objektbezeichnung = "test";
await schachtDataService.Create(newSchacht);
*/
Projekt aktuelleProjekt = await projektService.Get(actualState.ProjektID);
Schacht schacht = await schachtService.CreateSchacht(aktuelleProjekt);
}
}
}

View File

@@ -0,0 +1,33 @@
using SewerStammGen.Shared.Contracts;
using SewerStammGen.WPF.Interface.Navigator;
using SewerStammGen.WPF.ViewModel;
using SewerStammGen.WPF.ViewModel.State;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SewerStammGen.WPF.Commands
{
class SchachtDeleteCommand : AsyncCommandBase
{
private ISchachtDataService schachtService;
private IActualState actualState;
private IRenavigator renavigator;
private ManholeListViewModel manholeListViewModel;
public SchachtDeleteCommand(ISchachtDataService schachtService, IActualState actualState, IRenavigator renavigator, ManholeListViewModel manholeListViewModel)
{
this.schachtService = schachtService;
this.actualState = actualState;
this.renavigator = renavigator;
this.manholeListViewModel = manholeListViewModel;
}
public override Task ExecuteAsync(object? parameter)
{
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,33 @@
using SewerStammGen.Shared.Contracts;
using SewerStammGen.WPF.Interface.Navigator;
using SewerStammGen.WPF.ViewModel;
using SewerStammGen.WPF.ViewModel.State;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SewerStammGen.WPF.Commands
{
class SchachtEditCommand : AsyncCommandBase
{
private ISchachtDataService schachtService;
private IActualState actualState;
private IRenavigator renavigator;
private ManholeListViewModel manholeListViewModel;
public SchachtEditCommand(ISchachtDataService schachtService, IActualState actualState, IRenavigator renavigator, ManholeListViewModel manholeListViewModel)
{
this.schachtService = schachtService;
this.actualState = actualState;
this.renavigator = renavigator;
this.manholeListViewModel = manholeListViewModel;
}
public override Task ExecuteAsync(object? parameter)
{
throw new NotImplementedException();
}
}
}