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 { /// /// 设备类型数值转换器 /// /// 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 "未知类型"; } } } } } } } } /// /// public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { return null; } } }