订单列表增加 同步订单
This commit is contained in:
1 parent
4f606c3561
commit
cef6300e8e
24 files changed
+2674
-1211
No files matched your search
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
using Work.ERP.API;
|
||||
|
||||
namespace _29WxOrderWpf.Converters
|
||||
{
|
||||
/// <summary>
|
||||
/// 订单任务状态转换:<see cref="Work.KJDServer.API.Models.OrderTask.Status"/> (int) → 中文描述。
|
||||
/// 1=执行中,2=已完成,3=已人为中断。
|
||||
/// </summary>
|
||||
public class OrderTaskStatusConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value is int status)
|
||||
{
|
||||
switch ((TaskStatus)status)
|
||||
{
|
||||
case TaskStatus.Executing:
|
||||
return "执行中";
|
||||
case TaskStatus.Completed:
|
||||
return "已完成";
|
||||
case TaskStatus.ManuallyInterrupted:
|
||||
return "已中断";
|
||||
}
|
||||
}
|
||||
return value?.ToString() ?? string.Empty;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user