diff --git a/ConvertMoels/ColorSQLConvert.cs b/ConvertMoels/ColorSQLConvert.cs index 848ee02..d71244c 100644 --- a/ConvertMoels/ColorSQLConvert.cs +++ b/ConvertMoels/ColorSQLConvert.cs @@ -15,7 +15,6 @@ namespace Audit.ConvertMoels public class ColorSQLConvert : IValueConverter { /// - /// /// public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { diff --git a/ConvertMoels/ProductTypeSQLConvert.cs b/ConvertMoels/ProductTypeSQLConvert.cs index d95a9d8..3823969 100644 --- a/ConvertMoels/ProductTypeSQLConvert.cs +++ b/ConvertMoels/ProductTypeSQLConvert.cs @@ -14,30 +14,30 @@ namespace Audit.ConvertMoels /// internal class ProductTypeSQLConvert : IValueConverter { - /// - /// + /// /// 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 "染料"; } else { - if ((int)value == 1) + if (ProductType == "1") { return "助剂"; } else { - if ((int)value == 2) + if (ProductType == "2") { return "粉体助剂"; } else { - if ((int)value == 3) + if (ProductType == "3") { return "液体染料"; } diff --git a/View/StuffView.xaml b/View/StuffView.xaml index 84e5927..bc69dfb 100644 --- a/View/StuffView.xaml +++ b/View/StuffView.xaml @@ -60,14 +60,15 @@