public override int GetHashCode() { unchecked { var hashCode = TicketID; hashCode = (hashCode * 397) ^ WorkHoursID; hashCode = (hashCode * 397) ^ StartWorkHour.GetHashCode(); hashCode = (hashCode * 397) ^ EndWorkHour.GetHashCode(); hashCode = (hashCode * 397) ^ TechnicianContactID; hashCode = (hashCode * 397) ^ Billable.GetHashCode(); hashCode = (hashCode * 397) ^ OnCustomerSite.GetHashCode(); hashCode = (hashCode * 397) ^ (Description != null ? Description.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (TechnicianFullName != null ? TechnicianFullName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (TechnicianEmail != null ? TechnicianEmail.GetHashCode() : 0); return(hashCode); } }
private bool Equals(IWorkHourRecord other) { return(TicketID == other.TicketID && WorkHoursID == other.WorkHoursID && StartWorkHour.Equals(other.StartWorkHour) && EndWorkHour.Equals(other.EndWorkHour) && TechnicianContactID == other.TechnicianContactID && Billable == other.Billable && OnCustomerSite == other.OnCustomerSite && Description == other.Description && TechnicianFullName == other.TechnicianFullName && TechnicianEmail == other.TechnicianEmail); }
public override string ToString() { var non = Billable ? "" : "Non-"; return($"{TechnicianFullName}: {non}Billable {EndWorkHour.Subtract(StartWorkHour).TotalHours:0.00} hours"); }