Files
6098-5/Cowain.Preheat.BLL/Converter/RoleConvertor.cs
T
2026-05-28 22:11:13 +08:00

32 lines
809 B
C#

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.Preheat.Common.Enums;
namespace Cowain.Preheat.BLL.Converter
{
public class RoleConvertor:IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value == null)
{
return null;
}
value = System.Convert.ToInt32(value);
ERole status = (ERole)value;
return status.FetchDescription();
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return null;
}
}
}