<Window x:Class="WpfApp1.DriversWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Водители" Height="500" Width="800"
        WindowStartupLocation="CenterScreen">
    <Grid Margin="15">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <TextBlock Text="Справочник водителей" FontSize="18" FontWeight="Bold" Margin="0,0,0,10"/>

        <DataGrid x:Name="dgDrivers" Grid.Row="1" 
                  AutoGenerateColumns="False" IsReadOnly="True"
                  SelectionMode="Single" Margin="0,0,0,10">
            <DataGrid.Columns>
                <DataGridTextColumn Header="ID" Binding="{Binding driverid}" Width="60"/>
                <DataGridTextColumn Header="Фамилия" Binding="{Binding lastname}" Width="150"/>
                <DataGridTextColumn Header="Имя и Отчество" Binding="{Binding fullname}" Width="220"/>
                <DataGridTextColumn Header="Табельный номер" Binding="{Binding tabnumber}" Width="130"/>
            </DataGrid.Columns>
        </DataGrid>

        <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center">
            <Button Content="Добавить" Width="100" Height="32" Margin="5" Click="BtnAdd_Click"/>
            <Button Content="Изменить" Width="100" Height="32" Margin="5" Click="BtnEdit_Click"/>
            <Button Content="Удалить" Width="100" Height="32" Margin="5" Click="BtnDelete_Click"/>
            <Button Content="Обновить" Width="100" Height="32" Margin="5" Click="BtnRefresh_Click"/>
        </StackPanel>
    </Grid>
</Window>
