예제 #1
0
        /// <summary>
        /// Returns true if Contract instances are equal
        /// </summary>
        /// <param name="other">Instance of Contract to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Contract other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     StaffGroup == other.StaffGroup ||
                     StaffGroup != null &&
                     StaffGroup.Equals(other.StaffGroup)
                     ) &&
                 (
                     Grade == other.Grade ||
                     Grade != null &&
                     Grade.Equals(other.Grade)
                 ) &&
                 (
                     _Contract == other._Contract ||
                     _Contract != null &&
                     _Contract.Equals(other._Contract)
                 ) &&
                 (
                     Payscale == other.Payscale ||
                     Payscale != null &&
                     Payscale.Equals(other.Payscale)
                 ) &&
                 (
                     ContractType == other.ContractType ||
                     ContractType != null &&
                     ContractType.Equals(other.ContractType)
                 ) &&
                 (
                     ContractedTime == other.ContractedTime ||
                     ContractedTime != null &&
                     ContractedTime.Equals(other.ContractedTime)
                 ) &&
                 (
                     DefaultUnavailabilityHours == other.DefaultUnavailabilityHours ||
                     DefaultUnavailabilityHours != null &&
                     DefaultUnavailabilityHours.Equals(other.DefaultUnavailabilityHours)
                 ) &&
                 (
                     WtdOptOut == other.WtdOptOut ||

                     WtdOptOut.Equals(other.WtdOptOut)
                 ) &&
                 (
                     SalaryFrequency == other.SalaryFrequency ||
                     SalaryFrequency != null &&
                     SalaryFrequency.Equals(other.SalaryFrequency)
                 ) &&
                 (
                     SalaryAmount == other.SalaryAmount ||

                     SalaryAmount.Equals(other.SalaryAmount)
                 ));
        }