private bool IsTheSameTaskDetail(Task other) { if (this.TaskDetail == null) { if (other.TaskDetail == null) return true; else return string.IsNullOrEmpty(other.TaskDetail.Detail); } // IF this.TaskDetail is not null else { if (other.TaskDetail == null) { if (string.IsNullOrEmpty(this.TaskDetail.Detail)) return true; else return false; } else return other.TaskDetail.Detail == this.TaskDetail.Detail; } }
public bool IsTheSame(Task other) { if (other == null) return false; return this.TaskName == other.TaskName && this.TaskNumber == other.TaskNumber && this.TaskUId == other.TaskUId && this.BacklogItemUId == other.BacklogItemUId && this.CreatedAt == other.CreatedAt && this.StartDate == other.StartDate && this.EndDate == other.EndDate && this.EffectiveHours == other.EffectiveHours && this.PlannedHours == other.PlannedHours && this.TaskAssigneeUId == other.TaskAssigneeUId && this.RoleUId == other.RoleUId && this.TaskType == other.TaskType && this.Status == other.Status && this.ProjectUId == other.ProjectUId && this.IsAccounting == other.IsAccounting && this.Priority == other.Priority && this.TagUId == other.TagUId && this.IsTheSameTaskDetail(other); }