<mah:MetroWindow x:Class="ZKuP.GrantParkausweis"
        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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
        xmlns:local="clr-namespace:ZKuP"
        mc:Ignorable="d"
        Title="Parkausweis(e) genehmigen" Height="450" Width="1350" Loaded="Window_Loaded" LocationChanged="Window_LocationChanged">
    <Grid>
        <DataGrid x:Name="dgGrant" AutoGenerateColumns="False" ItemsSource="{Binding .}" CanUserDeleteRows="False" CanUserAddRows="False" CanUserReorderColumns="False">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding idparkausweise}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="ID" IsReadOnly="True" Width="35"/>
                <DataGridTextColumn Binding="{Binding MA_Vorname}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Vorname" IsReadOnly="True" Width="*"/>
                <DataGridTextColumn Binding="{Binding MA_Name}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Nachname" IsReadOnly="True" Width="*"/>
                <DataGridTextColumn Binding="{Binding Abteilung}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Abteilung" IsReadOnly="True" Width="80"/>
                <DataGridTextColumn Binding="{Binding Firma}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Firma" IsReadOnly="True" Width="90"/>
                <DataGridTextColumn Binding="{Binding Adresse}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Adresse" IsReadOnly="True" Width="*"/>
                <DataGridTextColumn Binding="{Binding PLZ}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Postleitzahl" IsReadOnly="True" Width="75">
                    <DataGridTextColumn.CellStyle>
                        <Style>
                            <Setter Property="TextBlock.TextAlignment" Value="Center"/>
                        </Style>
                    </DataGridTextColumn.CellStyle>
                </DataGridTextColumn>
                <DataGridTextColumn Binding="{Binding Kennzeichen}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Kennzeichen" IsReadOnly="True" Width="85">
                    <DataGridTextColumn.CellStyle>
                        <Style>
                            <Setter Property="TextBlock.TextAlignment" Value="Center"/>
                        </Style>
                    </DataGridTextColumn.CellStyle>
                </DataGridTextColumn>
                <DataGridTextColumn Binding="{Binding Email}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="E-Mail" IsReadOnly="True" Width="220"/>
                <DataGridTextColumn Binding="{Binding Telefon}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Telefon" IsReadOnly="True" Width="*"/>
                <DataGridTextColumn Binding="{Binding Vorgesetzter}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Vorgesetzter" IsReadOnly="True" Width="110"/>
                <DataGridCheckBoxColumn Binding="{Binding Schicht}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Schicht" IsReadOnly="True" MaxWidth="0"/>
                <DataGridCheckBoxColumn Binding="{Binding isKrad}" CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Kraftrad?" IsReadOnly="True" Width="92"/>                
                <DataGridTemplateColumn CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Genehmigen" Width="90">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <Button x:Name="btnGrant" Content="Genehmigen" FontSize="12" Padding="-2" Height="25" Click="btnGrant_Click"/>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
                <DataGridTemplateColumn CanUserReorder="False" ClipboardContentBinding="{x:Null}" Header="Ablehnen" Width="90">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <Button x:Name="btnDecline" Content="Ablehnen" FontSize="12" Padding="-2" Height="25" Click="btnDecline_Click"/>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
            </DataGrid.Columns>

        </DataGrid>
    </Grid>
</mah:MetroWindow>
