4 changed files with 76 additions and 16 deletions
@ -0,0 +1,59 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Globalization; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
using System.Windows.Data; |
||||
|
|
||||
|
namespace Audit.ConvertMoels |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 原料类型数值转换器
|
||||
|
/// 将类型数值转换为类型名称返回
|
||||
|
/// </summary>
|
||||
|
internal class ProductTypeSQLConvert : IValueConverter |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) |
||||
|
{ |
||||
|
if ((int)value == 0) |
||||
|
{ |
||||
|
return "染料"; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
if ((int)value == 1) |
||||
|
{ |
||||
|
return "助剂"; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
if ((int)value == 2) |
||||
|
{ |
||||
|
return "粉体助剂"; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
if ((int)value == 3) |
||||
|
{ |
||||
|
return "液体染料"; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
return "未知类型"; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
/// <summary>
|
||||
|
/// </summary>
|
||||
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) |
||||
|
{ |
||||
|
return ""; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue