public override bool Equals(object obj) { SummaryParameter other = obj as SummaryParameter; if (other == null) return false; if (!ViewType.Equals(other.ViewType)) return false; if (!PeriodType.Equals(other.PeriodType)) return false; if (Year != null && Year.Equals(other.Year)) return true; else if (Year == null && other.Year != null) return false; else if (Year == null && other.Year == null) return true; else if (Month != null && Month.Equals(other.Month)) return true; else if (Month == null && other.Month != null) return false; else if (Month == null && other.Month == null) return true; return false; }
/// <summary> /// Returns true if ProvincialRateType instances are equal /// </summary> /// <param name="other">Instance of ProvincialRateType to be compared</param> /// <returns>Boolean</returns> public bool Equals(ProvincialRateType other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( RateType == other.RateType || RateType.Equals(other.RateType) ) && ( Description == other.Description || Description.Equals(other.Description) ) && ( Active == other.Active || Active.Equals(other.Active) ) && ( PeriodType == other.PeriodType || PeriodType != null && PeriodType.Equals(other.PeriodType) ) && ( Rate == other.Rate || Rate != null && Rate.Equals(other.Rate) ) && ( IsPercentRate == other.IsPercentRate || IsPercentRate.Equals(other.IsPercentRate) ) && ( IsRateEditable == other.IsRateEditable || IsRateEditable.Equals(other.IsRateEditable) ) && ( IsIncludedInTotal == other.IsIncludedInTotal || IsIncludedInTotal.Equals(other.IsIncludedInTotal) ) && ( IsInTotalEditable == other.IsInTotalEditable || IsInTotalEditable.Equals(other.IsInTotalEditable) )); }
public override bool Equals(object obj) { SummaryParameter other = obj as SummaryParameter; if (other == null) { return(false); } if ((ViewType != null && other.ViewType == null) || (ViewType == null && other.ViewType != null) || !ViewType.Equals(other.ViewType)) { return(false); } if (!PeriodType.Equals(other.PeriodType)) { return(false); } if (Year != null && Year.Equals(other.Year)) { return(true); } else if (Year == null && other.Year != null) { return(false); } else if (Year == null && other.Year == null) { return(true); } else if (Month != null && Month.Equals(other.Month)) { return(true); } else if (Month == null && other.Month != null) { return(false); } else if (Month == null && other.Month == null) { return(true); } return(false); }