Ejemplo n.º 1
0
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            if (obj == null)
            {
                return(false);
            }
            if (!GetType().Equals(obj.GetType()))
            {
                return(false);
            }
            Alocation other = (Alocation)obj;

            if (nurse == null)
            {
                if (other.nurse != null)
                {
                    return(false);
                }
            }
            else if (!nurse.Equals(other.nurse))
            {
                return(false);
            }
            if (typeAlocation != other.typeAlocation)
            {
                return(false);
            }
            return(true);
        }
Ejemplo n.º 2
0
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            if (obj == null)
            {
                return(false);
            }
            if (GetType() != obj.GetType())
            {
                return(false);
            }
            Solution other = (Solution)obj;

            if (day != other.day)
            {
                return(false);
            }
            if (nurse == null)
            {
                if (other.nurse != null)
                {
                    return(false);
                }
            }
            else if (!nurse.Equals(other.nurse))
            {
                return(false);
            }
            if (shift != other.shift)
            {
                return(false);
            }
            return(true);
        }