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.
78 lines
2.3 KiB
78 lines
2.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 CategoriesSQLConvert : IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
string Categories = System.Convert.ToString(value);
|
|
if (Categories == "0")//类型
|
|
{
|
|
return "溢流";
|
|
}
|
|
else
|
|
{
|
|
if (Categories == "1")
|
|
{
|
|
return "气流";
|
|
}
|
|
else
|
|
{
|
|
if (Categories == "2")
|
|
{
|
|
return "轧染";
|
|
}
|
|
else
|
|
{
|
|
if (Categories == "3")
|
|
{
|
|
return "卷染";
|
|
}
|
|
else
|
|
{
|
|
if (Categories == "4")
|
|
{
|
|
return "喷染";
|
|
}
|
|
else
|
|
{
|
|
if (Categories == "5")
|
|
{
|
|
return "筒纱";
|
|
}
|
|
else
|
|
{
|
|
if (Categories == "7")
|
|
{
|
|
return "成衣";
|
|
}
|
|
else
|
|
{
|
|
return "未知类型";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// </summary>
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
|