<Window x:Class="WpfApp1.OrdersWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Заказы" Height="450" Width="850"
        WindowStartupLocation="CenterScreen">
    <Grid Margin="15">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <StackPanel Grid.Row="0" Orientation="Horizontal" Margin="0,0,0,10">
            <TextBlock Text="Клиент:" VerticalAlignment="Center" Margin="0,0,10,0"/>
            <ComboBox x:Name="cmbClients" Width="200" DisplayMemberPath="companyname" SelectedValuePath="customerid"/>
            <CheckBox x:Name="chkLate" Content="Только просроченные" VerticalAlignment="Center" Margin="20,0"/>
            <Button Content="Применить" Width="80" Height="28" Margin="10,0" Click="BtnFilter_Click"/>
            <Button Content="Сбросить" Width="80" Height="28" Click="BtnReset_Click"/>
        </StackPanel>

        <DataGrid x:Name="dgOrders" Grid.Row="1" 
                  AutoGenerateColumns="False" IsReadOnly="True"
                  AlternatingRowBackground="#F5F5F5">
            <DataGrid.Columns>
                <DataGridTextColumn Header="ID" Binding="{Binding orderid}" Width="50"/>
                <DataGridTextColumn Header="Клиент" Binding="{Binding companyname}" Width="180"/>
                <DataGridTextColumn Header="Дата заказа" Binding="{Binding orderdate, StringFormat=d}" Width="100"/>
                <DataGridTextColumn Header="Плановая" Binding="{Binding plandate, StringFormat=d}" Width="100"/>
                <DataGridTextColumn Header="Фактическая" Binding="{Binding factdate, StringFormat=d}" Width="100"/>
                <DataGridTextColumn Header="Статус" Binding="{Binding status}" Width="120"/>
            </DataGrid.Columns>
        </DataGrid>
    </Grid>
</Window>