340 lines
23 KiB
XML
340 lines
23 KiB
XML
<localView:BeWoView
|
|
x:Class="BeWo.View.Navigation.CustomerNavigationView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:localNavView="clr-namespace:BeWo.View.Navigation"
|
|
xmlns:localView="clr-namespace:BeWo.View"
|
|
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
|
|
x:Name="root_view"
|
|
Loaded="OnLoaded">
|
|
<Grid>
|
|
<Grid.Resources>
|
|
<Style x:Key="CustomerDetailStyle" TargetType="{x:Type ListBoxItem}">
|
|
<Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorLevel=1, AncestorType={x:Type ItemsControl}, Mode=FindAncestor}}" />
|
|
<Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorLevel=1, AncestorType={x:Type ItemsControl}, Mode=FindAncestor}}" />
|
|
<Setter Property="Margin" Value="0,2,0,0" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate>
|
|
<Grid>
|
|
<Border
|
|
x:Name="ItemBorder"
|
|
MinHeight="30"
|
|
Background="#FF000000"
|
|
CornerRadius="5">
|
|
<Border.OpacityMask>
|
|
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
|
|
<GradientStop Offset="0" Color="#19000000" />
|
|
<GradientStop Offset="1" Color="#26000000" />
|
|
</LinearGradientBrush>
|
|
</Border.OpacityMask>
|
|
</Border>
|
|
<Border
|
|
x:Name="ItemContent"
|
|
MinHeight="30"
|
|
CornerRadius="5">
|
|
<Grid
|
|
Margin="5,3,5,3"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch"
|
|
OpacityMask="{x:Null}"
|
|
SnapsToDevicePixels="True">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" SharedSizeGroup="CustomerDetailColumn" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<Image
|
|
Grid.Row="0"
|
|
Grid.RowSpan="2"
|
|
Width="Auto"
|
|
Height="30"
|
|
Margin="0,0,5,0"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Center"
|
|
RenderTransformOrigin="0.5,0.5"
|
|
Source="..\..\Ressources\Icons\UserHomeMaleDisabled.png" />
|
|
<StackPanel
|
|
Grid.Row="0"
|
|
Grid.Column="1"
|
|
Orientation="Horizontal">
|
|
<TextBlock
|
|
x:Name="txtDetail1"
|
|
FontFamily="Microsoft Sans Serif"
|
|
FontSize="14"
|
|
Foreground="#FFD2D2D2"
|
|
Text="{Binding Path=SimpleDescription}" />
|
|
<TextBlock
|
|
x:Name="txtDetail2"
|
|
Margin="6,0,0,0"
|
|
FontFamily="Microsoft Sans Serif"
|
|
FontSize="14"
|
|
Foreground="#FFD2D2D2"
|
|
Text="{Binding Path=DateOfBirthString}" />
|
|
<TextBlock
|
|
x:Name="txtDetailTeams"
|
|
Margin="0,0,6,0"
|
|
FontFamily="Microsoft Sans Serif"
|
|
FontSize="14"
|
|
Foreground="#FFD2D2D2"
|
|
Text="{Binding Path=Teams}" />
|
|
</StackPanel>
|
|
|
|
<StackPanel
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
Orientation="Horizontal">
|
|
<TextBlock
|
|
x:Name="txtDetail3"
|
|
FontFamily="Microsoft Sans Serif"
|
|
FontSize="12"
|
|
Foreground="#FFA0A0A0"
|
|
Text="{Binding Path=AddressString}" />
|
|
</StackPanel>
|
|
<TextBlock
|
|
x:Name="txtDetail4"
|
|
Grid.Row="0"
|
|
Grid.Column="2"
|
|
Margin="16,0,0,0"
|
|
FontFamily="Microsoft Sans Serif"
|
|
FontSize="14"
|
|
Foreground="#FFD2D2D2"
|
|
Text="{Binding Path=CurrentEmployeeRole}" />
|
|
<TextBlock
|
|
x:Name="txtDetail5"
|
|
Grid.Row="1"
|
|
Grid.Column="2"
|
|
Margin="16,0,0,0"
|
|
FontFamily="Microsoft Sans Serif"
|
|
FontSize="14"
|
|
Foreground="#FFA0A0A0"
|
|
Text="{Binding Path=MainAttendant}" />
|
|
|
|
<!-- Image x:Name="imgArchiv" Grid.Row="0" Grid.Column="2" Visibility="Collapsed" Grid.RowSpan="2" Source="..\Ressources\Icons\Archiv.png" Margin="0,0,5,0" Height="30" VerticalAlignment="Center" HorizontalAlignment="Stretch" Width="Auto" RenderTransformOrigin="0.5,0.5" / -->
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
Grid.RowSpan="2"
|
|
Grid.Column="4"
|
|
Margin="0,0,3,0"
|
|
VerticalAlignment="Center"
|
|
Visibility="{Binding Path=IsDeleted, Converter={StaticResource AnonymizationRight2VisibilityConverter}, ConverterParameter=Customer}">
|
|
<Hyperlink
|
|
Click="Hyperlink_Anonymize_Click"
|
|
Foreground="#FFF97E7B"
|
|
Tag="{Binding}"
|
|
TargetName="_NewWindow">
|
|
Anonymisieren
|
|
</Hyperlink>
|
|
</TextBlock>
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
Grid.RowSpan="2"
|
|
Grid.Column="5"
|
|
Margin="0,0,3,0"
|
|
VerticalAlignment="Center"
|
|
Visibility="{Binding Path=IsDeleted, Converter={StaticResource DeleteForGoodRight2VisibilityConverter}, ConverterParameter=Customer}">
|
|
<Hyperlink
|
|
Click="Hyperlink_Delete_For_Good_Click"
|
|
Foreground="#FFF97E7B"
|
|
Tag="{Binding}"
|
|
TargetName="_NewWindow">
|
|
Endgültig löschen
|
|
</Hyperlink>
|
|
</TextBlock>
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
Grid.RowSpan="2"
|
|
Grid.Column="3"
|
|
Margin="0,0,3,0"
|
|
VerticalAlignment="Center"
|
|
Visibility="{Binding Path=IsDeleted, Converter={StaticResource ReactivationRight2VisibilityConverter}, ConverterParameter=Customer}">
|
|
<Hyperlink
|
|
Click="Hyperlink_Reaktivieren_Click"
|
|
Foreground="#FFFFFFFF"
|
|
Tag="{Binding}"
|
|
TargetName="_NewWindow">
|
|
Reaktivieren
|
|
</Hyperlink>
|
|
</TextBlock>
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
Grid.RowSpan="2"
|
|
Grid.Column="3"
|
|
Margin="0,0,3,0"
|
|
VerticalAlignment="Center"
|
|
Visibility="{Binding Path=IsArchived, Converter={StaticResource ArchiveRight2VisibilityConverter}, ConverterParameter=Customer}">
|
|
<Hyperlink
|
|
Click="Hyperlink_AusArchivHolen_Click"
|
|
Foreground="#FFFFFFFF"
|
|
Tag="{Binding}"
|
|
TargetName="_NewWindow">
|
|
Aus Archiv holen
|
|
</Hyperlink>
|
|
</TextBlock>
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
Grid.RowSpan="2"
|
|
Grid.Column="6"
|
|
VerticalAlignment="Center">
|
|
<Hyperlink
|
|
Foreground="#FFFFFFFF"
|
|
NavigateUri="{Binding Converter={StaticResource CustomerDCPrintURLConverter}}"
|
|
RequestNavigate="Hyperlink_OnRequestNavigate"
|
|
Tag="{Binding}"
|
|
TargetName="_NewWindow">
|
|
Drucken
|
|
</Hyperlink>
|
|
</TextBlock>
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<DataTrigger Binding="{Binding Path=IsArchived}" Value="True">
|
|
<Setter TargetName="txtDetail1" Property="Foreground" Value="#FF808080" />
|
|
<Setter TargetName="txtDetail2" Property="Foreground" Value="#FF808080" />
|
|
<Setter TargetName="txtDetail3" Property="Foreground" Value="#FF808080" />
|
|
<Setter TargetName="txtDetail4" Property="Foreground" Value="#FF808080" />
|
|
<Setter TargetName="txtDetail5" Property="Foreground" Value="#FF808080" />
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding Path=IsDeleted}" Value="True">
|
|
<Setter TargetName="txtDetail1" Property="Foreground" Value="#FFF97E7B" />
|
|
<Setter TargetName="txtDetail2" Property="Foreground" Value="#FFF97E7B" />
|
|
<Setter TargetName="txtDetail3" Property="Foreground" Value="#FFF97E7B" />
|
|
<Setter TargetName="txtDetail4" Property="Foreground" Value="#FFF97E7B" />
|
|
<Setter TargetName="txtDetail5" Property="Foreground" Value="#FFF97E7B" />
|
|
</DataTrigger>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="ItemBorder" Property="OpacityMask">
|
|
<Setter.Value>
|
|
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
|
|
<GradientStop Offset="0" Color="#33000000" />
|
|
<GradientStop Offset="1" Color="#66000000" />
|
|
</LinearGradientBrush>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Trigger>
|
|
<Trigger Property="ListBoxItem.IsSelected" Value="True">
|
|
<Setter TargetName="ItemBorder" Property="OpacityMask">
|
|
<Setter.Value>
|
|
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
|
|
<GradientStop Offset="0" Color="#99000000" />
|
|
<GradientStop Offset="1" Color="#CC000000" />
|
|
</LinearGradientBrush>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Trigger>
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="ListBoxItem.IsSelected" Value="True" />
|
|
<Condition Property="Selector.IsSelectionActive" Value="False" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="ItemBorder" Property="OpacityMask">
|
|
<Setter.Value>
|
|
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
|
|
<GradientStop Offset="0" Color="#99000000" />
|
|
<GradientStop Offset="1" Color="#B2000000" />
|
|
</LinearGradientBrush>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</MultiTrigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<DataTemplate x:Key="CustomerDetailInfoTemplate">
|
|
<StackPanel>
|
|
<TextBlock
|
|
Margin="5"
|
|
FontFamily="Microsoft Sans Serif"
|
|
FontSize="14"
|
|
Foreground="#FFD2D2D2"
|
|
Text="{Binding CurrentSupportConcept}"
|
|
TextWrapping="Wrap" />
|
|
<ListView
|
|
Margin="10,5,5,5"
|
|
HorizontalAlignment="Stretch"
|
|
HorizontalContentAlignment="Stretch"
|
|
Background="{x:Null}"
|
|
BorderBrush="{x:Null}"
|
|
ItemsSource="{Binding SupportConceptInfos}">
|
|
<ListView.ItemContainerStyle>
|
|
<Style TargetType="{x:Type ListBoxItem}">
|
|
<Setter Property="Focusable" Value="false" />
|
|
</Style>
|
|
</ListView.ItemContainerStyle>
|
|
<ListView.Resources>
|
|
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent" />
|
|
<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="Transparent" />
|
|
</ListView.Resources>
|
|
<ListView.ItemTemplate>
|
|
<DataTemplate>
|
|
<Grid>
|
|
<Border
|
|
x:Name="ItemBorder"
|
|
MinHeight="30"
|
|
Margin="0,0,0,3"
|
|
Background="#FF000000"
|
|
CornerRadius="5">
|
|
<Border.OpacityMask>
|
|
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
|
|
<GradientStop Offset="0" Color="#19000000" />
|
|
<GradientStop Offset="1" Color="#26000000" />
|
|
</LinearGradientBrush>
|
|
</Border.OpacityMask>
|
|
</Border>
|
|
<StackPanel Margin="5">
|
|
<TextBlock
|
|
FontFamily="Microsoft Sans Serif"
|
|
FontSize="14"
|
|
Foreground="#FFD2D2D2"
|
|
Text="{Binding CostBearer, Converter={StaticResource StringFormatConverter}, ConverterParameter={markup:Translate Kostenträger: \{0\}}}" />
|
|
<TextBlock
|
|
Margin="5,5,0,0"
|
|
FontFamily="Microsoft Sans Serif"
|
|
FontSize="12"
|
|
Foreground="#FFD2D2D2"
|
|
Text="{Binding ApprovedHours, Converter={StaticResource StringFormatConverter}, ConverterParameter=Genehmigte FLS: \{0:0.##\}}" />
|
|
<TextBlock
|
|
Margin="5,2,0,0"
|
|
FontFamily="Microsoft Sans Serif"
|
|
FontSize="12"
|
|
Foreground="#FFD2D2D2"
|
|
Text="{Binding RecordedHours, Converter={StaticResource StringFormatConverter}, ConverterParameter=Geleistete FLS: \{0:0.##\}}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ListView.ItemTemplate>
|
|
</ListView>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</Grid.Resources>
|
|
<localNavView:MainNavigationView
|
|
x:Name="mainNavigationView"
|
|
ArchiveObject="mainNavigationView_ArchiveObject"
|
|
ContentGroupStyle="{StaticResource CustomerNavigationStyle}"
|
|
CreateDemands="CreateAll, CustomerView_Create"
|
|
CreateNewObject="mainNavigationView_CreateNewObject"
|
|
DeleteDemands="DeleteAll, CustomerView_Delete"
|
|
DeleteObject="mainNavigationView_DeleteObject"
|
|
DetailPanelItemTemplate="{StaticResource CustomerDetailInfoTemplate}"
|
|
ExcelExport="mainNavigationView_ExcelExport"
|
|
HistoryListItemStyle="{StaticResource SearchSimpleStyle}"
|
|
MainGroupHeader="{markup:Translate Klienten}"
|
|
MainListItemStyle="{StaticResource CustomerDetailStyle}"
|
|
OnReloadData="MainNavigationView_OnReloadData"
|
|
OpenMailMergeWindow="MainNavigationView_OnOpenMailMergeWindow"
|
|
OpenObject="mainNavigationView_OpenObject"
|
|
Print="mainNavigationView_Print"
|
|
ShowDetailsPanel="True" />
|
|
|
|
</Grid>
|
|
</localView:BeWoView> |