28 lines
874 B
C#
28 lines
874 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;
|
|||
|
|
|||
|
namespace EmployeeManagmentDataModels.Enums
|
|||
|
{
|
|||
|
public class BooleanToVacationConverter : IValueConverter
|
|||
|
{
|
|||
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|||
|
{
|
|||
|
if (value is bool booleanValue)
|
|||
|
{
|
|||
|
return booleanValue ? "Завершен" : "Не завершено";
|
|||
|
}
|
|||
|
return "Неизвестно";
|
|||
|
}
|
|||
|
|
|||
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|||
|
{
|
|||
|
throw new NotImplementedException("Обратное преобразование не поддерживается.");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|