// The following methods support the delta reports public bool Equals([AllowNull] UserRoleAllDTO other) { // Check whether the compared object is null. if (other is null) { return(false); } // Check whether the compared object references the same data. if (ReferenceEquals(this, other)) { return(true); } // Check whether the objects’ properties are equal. return(UserId.Equals(other.UserId) && UserFullName.Equals(other.UserFullName) && RoleId.Equals(other.RoleId) && RoleName.Equals(other.RoleName) && RoleDescription.Equals(other.RoleDescription) && RoleOwner_RoleId.Equals(other.RoleOwner_RoleId) && LastCertifiedBy.Equals(other.LastCertifiedBy) && LastCertifiedDate.Equals(other.LastCertifiedDate)); }
// The following methods support the delta reports // Handle equals for everything but the managers / service owners isCertified and the // risk rating. The isCertified stuff gets reset everytime a new cycle happens and // risk rating is calculated from threat and likelihood ratings so we can ignore those public bool Equals([AllowNull] RoleServicePrivAllDTO other) { // Check whether the compared object is null. if (other is null) { return(false); } // Check whether the compared object references the same data. if (ReferenceEquals(this, other)) { return(true); } // Check whether the objects’ properties are equal. // Role stuff return(RolePrivId.Equals(other.RolePrivId) && RoleId.Equals(other.RoleId) && RoleName.Equals(other.RoleName) && RoleDescription.Equals(other.RoleDescription) && RoleOwner_RoleId.Equals(other.RoleOwner_RoleId) && // Manager stuff RoleOwner_PrivId.Equals(other.RoleOwner_PrivId) && RoleOwner_PermissionGroup.Equals(other.RoleOwner_PermissionGroup) && RoleOwner_ServicePrivSummary.Equals(other.RoleOwner_ServicePrivSummary) && RoleOwner_CredentialStorageMethod.Equals(other.RoleOwner_CredentialStorageMethod) && RoleOwner_ServiceId.Equals(other.RoleOwner_ServiceId) && RoleOwner_ServiceName.Equals(other.RoleOwner_ServiceName) && RoleOwner_ServiceDescription.Equals(other.RoleOwner_ServiceDescription) && RoleOwner_RoleAccessJustification.Equals(other.RoleOwner_RoleAccessJustification) && RoleOwner_RemovalImpact.Equals(other.RoleOwner_RemovalImpact) && RoleOwner_IsRevoked.Equals(other.RoleOwner_IsRevoked) && RoleOwner_DateCertified.Equals(other.RoleOwner_DateCertified));/* && * * // Service Owner Stuff * ServiceOwner_PrivId.Equals(other.ServiceOwner_PrivId) && * ServiceOwner_PermissionGroup.Equals(other.ServiceOwner_PermissionGroup) && * ServiceOwner_ServicePrivSummary.Equals(other.ServiceOwner_ServicePrivSummary) && * ServiceOwner_CredentialStorageMethod.Equals(other.ServiceOwner_CredentialStorageMethod) && * ServiceOwner_ServiceId.Equals(other.ServiceOwner_ServiceId) && * ServiceOwner_ServiceName.Equals(other.ServiceOwner_ServiceName) && * ServiceOwner_ServiceDescription.Equals(other.ServiceOwner_ServiceDescription) && * * ServiceOwner_RoleAccessJustification.Equals(other.ServiceOwner_RoleAccessJustification) && * ServiceOwner_RemovalImpact.Equals(other.ServiceOwner_RemovalImpact) && * ServiceOwner_IsRevoked.Equals(other.ServiceOwner_IsRevoked) && * ServiceOwner_DateCertified.Equals(other.ServiceOwner_DateCertified) && * * // Risk stuff * RiskImpact.Equals(other.RiskImpact) && * RiskLikelihood.Equals(other.RiskLikelihood) && * RiskNotes.Equals(other.RiskNotes) && * RiskAssessmentDate.Equals(other.RiskAssessmentDate);*/ }
/// <summary> /// Returns true if Employee instances are equal /// </summary> /// <param name="other">Instance of Employee to be compared</param> /// <returns>Boolean</returns> public bool Equals(Employee other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Id == other.Id || Id != null && Id.Equals(other.Id) ) && ( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( ContractTypeName == other.ContractTypeName || ContractTypeName != null && ContractTypeName.Equals(other.ContractTypeName) ) && ( RoleId == other.RoleId || RoleId != null && RoleId.Equals(other.RoleId) ) && ( RoleName == other.RoleName || RoleName != null && RoleName.Equals(other.RoleName) ) && ( RoleDescription == other.RoleDescription || RoleDescription != null && RoleDescription.Equals(other.RoleDescription) ) && ( HourlySalary == other.HourlySalary || HourlySalary != null && HourlySalary.Equals(other.HourlySalary) ) && ( MonthlySalary == other.MonthlySalary || MonthlySalary != null && MonthlySalary.Equals(other.MonthlySalary) )); }
/// <summary> /// Returns true if PersonWithWearable instances are equal /// </summary> /// <param name="other">Instance of PersonWithWearable to be compared</param> /// <returns>Boolean</returns> public bool Equals(PersonWithWearable other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( PersonId == other.PersonId || PersonId != null && PersonId.Equals(other.PersonId) ) && ( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( Status == other.Status || Status != null && Status.Equals(other.Status) ) && ( Role == other.Role || Role != null && Role.Equals(other.Role) ) && ( RoleDescription == other.RoleDescription || RoleDescription != null && RoleDescription.Equals(other.RoleDescription) ) && ( Lat == other.Lat || Lat != null && Lat.Equals(other.Lat) ) && ( Lon == other.Lon || Lon != null && Lon.Equals(other.Lon) ) && ( Timestamp == other.Timestamp || Timestamp != null && Timestamp.Equals(other.Timestamp) )); }
/// <summary> /// Returns true if Person instances are equal /// </summary> /// <param name="other">Instance of Person to be compared</param> /// <returns>Boolean</returns> public bool Equals(Person other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Id == other.Id || Id != null && Id.Equals(other.Id) ) && ( FullName == other.FullName || FullName != null && FullName.Equals(other.FullName) ) && ( Phone == other.Phone || Phone != null && Phone.Equals(other.Phone) ) && ( Email == other.Email || Email != null && Email.Equals(other.Email) ) && ( Role == other.Role || Role != null && Role.Equals(other.Role) ) && ( RoleDescription == other.RoleDescription || RoleDescription != null && RoleDescription.Equals(other.RoleDescription) ) && ( Active == other.Active || Active != null && Active.Equals(other.Active) )); }