Sewerpoints und Objektnummern hinzugefügt

This commit is contained in:
HuskyTeufel
2021-09-28 17:52:17 +02:00
parent e8674fed2c
commit a8029c091d
27 changed files with 1196 additions and 67 deletions

View File

@@ -8,6 +8,10 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.0-preview.7.21378.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0-rc.1.21451.13" />
</ItemGroup>

View File

@@ -30,6 +30,7 @@ namespace DaSaSo.Wpf.HostBuilders
services.AddSingleton<IBuildingsiteService, BuildingsiteService>();
services.AddSingleton<ISewerObjectService, SewerObjectService>();
services.AddSingleton<ISewerpointService, SewerpointService>();
services.AddSingleton<ISewerPointDataService, SewerpointDataService>();
});
return host;
}

View File

@@ -48,7 +48,9 @@ namespace DaSaSo.Wpf.HostBuilders
services.AddTransient<CreateViewModel<SewerStammdatenViewModel>>(services =>
{
return () => new SewerStammdatenViewModel(
services.GetRequiredService<IActualProject>()
services.GetRequiredService<IActualProject>(),
services.GetRequiredService<IDataService<SewerObject>>(),
services.GetRequiredService<ISewerpointService>()
);
});
services.AddSingleton<CreateViewModel<SewerDamageListViewModel>>(services =>

View File

@@ -13,8 +13,16 @@
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Content="Projektname" />
<TextBox Grid.Column="1" Text="{Binding ProjektName}" />
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="Projektname" />
<Label Grid.Row="1" Grid.Column="0" Content="Projektnummer" />
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding ProjektName}" />
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding ProjektNummer}" />
</Grid>
<Button Content="Speichern" Command="{Binding SaveProjectCommand}" />
</StackPanel>

View File

@@ -26,7 +26,7 @@
<Controls:SewerObjectNavigationBar Grid.Column="0" />
<ContentControl Grid.Column="1" Content="{Binding CurrentSewerViewModel}" />
<StackPanel Grid.Row="1" Grid.ColumnSpan="2">
<Button Content="Speichern und Schließen" Command="{Binding SaveCommand}" />
<Button Content="Schließen" Command="{Binding SaveCommand}" />
<StatusBar Grid.Row="1" Grid.ColumnSpan="2">
<StatusBarItem Content="Dada" />
</StatusBar>

View File

@@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject"
xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:SewerStammdatenViewModel}"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
@@ -11,6 +11,10 @@
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<Grid Grid.Column="0">
<Grid.ColumnDefinitions>
<ColumnDefinition />
@@ -51,5 +55,6 @@
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding Strasse}" Margin="20"/>
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Ort}" Margin="20"/>
</Grid>
<Button Grid.Row="1" Grid.ColumnSpan="2" FontSize="20" Content="Speichern" Command="{Binding SaveCommand}" />
</Grid>
</UserControl>

View File

@@ -1,6 +1,6 @@
{
"ConnectionStrings": {
"databaseToUse": "sqlite",
"databaseToUse": "default",
"default": "Host = localhost; Database = dasaso; Username = kansan; Password = kansan",
"sqlite": "Data Source=database.db"
}