<Page x:Class="esoft.Pages.ExecutorsListPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:local="clr-namespace:esoft.Pages"
      mc:Ignorable="d" 
      d:DesignHeight="1000"
      Title="Список исполнителей" Width="1920" >


    <Grid Width="1920">
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>

        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Height="50" Margin="0,0,0,-13">
            <ComboBox Margin="5" Width="200" Height="25" Name="cbManager" DisplayMemberPath="" FontSize="16" SelectionChanged="cbManager_SelectionChanged">
                <ComboBox.ToolTip>
                    <ToolTip>
                        Отбор по менеджеру
                    </ToolTip>
                </ComboBox.ToolTip>
            </ComboBox>
            <ComboBox Margin="5" Width="200" Height="25" Name="cbExecutor" DisplayMemberPath="" FontSize="16" SelectionChanged="cbExecutor_SelectionChanged">
                <ComboBox.ToolTip>
                    <ToolTip>
                        Отбор по исполнителю
                    </ToolTip>
                </ComboBox.ToolTip>
            </ComboBox>

            <TextBox Margin="5" Width="200" Height="25" Name="Search" FontSize="16" TextChanged="Search_TextChanged">
                <TextBox.Resources>
                    <Style TargetType="{x:Type Border}">
                        <Setter Property="CornerRadius" Value="12"/>
                    </Style>
                </TextBox.Resources>
                <TextBox.ToolTip>
                    <ToolTip>
                        Поиск по наименованию
                    </ToolTip>
                </TextBox.ToolTip>
            </TextBox>
            <Button Height="25" Name="btnClearFilter" Content="Очистка фильтра" Width="200" Margin ="5" FontSize="16" Click="btnClearFilter_Click" Style="{StaticResource  StandartButtons}">
                <Button.Resources>
                    <Style TargetType="Border">
                        <Setter Property="CornerRadius" Value="10"/>
                    </Style>
                </Button.Resources>
            </Button>
        </StackPanel>

        <StackPanel Background="#e6e6e6" Margin="0,15,0,0" Grid.Row="1">
            <TextBlock Text="ФИО исполнителя" FontSize="26" Margin="50, 15, 0, 0" VerticalAlignment ="Center" FontWeight="Bold"></TextBlock>
            <TextBlock Text="Кол-во (заплан.)" Margin="330, -35, 0, 0" FontSize="26" VerticalAlignment ="Center" FontWeight="Bold" TextWrapping="Wrap"></TextBlock>
            <TextBlock Text="Кол-во (испол.)" Margin="570, -35, 0, 0" FontSize="26" VerticalAlignment ="Center" FontWeight="Bold" TextWrapping="Wrap"></TextBlock>
            <TextBlock Text="Кол-во (выпол.)" Margin="800, -35, 0, 0" FontSize="26" VerticalAlignment ="Center" FontWeight="Bold" TextWrapping="Wrap"></TextBlock>
            <TextBlock Text="Кол-во (отмен.)" Margin="1040, -35, 0, 0" FontSize="26" VerticalAlignment ="Center" FontWeight="Bold" TextWrapping="Wrap"></TextBlock>
            <TextBlock Text="Грэйд" HorizontalAlignment="Center" Margin="800, -35, 0, 0" VerticalAlignment ="Center" FontSize="26" FontWeight="Bold" TextWrapping="Wrap"></TextBlock>
            <TextBlock Text="Менеджер" HorizontalAlignment="Center" Margin="1300, -35, 0, 0" VerticalAlignment ="Center" FontSize="26" FontWeight="Bold" TextWrapping="Wrap"></TextBlock>
        </StackPanel>

        <ListView Grid.Row="1" x:Name="LViewExecutors" Height="720" Width="1900" HorizontalAlignment="Center" VerticalAlignment="Top" Background="{x:Null}" BorderBrush="{x:Null}" Margin="0,83,0,0" MouseDoubleClick="LViewExecutors_MouseDoubleClick" ScrollViewer.VerticalScrollBarVisibility="Hidden" Loaded="LViewExecutors_Loaded">
            <ListView.ItemContainerStyle>
                <Style TargetType="ListViewItem">
                    <Setter Property="Margin" Value="0,0,0,10"/>
                    <Setter Property="Width" Value="1870"/>
                    <Setter Property="Background" Value="#73bbff"/>
                    <Style.Resources>
                        <Style TargetType="Border">
                            <Setter Property="CornerRadius" Value="30"/>
                        </Style>
                    </Style.Resources>
                </Style>
            </ListView.ItemContainerStyle>

            <ListView.ItemTemplate>
                <DataTemplate>
                    <Grid HorizontalAlignment="Center" Width="1900" Height="109">
                        <TextBlock Text="{Binding FioUser}" Margin="50, 0, 0, 0" VerticalAlignment="Center" FontSize="26"></TextBlock>
                        <TextBlock Text="{Binding NumberTask_Plan}" Margin="430, 0, 0, 0" VerticalAlignment="Center" FontSize="26"></TextBlock>
                        <TextBlock Text="{Binding NumberTask_Executed}" Margin="650, 0, 0, 0" VerticalAlignment="Center" FontSize="26"></TextBlock>
                        <TextBlock Text="{Binding NumberTask_Done}" Margin="890, 0, 0, 0" VerticalAlignment="Center" FontSize="26"></TextBlock>
                        <TextBlock Text="{Binding NumberTask_Сancelled}" Margin="1120, 0, 0, 0" VerticalAlignment="Center" FontSize="26"></TextBlock>
                        <TextBlock Text="{Binding Grade}" Margin="1325, 0, 0, 0" VerticalAlignment="Center" FontSize="26"></TextBlock>
                        <TextBlock Text="{Binding FioManager}" Margin="1540, 0, 0, 0" VerticalAlignment="Center" FontSize="26"></TextBlock>
                    </Grid>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>

        <Button Grid.Row="1" HorizontalAlignment="Left" Name="BtnDeleteExecutor" Content="Удалить исполнителя" Width="240" Height="40" BorderThickness="0" Style="{StaticResource  StandartButtons}" Margin="1600,805,0,0" Click="BtnDeleteExecutor_Click">
            <Button.Resources>
                <Style TargetType="Border">
                    <Setter Property="CornerRadius" Value="10"/>
                </Style>
            </Button.Resources>
        </Button>

        <Button Grid.Row="1" HorizontalAlignment="Left" Name="BtnAddExecutor" Content="Добавить исполнителя" Width="240" Height="40" BorderThickness="0" Style="{StaticResource  StandartButtons}" Margin="1350,805,0,0" Click="BtnAddExecutor_Click">
            <Button.Resources>
                <Style TargetType="Border">
                    <Setter Property="CornerRadius" Value="10"/>
                </Style>
            </Button.Resources>
        </Button>

        <Button Grid.Row="1" HorizontalAlignment="Left" Name="BtnUpdate" Content="Обновить список" Width="196" Height="40" BorderThickness="0" Style="{StaticResource  StandartButtons}" Margin="1142,805,0,0" Click="BtnUpdate_Click">
            <Button.Resources>
                <Style TargetType="Border">
                    <Setter Property="CornerRadius" Value="10"/>
                </Style>
            </Button.Resources>
        </Button>

        <Button Grid.Row="1" HorizontalAlignment="Left" Name="BtnPriceCoefficient" Content="Расчет заработной платы" Width="260" Height="40" BorderThickness="0" Style="{StaticResource  StandartButtons}" Margin="60,805,0,0" Click="BtnPriceCoefficient_Click">
            <Button.Resources>
                <Style TargetType="Border">
                    <Setter Property="CornerRadius" Value="10"/>
                </Style>
            </Button.Resources>
        </Button>
        
    </Grid>
</Page>
