<Window
    x:Class="Client.View.EmployeeDetailView"
    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:ei="http://schemas.microsoft.com/expression/2010/interactions"
    xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
    xmlns:local="clr-namespace:Client.View"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:vm="clr-namespace:Client.ViewModel"
    xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
    x:Name="EmployeeDetailWindow"
    Width="600"
    Height="650"
    Icon="/Client;component/Img/icon.png"
    ResizeMode="NoResize"
    VisualTextRenderingMode="ClearType"
    mc:Ignorable="d">

    <Grid Background="#FFD6DFE1">

        <Grid.RowDefinitions>
            <RowDefinition Height="50" />
            <RowDefinition Height="70" />
            <RowDefinition Height="70" />
            <RowDefinition Height="70" />
            <RowDefinition Height="70" />
            <RowDefinition Height="70" />
            <RowDefinition Height="70" />
            <RowDefinition Height="70" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <Rectangle
            Grid.Row="0"
            Grid.Column="0"
            Grid.ColumnSpan="3"
            Height="50"
            HorizontalAlignment="Stretch"
            VerticalAlignment="Top">
            <Rectangle.Fill>
                <LinearGradientBrush MappingMode="RelativeToBoundingBox" StartPoint="0.5,0" EndPoint="0.5,1">
                    <GradientStop Color="#FF065393" />
                    <GradientStop Offset="1" Color="#FF1D507A" />
                </LinearGradientBrush>
            </Rectangle.Fill>
        </Rectangle>
        <TextBlock
            Grid.Row="0"
            Grid.Column="0"
            Grid.ColumnSpan="3"
            Margin="50,10,0,0"
            HorizontalAlignment="Left"
            VerticalAlignment="Top"
            FontSize="24"
            FontWeight="Bold"
            Foreground="White"
            Text="DETAIL ZAMĚSTNANCE" />

        <Label
            Grid.Row="1"
            Margin="50,0,0,0"
            Content="Jméno"
            Style="{StaticResource DetailLabel}" />
        <TextBox
            Grid.Row="1"
            Width="235"
            Height="30"
            Margin="50,30,0,0"
            HorizontalAlignment="Left"
            VerticalAlignment="Top"
            HorizontalContentAlignment="Left"
            VerticalContentAlignment="Center"
            Background="White"
            BorderBrush="#77869b"
            BorderThickness="1"
            FontSize="16"
            Foreground="#FF383636"
            Text="{Binding Path=Employee.FirstName}" />

        <Label
            Grid.Row="2"
            Margin="50,0,0,0"
            Content="Titul před jménem"
            Style="{StaticResource DetailLabel}" />
        <TextBox
            Grid.Row="2"
            Width="235"
            Height="30"
            Margin="50,30,0,0"
            HorizontalAlignment="Left"
            VerticalAlignment="Top"
            HorizontalContentAlignment="Left"
            VerticalContentAlignment="Center"
            Background="White"
            BorderBrush="#77869b"
            BorderThickness="1"
            FontSize="16"
            Foreground="#FF383636"
            Text="{Binding Path=Employee.TitleBefore}" />

        <Label
            Grid.Row="3"
            Margin="50,0,0,0"
            Content="Rodné číslo"
            Style="{StaticResource DetailLabel}" />
        <TextBox
            Grid.Row="3"
            Width="235"
            Height="30"
            Margin="50,30,0,0"
            HorizontalAlignment="Left"
            VerticalAlignment="Top"
            HorizontalContentAlignment="Left"
            VerticalContentAlignment="Center"
            Background="White"
            BorderBrush="#77869b"
            BorderThickness="1"
            FontSize="16"
            Foreground="#FF383636"
            Text="{Binding Path=Employee.NationalId}" />

        <Label
            Grid.Row="4"
            Margin="50,0,0,0"
            Content="Město"
            Style="{StaticResource DetailLabel}" />
        <TextBox
            Grid.Row="4"
            Width="235"
            Height="30"
            Margin="50,30,0,0"
            HorizontalAlignment="Left"
            VerticalAlignment="Top"
            HorizontalContentAlignment="Left"
            VerticalContentAlignment="Center"
            Background="White"
            BorderBrush="#77869b"
            BorderThickness="1"
            FontSize="16"
            Foreground="#FF383636"
            Text="{Binding Path=Employee.City}" />

        <Label
            Grid.Row="5"
            Margin="50,0,0,0"
            Content="PSČ"
            Style="{StaticResource DetailLabel}" />
        <TextBox
            Grid.Row="5"
            Width="235"
            Height="30"
            Margin="50,30,0,0"
            HorizontalAlignment="Left"
            VerticalAlignment="Top"
            HorizontalContentAlignment="Left"
            VerticalContentAlignment="Center"
            Background="White"
            BorderBrush="#77869b"
            BorderThickness="1"
            FontSize="16"
            Foreground="#FF383636"
            Text="{Binding Path=Employee.ZIPCode}" />

        <Label
            Grid.Row="6"
            Margin="50,0,0,0"
            Content="Telefon"
            Style="{StaticResource DetailLabel}" />
        <TextBox
            Grid.Row="6"
            Width="235"
            Height="30"
            Margin="50,30,0,0"
            HorizontalAlignment="Left"
            VerticalAlignment="Top"
            HorizontalContentAlignment="Left"
            VerticalContentAlignment="Center"
            Background="White"
            BorderBrush="#77869b"
            BorderThickness="1"
            FontSize="16"
            Foreground="#FF383636"
            Text="{Binding Path=Employee.PhoneNumber}" />

        <Label
            Grid.Row="7"
            Margin="50,0,0,0"
            Content="Pozice"
            Style="{StaticResource DetailLabel}" />
        <ComboBox
            Grid.Row="7"
            Grid.Column="0"
            Width="235"
            Height="30"
            Margin="50,30,0,0"
            HorizontalAlignment="Left"
            VerticalAlignment="Top"
            HorizontalContentAlignment="Left"
            VerticalContentAlignment="Center"
            Background="Blue"
            DisplayMemberPath="Name"
            FontSize="14"
            ItemsSource="{Binding Path=PositionComboDataSet}"
            SelectedItem="{Binding Path=Employee.EmployeePosition, Mode=TwoWay}"
            SelectedValue="{Binding Path=Employee.EmployeePositionId, Mode=TwoWay}"
            SelectedValuePath="Id" />

        <Label
            Grid.Row="1"
            Grid.Column="1"
            Margin="14,0,0,0"
            Content="Příjmení"
            Style="{StaticResource DetailLabel}" />
        <TextBox
            Grid.Row="1"
            Grid.Column="1"
            Width="235"
            Height="30"
            Margin="14,30,0,0"
            HorizontalAlignment="Left"
            VerticalAlignment="Top"
            HorizontalContentAlignment="Left"
            VerticalContentAlignment="Center"
            Background="White"
            BorderBrush="#77869b"
            BorderThickness="1"
            FontSize="16"
            Foreground="#FF383636"
            Text="{Binding Employee.LastName}" />


        <Label
            Grid.Row="2"
            Grid.Column="1"
            Margin="10,0,0,0"
            Content="Titul za jménem"
            Style="{StaticResource DetailLabel}" />

        <TextBox
            Grid.Row="2"
            Grid.Column="1"
            Width="235"
            Height="30"
            Margin="14,30,0,0"
            HorizontalAlignment="Left"
            VerticalAlignment="Top"
            HorizontalContentAlignment="Left"
            VerticalContentAlignment="Center"
            Background="White"
            BorderBrush="#77869b"
            BorderThickness="1"
            FontSize="16"
            Foreground="#FF383636"
            Text="{Binding Employee.TitleAfter}" />

        <Label
            Grid.Row="3"
            Grid.Column="1"
            Margin="10,0,0,0"
            Content="Datum narození"
            Style="{StaticResource DetailLabel}" />
        <xctk:DateTimePicker
            Grid.Row="3"
            Grid.Column="1"
            Width="235"
            Height="30"
            Margin="14,31,0,0"
            HorizontalAlignment="Left"
            VerticalAlignment="Top"
            HorizontalContentAlignment="Left"
            FontSize="14"
            Format="ShortDate"
            Language="cs-CZ"
            TextAlignment="Left"
            Value="{Binding Path=Employee.DateOfBirth}" />

        <Label
            Grid.Row="4"
            Grid.Column="1"
            Margin="10,0,0,0"
            Content="Ulice"
            Style="{StaticResource DetailLabel}" />

        <TextBox
            Grid.Row="4"
            Grid.Column="1"
            Width="235"
            Height="30"
            Margin="14,30,0,0"
            HorizontalAlignment="Left"
            VerticalAlignment="Top"
            HorizontalContentAlignment="Left"
            VerticalContentAlignment="Center"
            Background="White"
            BorderBrush="#77869b"
            BorderThickness="1"
            FontSize="16"
            Foreground="#FF383636"
            Text="{Binding Path=Employee.Street}" />

        <Label
            Grid.Row="5"
            Grid.Column="1"
            Margin="10,0,0,0"
            Content="Datum nástupu"
            Style="{StaticResource DetailLabel}" />
        <xctk:DateTimePicker
            Grid.Row="5"
            Grid.Column="1"
            Width="235"
            Height="30"
            Margin="14,31,0,0"
            HorizontalAlignment="Left"
            VerticalAlignment="Top"
            HorizontalContentAlignment="Left"
            FontSize="14"
            Format="ShortDate"
            Language="cs-CZ"
            TextAlignment="Left"
            Value="{Binding Path=Employee.DateJoined}" />

        <Label
            Grid.Row="6"
            Grid.Column="1"
            Margin="10,0,0,0"
            Content="Email"
            Style="{StaticResource DetailLabel}" />

        <TextBox
            Grid.Row="6"
            Grid.Column="1"
            Width="235"
            Height="30"
            Margin="14,30,0,0"
            HorizontalAlignment="Left"
            VerticalAlignment="Top"
            HorizontalContentAlignment="Left"
            VerticalContentAlignment="Center"
            Background="White"
            BorderBrush="#77869b"
            BorderThickness="1"
            FontSize="16"
            Foreground="#FF383636"
            Text="{Binding Path=Employee.Email}" />

        <Label
            Grid.Row="7"
            Grid.Column="1"
            Margin="10,0,0,0"
            Content="Oddělení"
            Style="{StaticResource DetailLabel}" />
        <ComboBox
            Grid.Row="7"
            Grid.Column="1"
            Width="235"
            Height="30"
            Margin="14,30,0,0"
            HorizontalAlignment="Left"
            VerticalAlignment="Top"
            HorizontalContentAlignment="Left"
            VerticalContentAlignment="Center"
            Background="Blue"
            DisplayMemberPath="Name"
            FontSize="14"
            ItemsSource="{Binding Path=DepartmentComboDataSet}"
            SelectedItem="{Binding Path=Employee.Department, Mode=TwoWay}"
            SelectedValue="{Binding Path=Employee.DepartmentId, Mode=TwoWay}"
            SelectedValuePath="Id" />

        <Button
            Grid.Row="8"
            Grid.Column="1"
            Width="100"
            Height="30"
            Margin="0,25,48,25"
            HorizontalAlignment="Right"
            VerticalAlignment="Center"
            HorizontalContentAlignment="Center"
            Background="#FF1D507A"
            BorderBrush="#FF24334D"
            BorderThickness="0"
            Command="{Binding SaveEmployeeCommand}"
            CommandParameter="{Binding ElementName=EmployeeDetailWindow}"
            Content="ULOŽIT"
            FontSize="16"
            FontWeight="Bold"
            Foreground="White" />
        <Button
            Grid.Row="8"
            Grid.Column="1"
            Width="100"
            Height="30"
            Margin="0,25,183,25"
            HorizontalAlignment="Right"
            VerticalAlignment="Center"
            HorizontalContentAlignment="Center"
            Background="#FF1D507A"
            BorderBrush="#FF24334D"
            BorderThickness="0"
            Command="{Binding CancelCommand}"
            CommandParameter="{Binding ElementName=EmployeeDetailWindow}"
            Content="ZRUŠIT"
            FontSize="16"
            FontWeight="Bold"
            Foreground="White" />


    </Grid>
</Window>
