Skip to content

Instantly share code, notes, and snippets.

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
You can’t perform that action at this time.