Haltungen können hinzugefügt werden
vorbereitungen für Haltungmainview angefangen
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using DaSaSo.Domain.Services;
|
||||
using DaSaSo.Domain.Services.BuildingsiteServices;
|
||||
using DaSaSo.Domain.Services.ProjectServices;
|
||||
using DaSaSo.Domain.Services.SewerObjectService;
|
||||
using DaSaSo.EntityFramework;
|
||||
using DaSaSo.EntityFramework.Services;
|
||||
using DaSaSo.ViewModel;
|
||||
@@ -50,6 +51,7 @@ namespace DaSaSo.Wpf
|
||||
services.AddSingleton<ClientListViewModel>();
|
||||
services.AddSingleton<IProjectService, ProjectService>();
|
||||
services.AddSingleton<IBuildingsiteService, BuildingsiteService>();
|
||||
services.AddSingleton<ISewerObjectService, SewerObjectService>();
|
||||
|
||||
|
||||
services.AddSingleton<IViewModelAbstractFactory, MainWindowViewModelFactory>();
|
||||
@@ -103,7 +105,8 @@ namespace DaSaSo.Wpf
|
||||
{
|
||||
return () => new SewerObjectListViewModel(
|
||||
services.GetRequiredService<IDataService<SewerObject>>(),
|
||||
services.GetRequiredService<IActualProject>()
|
||||
services.GetRequiredService<IActualProject>(),
|
||||
services.GetRequiredService<ISewerObjectService>()
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
<Compile Update="Controls\SewerObjectNavigationBar.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="View\Buildingsites\BuildingSiteEditView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="View\Buildingsites\BuildingSiteListView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
@@ -51,6 +54,9 @@
|
||||
<Page Update="Styles\Navigation_Style.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Update="View\Buildingsites\BuildingSiteEditView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Update="View\Buildingsites\BuildingSiteListView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
|
||||
31
DaSaSo.Wpf/View/Buildingsites/BuildingSiteEditView.xaml
Normal file
31
DaSaSo.Wpf/View/Buildingsites/BuildingSiteEditView.xaml
Normal file
@@ -0,0 +1,31 @@
|
||||
<UserControl x:Class="DaSaSo.Wpf.View.Buildingsites.BuildingSiteEditView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
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.Buildingsites" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:BuildingsiteEditViewModel}"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
<StackPanel>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Column="0" Grid.Row="0" Content="Baustellennummer" />
|
||||
<Label Grid.Column="0" Grid.Row="1" Content="Ort" />
|
||||
<Label Grid.Column="0" Grid.Row="2" Content="Ansprechpartner" />
|
||||
<TextBox Grid.Column="1" Grid.Row="0" Text="{Binding BuildingNumber}" />
|
||||
<TextBox Grid.Column="1" Grid.Row="1" Text="{Binding Country}" />
|
||||
<TextBox Grid.Column="1" Grid.Row="2" Text="{Binding Contactperson}" />
|
||||
</Grid>
|
||||
<Button Content="Speichern" Command="{Binding SaveBuildingsiteCommand}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
28
DaSaSo.Wpf/View/Buildingsites/BuildingSiteEditView.xaml.cs
Normal file
28
DaSaSo.Wpf/View/Buildingsites/BuildingSiteEditView.xaml.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace DaSaSo.Wpf.View.Buildingsites
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for BuildingSiteEditView.xaml
|
||||
/// </summary>
|
||||
public partial class BuildingSiteEditView : UserControl
|
||||
{
|
||||
public BuildingSiteEditView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@
|
||||
<DataGrid ItemsSource="{Binding Buildingsites}" SelectedItem="{Binding SelectedBuildingsite}" />
|
||||
<Button Content="Selektiere" Command="{Binding SelectCommand}" />
|
||||
<Button Content="Hinzufügen" Command="{Binding AddCommand}" />
|
||||
<Button Content="Bearbeiten" Command="{Binding EditCommand}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
<DataTemplate DataType="{x:Type model:SewerObject}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding ObjektName}" />
|
||||
<TextBlock Text="{Binding Material}" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
@@ -33,7 +34,8 @@
|
||||
</Style>
|
||||
</TreeView.Resources>
|
||||
</TreeView>
|
||||
<Button Content="Bearbeiten" Name="bearbeiten" Command="{Binding Bearbeiten}" />
|
||||
<Button Content="Bearbeiten" Name="bearbeiten" Command="{Binding EditCommand}" />
|
||||
<Button Content="Hinzufügen" Command="{Binding AddCommand}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
<DataTemplate DataType="{x:Type viewmodel:BuildingsiteListViewModel}">
|
||||
<BuildingsiteViews:BuildingSiteListView />
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type viewmodel:BuildingsiteEditViewModel}">
|
||||
<BuildingsiteViews:BuildingSiteEditView />
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type viewmodel:SewerObjectListViewModel}">
|
||||
<SewerObjectViews:SewerObjecteListView />
|
||||
</DataTemplate>
|
||||
|
||||
Reference in New Issue
Block a user