namespace EspaceClient.BackOffice.Silverlight.ViewModels.DtoViewModels
{
    public partial class ProfilDtoViewModel
    {
        private string _traduction { get; set; }
        /// <summary>
        /// Utilisé pour stocker la traduction
        /// </summary>
        public string Traduction
        {
            get
            {
                return _traduction;
            }

            set
            {
                if (_traduction != value)
                {
                    _traduction = value;
                    NotifyPropertyChanged(() => Traduction);
                }
                NotifyCheckErrorEvent(() => Traduction);
            }
        }

        public override void NotifyCheckError(string PropertyName)
        {
            switch (PropertyName)
            {
                case "Description":
                    if (Description == null || Description.Length == 0)
                        AddError("Description", "ERROR_FIELD_REQUIERED");
                    else
                        RemoveError("Description", "ERROR_FIELD_REQUIERED");
                    break;

                default:
                    break;
            }
        }
    }
}