You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
95 lines
6.6 KiB
95 lines
6.6 KiB
|
2 years ago
|
<Window x:Class="formula_manage.Windows.fabric"
|
||
|
|
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:formula_manage.Windows"
|
||
|
|
xmlns:ConvertMoels="clr-namespace:formula_manage.ConvertMoels"
|
||
|
|
xmlns:viewmodel="clr-namespace:formula_manage.ViewModel"
|
||
|
|
mc:Ignorable="d" Loaded="fabric_Loaded"
|
||
|
|
Title="fabric" Height="720" Width="1100" MaxHeight="720" MaxWidth="1100" MinHeight="720" MinWidth="1100"
|
||
|
|
BorderBrush="White" Background="#FFE0E0E0">
|
||
|
|
<Grid>
|
||
|
|
<!--原料表-->
|
||
|
|
<DataGrid x:Name="DataGridfabric" MouseDoubleClick="DataGridfabric_MouseDoubleClick" SelectionMode="Single" AlternationCount="2" IsReadOnly="True" Margin="15,15,15,150" d:ItemsSource="{d:SampleData ItemCount=999}" AutoGenerateColumns="False" MinColumnWidth="30"
|
||
|
|
HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" GridLinesVisibility="All" BorderBrush="#CCCCCC"
|
||
|
|
BorderThickness="1,1,1,1" ColumnHeaderHeight="40" HorizontalContentAlignment="Right" Grid.ColumnSpan="2"
|
||
|
|
CanUserResizeRows="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False"
|
||
|
|
CanUserResizeColumns="False" CanUserSortColumns="False" HeadersVisibility ="Column">
|
||
|
|
<DataGrid.RowStyle >
|
||
|
|
<Style TargetType="{x:Type DataGridRow}">
|
||
|
|
<Style.Triggers>
|
||
|
|
<Trigger Property="ItemsControl.AlternationIndex" Value="0">
|
||
|
|
<Setter Property="Background" Value="#FFFFFFFF" />
|
||
|
|
</Trigger>
|
||
|
|
<Trigger Property="ItemsControl.AlternationIndex" Value="1">
|
||
|
|
<Setter Property="Background" Value="#FFF0F0F0" />
|
||
|
|
</Trigger>
|
||
|
|
<Trigger Property="IsMouseOver" Value="False">
|
||
|
|
</Trigger>
|
||
|
|
</Style.Triggers>
|
||
|
|
</Style>
|
||
|
|
</DataGrid.RowStyle>
|
||
|
|
<DataGrid.CellStyle>
|
||
|
|
<Style TargetType="DataGridCell">
|
||
|
|
<Setter Property="BorderThickness" Value="0"/>
|
||
|
|
<Setter Property="MinWidth" Value="20"/>
|
||
|
|
<Style.Triggers>
|
||
|
|
<Trigger Property="IsSelected" Value="True">
|
||
|
|
<Setter Property="Background" Value="#FFC0C0C0"/>
|
||
|
|
<Setter Property="BorderBrush" Value="#FFC0C0C0"/>
|
||
|
|
<Setter Property="Foreground" Value="#000000"/>
|
||
|
|
</Trigger>
|
||
|
|
</Style.Triggers>
|
||
|
|
</Style>
|
||
|
|
</DataGrid.CellStyle>
|
||
|
|
<DataGrid.Columns>
|
||
|
|
<!--列信息绑定-->
|
||
|
|
<DataGridTemplateColumn Header=" 序号" Width="50" MinWidth="10" IsReadOnly="True">
|
||
|
|
<DataGridTemplateColumn.CellTemplate>
|
||
|
|
<DataTemplate>
|
||
|
|
<TextBlock FontSize="15" Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGridRow}}, Path=Header}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="10,0,0,0"></TextBlock>
|
||
|
|
</DataTemplate>
|
||
|
|
</DataGridTemplateColumn.CellTemplate>
|
||
|
|
</DataGridTemplateColumn>
|
||
|
|
<DataGridTextColumn Header="布种代码" Binding="{Binding Code}" Width="250" FontSize="15" MaxWidth="500" MinWidth="100" CanUserReorder="False"/>
|
||
|
|
<DataGridTextColumn Header="布种名称" Binding="{Binding Name}" Width="250" FontSize="15" MaxWidth="500" MinWidth="200" CanUserReorder="False"/>
|
||
|
|
<DataGridTextColumn Header="码重(g/Yard)" Binding="{Binding GYard}" Width="100" FontSize="15" MaxWidth="200" MinWidth="20" CanUserReorder="False"/>
|
||
|
|
<DataGridTextColumn Header="备注" Binding="{Binding Remark}" Width="500" FontSize="15" MaxWidth="1500" MinWidth="150" CanUserReorder="False"/>
|
||
|
|
</DataGrid.Columns>
|
||
|
|
</DataGrid>
|
||
|
|
<!--布种代码-->
|
||
|
|
<TextBox x:Name="fabric_code" HorizontalAlignment="Left" Height="30" Margin="105,0,0,100" Text=""
|
||
|
|
VerticalAlignment="Bottom" Width="250" FontSize="22" MaxLines="1" MaxLength="25"
|
||
|
|
InputMethod.IsInputMethodEnabled="False"/>
|
||
|
|
<TextBlock HorizontalAlignment="Left" Height="30" Margin="15,0,0,100" TextWrapping="Wrap" Text="布种代码"
|
||
|
|
VerticalAlignment="Bottom" Width="100" FontSize="20"/>
|
||
|
|
<!--布种名称-->
|
||
|
|
<TextBox x:Name="fabric_name" HorizontalAlignment="Left" Height="30" Margin="465,0,0,100" Text=""
|
||
|
|
VerticalAlignment="Bottom" Width="250" FontSize="22" MaxLines="1" MaxLength="50"/>
|
||
|
|
<TextBlock HorizontalAlignment="Left" Height="30" Margin="375,0,0,100" TextWrapping="Wrap" Text="布种名称"
|
||
|
|
VerticalAlignment="Bottom" Width="100" FontSize="20"/>
|
||
|
|
<!--备注-->
|
||
|
|
<TextBox x:Name="fabric_Remark" HorizontalAlignment="Left" Height="30" Margin="105,0,0,50" Text=""
|
||
|
|
VerticalAlignment="Bottom" Width="340" FontSize="22" MaxLines="1" MaxLength="25"/>
|
||
|
|
<TextBlock HorizontalAlignment="Left" Height="30" Margin="15,0,0,50" TextWrapping="Wrap" Text="备注"
|
||
|
|
VerticalAlignment="Bottom" Width="120" FontSize="20"/>
|
||
|
|
<!--码重-->
|
||
|
|
<TextBox x:Name="fabric_GYard" HorizontalAlignment="Left" Height="30" Margin="585,0,0,50" Text="500"
|
||
|
|
VerticalAlignment="Bottom" Width="130" FontSize="22" MaxLines="1" MaxLength="25"/>
|
||
|
|
<TextBlock HorizontalAlignment="Left" Height="30" Margin="465,0,0,50" TextWrapping="Wrap" Text="码重(g/Yard)"
|
||
|
|
VerticalAlignment="Bottom" Width="120" FontSize="20"/>
|
||
|
|
|
||
|
|
<!--存储按钮-->
|
||
|
|
<Button Content="存储" HorizontalAlignment="Left" Height="50" Margin="795,0,0,60"
|
||
|
|
VerticalAlignment="Bottom" Width="100" FontSize="30" Background="#FFEFEFEF" BorderBrush="White"
|
||
|
|
Click="Button_Preservation">
|
||
|
|
</Button>
|
||
|
|
<!--删除按钮-->
|
||
|
|
<Button Content="删除" HorizontalAlignment="Left" Height="50" Margin="935,0,0,60"
|
||
|
|
VerticalAlignment="Bottom" Width="100" FontSize="30" Background="#FFEFEFEF" BorderBrush="White"
|
||
|
|
Click="Button_Delete">
|
||
|
|
</Button>
|
||
|
|
</Grid>
|
||
|
|
</Window>
|