Example #1
0
        protected bool SetPropGestion <U, V>(ref U field, U value, V Objet, [CallerMemberName] string propertyName = "")
            where V : ObjetGestion
        {
            var maj = base.SetWpf(ref field, value, propertyName);

            if (maj && EstSvgDansLaBase)
            {
                Bdd2.Maj(Objet, T);
                return(true);
            }

            return(maj);
        }
Example #2
0
        protected bool Set <U, V>(ref U field, U value, V Objet, [CallerMemberName] string propertyName = "")
            where V : ObjetGestion
        {
            if (EqualityComparer <U> .Default.Equals(field, value))
            {
                return(false);
            }

            field = value;
            MajRef();
            OnPropertyChanged(propertyName);
            if (EstSvgDansLaBase)
            {
                Bdd2.Maj(Objet, T);
            }
            return(true);
        }
Example #3
0
        protected bool SetObjetGestion <U, V>(ref U field, U value, V Objet, [CallerMemberName] string propertyName = "")
            where U : ObjetGestion
            where V : ObjetGestion
        {
            Boolean test = true;

            if ((value == null) || (value != null && !value.EstCharge) || !Objet.EstCharge)
            {
                test = false;
            }

            var maj = base.SetWpf(ref field, value, propertyName);

            if (maj && EstSvgDansLaBase)
            {
                Bdd2.Maj(Objet, T);
            }

            return(test);
        }
Example #4
0
        protected bool SetObjetGestion <U, V>(ref U field, U value, V Objet, Boolean ForcerUpdate = false, [CallerMemberName] string propertyName = "")
            where U : ObjetGestion
            where V : ObjetGestion
        {
            Boolean test = true;

            if ((value == null) || (value != null && !value.EstCharge) || !Objet.EstCharge)
            {
                test = false;
            }

            if (ForcerUpdate || !EqualityComparer <U> .Default.Equals(field, value))
            {
                field = value;
                MajRef();
                OnPropertyChanged(propertyName);
                if (EstSvgDansLaBase)
                {
                    Bdd2.Maj(Objet, T);
                }
            }

            return(test);
        }