266 lines
15 KiB
XML
266 lines
15 KiB
XML
<UserControl
|
|
x:Class="BeWo.View.Detail.Wohneinheit.WohneinheitVerwaltungViewV2"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
|
xmlns:local="clr-namespace:BeWo.View.Detail.Wohneinheit"
|
|
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:viewmodel="clr-namespace:BeWo.ViewModel"
|
|
x:Name="root"
|
|
d:DataContext="{d:DesignInstance Type=viewmodel:WohnheimVM,
|
|
IsDesignTimeCreatable=true}"
|
|
d:DesignStyle="{StaticResource MyDesignStyle}"
|
|
mc:Ignorable="d">
|
|
<UserControl.Resources>
|
|
<ResourceDictionary>
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="..\..\..\Styles\ModernOrangeBlack.xaml" />
|
|
</ResourceDictionary.MergedDictionaries>
|
|
</ResourceDictionary>
|
|
</UserControl.Resources>
|
|
<Grid x:Name="root_grid" DataContext="{Binding WohneinheitListVM}">
|
|
<Grid.Resources>
|
|
<ResourceDictionary>
|
|
<Style BasedOn="{StaticResource {x:Type TextBox}}" TargetType="{x:Type TextBox}">
|
|
<Setter Property="IsReadOnly" Value="{Binding DataContext.PermissionWohneinheitManage, Converter={StaticResource BoolReverseConverter}, ElementName=root_grid}" />
|
|
</Style>
|
|
<Style
|
|
x:Key="TextEditCurrencyStyleManage"
|
|
BasedOn="{StaticResource TextEditCurrency}"
|
|
TargetType="{x:Type dxe:TextEdit}">
|
|
<Setter Property="IsReadOnly" Value="{Binding DataContext.PermissionWohneinheitManage, Converter={StaticResource BoolReverseConverter}, ElementName=root_grid}" />
|
|
</Style>
|
|
</ResourceDictionary>
|
|
</Grid.Resources>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<GroupBox
|
|
x:Name="groupbox_Wohneinheit_2"
|
|
Header="{markup:Translate Verwaltung}"
|
|
Style="{StaticResource ObjectEditGroupBox}">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="5*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="auto" />
|
|
</Grid.RowDefinitions>
|
|
<Grid Margin="5">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="auto" />
|
|
</Grid.RowDefinitions>
|
|
<ListBox
|
|
VerticalAlignment="Stretch"
|
|
DisplayMemberPath="Displayname2"
|
|
ItemsSource="{Binding VMList}"
|
|
SelectedItem="{Binding SelectedVM}" />
|
|
<StackPanel
|
|
Grid.Row="1"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<Button
|
|
Width="25"
|
|
Command="{Binding AddVMCommand}"
|
|
Content="+"
|
|
ToolTip="Wohneinheit hinzufügen" />
|
|
<Button
|
|
Width="25"
|
|
Command="{Binding AddChildVMCommand}"
|
|
Content="1"
|
|
FontFamily="Wingdings 2"
|
|
ToolTip="Zimmer hinzufügen" />
|
|
<Button
|
|
Width="25"
|
|
Command="{Binding DeleteSelectedVMCommand}"
|
|
Content="-"
|
|
ToolTip="Wohneinheit entfernen" />
|
|
</StackPanel>
|
|
</Grid>
|
|
<ScrollViewer
|
|
Grid.Column="2"
|
|
Margin="5"
|
|
Padding="5"
|
|
DataContext="{Binding SelectedVM}"
|
|
VerticalScrollBarVisibility="Visible"
|
|
Visibility="{Binding Path=., Converter={StaticResource ObjectVisibilityConverter}}">
|
|
<StackPanel Orientation="Vertical">
|
|
<GroupBox
|
|
x:Name="groupbox_newWohneinheit"
|
|
Header="Allgemeine Informationen"
|
|
Style="{StaticResource ObjectEditGroupBox}">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="2*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Label Grid.Row="0">
|
|
Wohnungsname
|
|
</Label>
|
|
<TextBox
|
|
Grid.Row="0"
|
|
Grid.Column="1"
|
|
IsReadOnly="{Binding DataContext.PermissionWohneinheitManage, Converter={StaticResource BoolReverseConverter}, ElementName=root_grid}"
|
|
Text="{Binding Path=Wohnname, UpdateSourceTrigger=PropertyChanged}" />
|
|
<Label Grid.Row="1">
|
|
Zimmername
|
|
</Label>
|
|
<TextBox
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
IsReadOnly="{Binding DataContext.PermissionWohneinheitManage, Converter={StaticResource BoolReverseConverter}, ElementName=root_grid}"
|
|
Text="{Binding Path=Zimmername, UpdateSourceTrigger=PropertyChanged}" />
|
|
<Label Grid.Row="2">
|
|
Baujahr
|
|
</Label>
|
|
<dxe:TextEdit
|
|
Grid.Row="2"
|
|
Grid.Column="1"
|
|
EditValue="{Binding Path=Baujahr, UpdateSourceTrigger=PropertyChanged}"
|
|
IsReadOnly="{Binding DataContext.PermissionWohneinheitManage, Converter={StaticResource BoolReverseConverter}, ElementName=root_grid}"
|
|
Style="{StaticResource TextEditYear}" />
|
|
|
|
<Label
|
|
Grid.Row="3"
|
|
Grid.Column="0"
|
|
Content="Stock" />
|
|
<TextBox
|
|
Grid.Row="3"
|
|
Grid.Column="1"
|
|
IsReadOnly="{Binding DataContext.PermissionWohneinheitManage, Converter={StaticResource BoolReverseConverter}, ElementName=root_grid}"
|
|
Text="{Binding Path=Stock, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
|
<Label Grid.Row="4">
|
|
Fläche
|
|
</Label>
|
|
<dxe:TextEdit
|
|
Grid.Row="4"
|
|
Grid.Column="1"
|
|
EditValue="{Binding Path=QM, UpdateSourceTrigger=PropertyChanged}"
|
|
IsReadOnly="{Binding DataContext.PermissionWohneinheitManage, Converter={StaticResource BoolReverseConverter}, ElementName=root_grid}"
|
|
Style="{StaticResource TextEditQm}" />
|
|
|
|
<Label Grid.Row="5">
|
|
Kaution
|
|
</Label>
|
|
<dxe:TextEdit
|
|
Grid.Row="5"
|
|
Grid.Column="1"
|
|
EditValue="{Binding Path=Kaution, UpdateSourceTrigger=PropertyChanged}"
|
|
Style="{StaticResource TextEditCurrencyStyleManage}" />
|
|
|
|
<Grid Grid.Row="6" Grid.ColumnSpan="2">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="7*" />
|
|
<ColumnDefinition Width="15*" />
|
|
<ColumnDefinition Width="12*" />
|
|
<ColumnDefinition Width="15*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Label Grid.Row="0">
|
|
Miete
|
|
</Label>
|
|
<dxe:TextEdit
|
|
Grid.Row="0"
|
|
Grid.Column="1"
|
|
EditValue="{Binding Path=Miete, UpdateSourceTrigger=PropertyChanged}"
|
|
Style="{StaticResource TextEditCurrencyStyleManage}" />
|
|
<Label Grid.Row="1" Grid.Column="0">
|
|
Heizung
|
|
</Label>
|
|
<dxe:TextEdit
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
EditValue="{Binding Path=Heizung, UpdateSourceTrigger=PropertyChanged}"
|
|
Style="{StaticResource TextEditCurrencyStyleManage}" />
|
|
<Label Grid.Row="2" Grid.Column="0">
|
|
Strom
|
|
</Label>
|
|
<dxe:TextEdit
|
|
Grid.Row="2"
|
|
Grid.Column="1"
|
|
EditValue="{Binding Path=Strom, UpdateSourceTrigger=PropertyChanged}"
|
|
Style="{StaticResource TextEditCurrencyStyleManage}" />
|
|
<Label Grid.Row="0" Grid.Column="2">
|
|
Betriebskosten
|
|
</Label>
|
|
<dxe:TextEdit
|
|
Grid.Row="0"
|
|
Grid.Column="3"
|
|
EditValue="{Binding Path=Betriebskosten, UpdateSourceTrigger=PropertyChanged}"
|
|
Style="{StaticResource TextEditCurrencyStyleManage}" />
|
|
<Label Grid.Row="1" Grid.Column="2">
|
|
Sonstige Kosten
|
|
</Label>
|
|
<dxe:TextEdit
|
|
Grid.Row="1"
|
|
Grid.Column="3"
|
|
EditValue="{Binding Path=SonstigeKosten, UpdateSourceTrigger=PropertyChanged}"
|
|
Style="{StaticResource TextEditCurrencyStyleManage}" />
|
|
<Label Grid.Row="2" Grid.Column="2">
|
|
Brutto
|
|
</Label>
|
|
<dxe:TextEdit
|
|
Grid.Row="2"
|
|
Grid.Column="3"
|
|
EditValue="{Binding Path=Brutto, Mode=OneWay}"
|
|
IsReadOnly="True"
|
|
Style="{StaticResource TextEditCurrency}" />
|
|
</Grid>
|
|
|
|
<Label
|
|
Grid.Row="7"
|
|
Grid.Column="0"
|
|
Content="Möbilierung" />
|
|
<TextBox
|
|
Grid.Row="7"
|
|
Grid.Column="1"
|
|
IsReadOnly="{Binding DataContext.PermissionWohneinheitManage, Converter={StaticResource BoolReverseConverter}, ElementName=root_grid}"
|
|
Style="{StaticResource TextBoxNoticeExtended}"
|
|
Text="{Binding Path=Mobilierung, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
|
<Label
|
|
Grid.Row="8"
|
|
Grid.Column="0"
|
|
Content="Notiz" />
|
|
<TextBox
|
|
Grid.Row="8"
|
|
Grid.Column="1"
|
|
IsReadOnly="{Binding DataContext.PermissionWohneinheitManage, Converter={StaticResource BoolReverseConverter}, ElementName=root_grid}"
|
|
Style="{StaticResource TextBoxNoticeExtended}"
|
|
Text="{Binding Path=Zusatznotiz, UpdateSourceTrigger=PropertyChanged}" />
|
|
</Grid>
|
|
</GroupBox>
|
|
<local:WohneinheitGrundrissControl DataContext="{Binding ImageListVM}" Visibility="{Binding Path=DataContext.PermissionWohneinheitGalleryView, ElementName=root_grid, Converter={StaticResource BoolVisibilityConverter}}" />
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
|
|
</Grid>
|
|
</GroupBox>
|
|
</Grid>
|
|
</UserControl>
|