Merge branch 'master' of http://www.scserverddns.top:13000/sc/DyeingComputer
This commit is contained in:
commit
51c2aae2e9
13 files changed
+281
-28
No files matched your search
@@ -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 DyeingComputer.ConvertMoels
|
||||
{
|
||||
/// <summary>
|
||||
/// 原料类型数值转换器
|
||||
/// 将类型数值转换为类型名称返回
|
||||
/// </summary>
|
||||
internal class ProductTypeSQLConvert : IValueConverter
|
||||
{
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
string ProductType = System.Convert.ToString(value);
|
||||
if (ProductType == "1")//类型0:染料,1:助剂,2:粉体助剂,3:液体染料,其它:未知
|
||||
{
|
||||
return "染料";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ProductType == "2")
|
||||
{
|
||||
return "助剂";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ProductType == "3")
|
||||
{
|
||||
return "粉体助剂";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ProductType == "4")
|
||||
{
|
||||
return "液体染料";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "未知类型";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace DyeingComputer.ConvertMoels
|
||||
{
|
||||
internal class StatenConvert : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
string Staten = null;
|
||||
string i = value.ToString();
|
||||
|
||||
if (i == "101") Staten = "准备就绪";
|
||||
if (i == "102") Staten = "计量输送";
|
||||
if (i == "201") Staten = "自动状态";
|
||||
if (i == "202") Staten = "转入排队";
|
||||
if (i == "203") Staten = "等待命令";
|
||||
if (i == "301") Staten = "步骤完成";
|
||||
if (i == "309") Staten = "输送异常";
|
||||
|
||||
return Staten;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user