Merge branch 'master' of http://scddns.f3322.net:13000/sc/Audit_APP
This commit is contained in:
commit
783d5555f2
3 files changed
+8
-8
No files matched your search
@@ -15,7 +15,6 @@ namespace Audit.ConvertMoels
|
|||||||
public class ColorSQLConvert : IValueConverter
|
public class ColorSQLConvert : IValueConverter
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,29 +15,29 @@ namespace Audit.ConvertMoels
|
|||||||
internal class ProductTypeSQLConvert : IValueConverter
|
internal class ProductTypeSQLConvert : IValueConverter
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
{
|
{
|
||||||
if ((int)value == 0)//类型0:染料,1:助剂,2:粉体助剂,3:液体染料,其它:未知
|
string ProductType = System.Convert.ToString(value);
|
||||||
|
if (ProductType == "0")//类型0:染料,1:助剂,2:粉体助剂,3:液体染料,其它:未知
|
||||||
{
|
{
|
||||||
return "染料";
|
return "染料";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ((int)value == 1)
|
if (ProductType == "1")
|
||||||
{
|
{
|
||||||
return "助剂";
|
return "助剂";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ((int)value == 2)
|
if (ProductType == "2")
|
||||||
{
|
{
|
||||||
return "粉体助剂";
|
return "粉体助剂";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ((int)value == 3)
|
if (ProductType == "3")
|
||||||
{
|
{
|
||||||
return "液体染料";
|
return "液体染料";
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-2
@@ -60,14 +60,15 @@
|
|||||||
<DataGridTextColumn Header="原料类型" Width="80" FontSize="15" MaxWidth="80" MinWidth="70" CanUserReorder="False">
|
<DataGridTextColumn Header="原料类型" Width="80" FontSize="15" MaxWidth="80" MinWidth="70" CanUserReorder="False">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="{x:Type TextBlock}">
|
<Style TargetType="{x:Type TextBlock}">
|
||||||
<Setter Property="Text" Value="{Binding Path=ProductType,Converter={StaticResource ProductTypeSQLConvert}}"/>
|
<Setter Property="Text" Value="{Binding Path=ProductType,Converter={StaticResource ProductTypeSQLConvert}}">
|
||||||
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
</DataGridTextColumn.ElementStyle>
|
</DataGridTextColumn.ElementStyle>
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
<DataGridTextColumn Header="色彩" Width="100" MaxWidth="500" MinWidth="50" CanUserReorder="False">
|
<DataGridTextColumn Header="色彩" Width="100" MaxWidth="500" MinWidth="50" CanUserReorder="False">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="{x:Type TextBlock}">
|
<Style TargetType="{x:Type TextBlock}">
|
||||||
<Setter Property="Background" Value="{Binding Path=Color,Converter={StaticResource ColorSQLConvert}}"/>
|
<Setter Property="Background" Value="{Binding Path=Color,Converter={StaticResource ColorSQLConvert}}"/>
|
||||||
</Style>
|
</Style>
|
||||||
</DataGridTextColumn.ElementStyle>
|
</DataGridTextColumn.ElementStyle>
|
||||||
</DataGridTextColumn>
|
</DataGridTextColumn>
|
||||||
|
|||||||
Reference in new issue
Block a user