<Page x:Class="MWS.Domain.View.Weight.WeightRecordPage"
      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:MWS.Domain.View.Weight"
      d:DesignHeight="935" d:DesignWidth="1721"
      mc:Ignorable="d" 
      xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes" 
      xmlns:page="clr-namespace:MWS.Domain.Common.ControlHelper"
      Loaded="Page_Loaded"
      Title="WeightRecordPage" Background="#F3F7FA">

    <Grid>
        <DockPanel   Height="110" VerticalAlignment="Top" Grid.ColumnSpan="2">
            <!--<StackPanel DockPanel.Dock="Left" Orientation="Horizontal" Margin="21,20,12,20" >
                <TextBlock Text="关键字" VerticalAlignment="Center" Margin="0,0,10,0" />
                <TextBox x:Name="keyword"  Style="{StaticResource DefaultTextBoxStyle}" BorderBrush="#CCCCCC" Height="36" Width="200"  md:HintAssist.Hint="检索关键字" />
            </StackPanel>-->
            <StackPanel Orientation="Horizontal" Margin="21,20,12,20" >
                <TextBlock Text="料口" VerticalAlignment="Center" Margin="0,0,10,0" />
                <ComboBox x:Name="entrance"  Style="{StaticResource DefaultComboBoxStyle}"  
                          md:HintAssist.Hint="全部"   Height="36"   Width="160" >

                </ComboBox>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Margin="12,20" >
                <TextBlock Text="设备" VerticalAlignment="Center" Margin="0,0,10,0" />
                <ComboBox x:Name="device"  Style="{StaticResource DefaultComboBoxStyle}"  
                          md:HintAssist.Hint="全部"   Height="36"   Width="160" >

                </ComboBox>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Margin="12,20">
                <TextBlock Text="班组" VerticalAlignment="Center" Margin="0,0,10,0" />
                <ComboBox x:Name="team"  Style="{StaticResource DefaultComboBoxStyle}"  ItemsSource="{Binding}"
                          md:HintAssist.Hint="全部"   Height="36"   Width="160" >

                </ComboBox>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Margin="12,20" >
                <TextBlock Text="时间范围" VerticalAlignment="Center" Margin="0,0,10,0" />
                <Button x:Name="btDataSelect" Height="36" Foreground="#888888" Width="280" BorderThickness="1" Background="#FFFFFF" BorderBrush="#CCCCCC"  Click="btDataSelect_Click">
                    <TextBlock >
                            <Label Content="选择时间" x:Name="lbDateTimeSelect" FontSize="14" Margin="0,0,0,1"/>
                    </TextBlock>
                </Button>
            </StackPanel>


            <StackPanel Orientation="Horizontal"  DockPanel.Dock="Right" HorizontalAlignment="Right">
                <Button x:Name="search"  Height="36" Margin="10,20,0,20" Background="#2DA6EC" BorderThickness="0" md:ButtonAssist.CornerRadius="5" Click="search_Click">
                    <TextBlock>
                 <md:PackIcon Kind="Crosshairs" Width="20" Height="20" Margin="0,2"/>
                <Label Content="查询" FontSize="14" Foreground="#FFFFFF" />
                    </TextBlock>
                </Button>
                <Button x:Name="export"  Height="36" Margin="10,20,0,20"  Background="#2DA6EC" BorderThickness="0" md:ButtonAssist.CornerRadius="5" Click="BtnExport_Click">
                    <TextBlock>
                 <md:PackIcon Kind="Export" Width="20" Height="20" Margin="0,2"/>
                <Label Content="导出" FontSize="14" Foreground="#FFFFFF" />
                    </TextBlock>
                </Button>
                <Button x:Name="print"  Height="36" Margin="10,20,20,20"  Background="#2DA6EC" BorderThickness="0" md:ButtonAssist.CornerRadius="5" Click="print_Click" >
                    <TextBlock>
                 <md:PackIcon Kind="Printer" Width="20" Height="20" Margin="0,2"/>
                <Label Content="打印" FontSize="14" Foreground="#FFFFFF" />
                    </TextBlock>
                </Button>
            </StackPanel>
        </DockPanel>
        <md:Card Height="807" md:ShadowAssist.ShadowDepth="Depth1" Background="#FFFFFF" Margin="21,110,21,0">
            <StackPanel Orientation="Vertical">
                <StackPanel Height="727">
                    <ListView Margin="20" ItemContainerStyle="{StaticResource NonSelectableListViewContainerStyle}" Name="lstWeight" ItemsSource="{Binding}" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
                        <ListView.View>
                            <GridView ColumnHeaderContainerStyle="{StaticResource DefaultGridViewColumnHeader}">
                                <!--<GridViewColumn Width="272" Header="序号" DisplayMemberBinding="{Binding Path=Id}">
                                </GridViewColumn>-->
                                <GridViewColumn Header="设备" Width="300" DisplayMemberBinding="{Binding Path=DeviceName}"/>
                                <GridViewColumn Header="班组" Width="300" DisplayMemberBinding="{Binding Path=TeamName}"/>
                                <GridViewColumn Header="料口" Width="350" DisplayMemberBinding="{Binding Path=EntranceName}"/>
                                <GridViewColumn Header="重量(吨)" Width="300" DisplayMemberBinding="{Binding Path=NetWeight}"/>
                                <GridViewColumn Header="时间" Width="400" DisplayMemberBinding="{Binding Path=Time,StringFormat='yyyy年MM月dd日 HH:mm:ss'}"/>
                                
                            </GridView>
                        </ListView.View>
                    </ListView>
                </StackPanel>
                
                <StackPanel  VerticalAlignment="Center" Height="80" Background="AliceBlue">
                    <page:Pagination   PageDataCount="16"  x:Name="pagination" Height="80" />
                </StackPanel>

            </StackPanel>
        </md:Card>
    </Grid>
</Page>
