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.
50 lines
1.3 KiB
50 lines
1.3 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Globalization;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Data;
|
|
|
|
namespace formula_manage.ConvertMoels
|
|
{
|
|
/// <summary>
|
|
/// 设备数值转换器
|
|
///
|
|
/// </summary>
|
|
internal class IndustrySQLConvert : IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
string Industry = System.Convert.ToString(value);
|
|
if (Industry == "0")//类型
|
|
{
|
|
return "浸染";
|
|
}
|
|
else
|
|
{
|
|
if (Industry == "1")
|
|
{
|
|
return "连染";
|
|
}
|
|
else
|
|
{
|
|
if (Industry == "2")
|
|
{
|
|
return "印染";
|
|
}
|
|
else
|
|
{
|
|
return "未知类型";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// </summary>
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
|