using System;
using System.Windows.Data;

namespace RadGridView_SL5_AR_1
{
    public class ClubDataConverter : IValueConverter
    {

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            Club club = value as Club;

            if (club != null)
            {
                if (club.HasChanges)
                {
                    if (club.StadiumCapacityHasChanges)
                    {
                        return true;
                    }
                    if (club.EstablishedYearHasChanges)
                    {
                        return true;
                    }
                }
                else
	            {
                    return false;
	            }
            }

            return null;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}