Skip to content

Instantly share code, notes, and snippets.

@Sakurina
Created May 20, 2011 18:16
Show Gist options
  • Save Sakurina/983461 to your computer and use it in GitHub Desktop.
Save Sakurina/983461 to your computer and use it in GitHub Desktop.
overlaps = From et In DataSetManager.employeTache.Rows Where _
(et IsNot ModifiableRow AndAlso modifyingDatabaseTask = False) And _
et.item("noEmploye") = noEmploye And _
((startTime >= et.item("dateDebutEmployeTache") And startTime <= et.item("dateFinEmployeTache")) OrElse _
(endTime >= et.item("dateDebutEmployeTache") And endTime <= et.item("dateFinEmployeTache")) OrElse _
(et.item("dateDebutEmployeTache") >= startTime AndAlso et.item("dateFinEmployeTache") <= endTime)) _
Select et
If (overlaps.Count > 0) Then
Return True
End If
Return False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment