Skip to content

Instantly share code, notes, and snippets.

@jkbryan
Created October 2, 2018 22:56
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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