首次提交:添加src文件夹代码
This commit is contained in:
30
Cowain.Bake.BLL/Converter/InvalidConvertor.cs
Normal file
30
Cowain.Bake.BLL/Converter/InvalidConvertor.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Data;
|
||||
using Cowain.Bake.Common.Enums;
|
||||
|
||||
namespace Cowain.Bake.BLL.Converter
|
||||
{
|
||||
public class InvalidConvertor:IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
value = System.Convert.ToInt32(value);
|
||||
EValidStatus status = (EValidStatus)value;
|
||||
return status.FetchDescription();
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user