You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

156 lines
7.8 KiB
XML

<Window x:Class="XGL.Views.ProductionData"
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:local="clr-namespace:XGL.Views"
mc:Ignorable="d"
Height="650" Width="1000" WindowStartupLocation="CenterScreen" >
<Window.Resources>
<!-- 自定义Calendar样式 -->
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.15*"/>
<RowDefinition Height="0.85*"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100*"/>
<ColumnDefinition Width="265*"/>
<ColumnDefinition Width="87*"/>
<ColumnDefinition Width="204*"/>
<ColumnDefinition Width="344*"/>
</Grid.ColumnDefinitions>
<Label Content="时间:" FontSize="25" Margin="0,20,0,0" HorizontalAlignment="Right" Grid.Column="0" Width="66"></Label>
<Label Content="班次:" FontSize="25" Margin="0,20,0,0" HorizontalAlignment="Center" Grid.Column="2" Width="66"/>
<!-- 应用自定义Calendar样式的DatePicker -->
<DatePicker Visibility="Visible" Width="130" Name="pickerstart" IsEnabled="True" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="1" Margin="0,20,0,0" Height="27">
<DatePicker.LayoutTransform>
<ScaleTransform ScaleX="1.7" ScaleY="1.7"/>
</DatePicker.LayoutTransform>
</DatePicker>
<ComboBox Name="banci" Width="150" Margin="0,20,0,30" Grid.Column="3" FontSize="25" HorizontalAlignment="Center">
<ComboBoxItem Content="白班" />
<ComboBoxItem Content="夜班" />
</ComboBox>
<ComboBox Name="eqment" Width="150" Margin="10,20,0,30" Grid.Column="4" FontSize="25" HorizontalAlignment="Left">
<ComboBoxItem Content="C1" />
<ComboBoxItem Content="C2" />
<ComboBoxItem Content="C3" />
<ComboBoxItem Content="C4" />
<ComboBoxItem Content="C5" />
<ComboBoxItem Content="C6" />
<ComboBoxItem Content="C7" />
<ComboBoxItem Content="C8" />
</ComboBox>
<Border BorderThickness="2" Margin="192,15,22,25" BorderBrush="Gray" CornerRadius="4" Grid.Column="4">
<Button Content="查询" FontSize="25" Margin="0" BorderThickness="0" Background="#2B7EE6" Foreground="White" Click="Button_Click"/>
</Border>
</Grid>
<DataGrid
Margin="10,95,10,10"
x:Name="LoadMaterial"
AlternationCount="2"
AutoGenerateColumns="False"
CanUserAddRows="False"
CanUserReorderColumns="False"
CanUserResizeColumns="False"
CanUserResizeRows="False"
Focusable="False"
HeadersVisibility="Column"
IsReadOnly="True"
RowHeaderWidth="0"
SelectionMode="Single" FontSize="16"
Visibility="Visible" Grid.RowSpan="2">
<DataGrid.Columns>
<DataGridTemplateColumn
x:Name="grid1"
Width="100"
MinWidth="10"
Header=" 序号"
IsReadOnly="True">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock
Margin="0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Focusable="False"
FontSize="20"
Text="{Binding Header, RelativeSource={RelativeSource AncestorType={x:Type DataGridRow}, Mode=FindAncestor}}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn
Width="255*"
Binding="{Binding upDate,StringFormat='{}{0:yyyy-MM-dd HH:mm:ss}'}"
CanUserSort="False"
FontSize="20"
Header="吊满时间"
IsReadOnly="True" />
<DataGridTextColumn
Width="370"
Binding="{Binding vinCode}"
CanUserSort="False"
FontSize="20"
Header="间隔"
IsReadOnly="True" />
<!--<DataGridTextColumn
Width="*"
Binding="{Binding materialName}"
CanUserSort="False"
FontSize="20"
Header="产品名称"
IsReadOnly="True" />-->
</DataGrid.Columns>
<DataGrid.CellStyle>
<Style TargetType="{x:Type DataGridCell}">
<Setter Property="Background" Value="#2B7EE6" />
<Setter Property="Foreground" Value="White" />
<Setter Property="Height" Value="50" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
</Style>
</DataGrid.CellStyle>
<DataGrid.RowStyle>
<Style TargetType="{x:Type DataGridRow}">
<Setter Property="Background" Value="#2B7EE6" />
<Setter Property="Foreground" Value="White" />
<Setter Property="Height" Value="50" />
</Style>
</DataGrid.RowStyle>
<DataGrid.RowHeaderStyle>
<Style TargetType="{x:Type DataGridRowHeader}">
<Setter Property="Background" Value="#2B7EE6" />
<Setter Property="Foreground" Value="White" />
<Setter Property="Height" Value="50" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
</Style>
</DataGrid.RowHeaderStyle>
<DataGrid.ColumnHeaderStyle>
<Style TargetType="{x:Type DataGridColumnHeader}">
<Setter Property="Background" Value="#2B7EE6" />
<Setter Property="Foreground" Value="White" />
<Setter Property="Height" Value="50" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="Margin" Value="0,0,0,0" />
<Setter Property="BorderThickness" Value="5" />
<Setter Property="BorderBrush" Value="White" />
<Setter Property="FontSize" Value="30" />
</Style>
</DataGrid.ColumnHeaderStyle>
</DataGrid>
</Grid>
</Window>