Skip to content

Instantly share code, notes, and snippets.

@jkbryan
Created October 2, 2018 22:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jkbryan/a3c3e98fa6e66427607c889e4651da8e to your computer and use it in GitHub Desktop.
Save jkbryan/a3c3e98fa6e66427607c889e4651da8e to your computer and use it in GitHub Desktop.
filterfordisconnection-example.vb
Public Function FilterForDisconnection(ByVal csentry As CSEntry) As Boolean Implements IMASynchronization.FilterForDisconnection
'Filter to prevent those who are not being returned by the CDR FIM View from being presented by this table (which contains lots of historical data!)
Dim dtFileTime As DateTime
Dim dtDateNow As DateTime = Date.Now
'CS attributes required are: pid, enddate
If csentry("pid").IsPresent And csentry("enddate").IsPresent Then
dtFileTime = DateTime.Parse(csentry("EndDate").Value).AddDays(190)
If dtFileTime <= dtDateNow Then
'employeeEndDate has passed, so disconnect
FilterForDisconnection = True
Else
FilterForDisconnection = False
End If
Else
FilterForDisconnection = True
End If
Throw New EntryPointNotImplementedException()
End Function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment