Created
October 2, 2018 22:56
-
-
Save jkbryan/a3c3e98fa6e66427607c889e4651da8e to your computer and use it in GitHub Desktop.
filterfordisconnection-example.vb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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