MS DateEdit

This commit is contained in:
2020-11-11 17:43:52 +01:00
parent b32f7553d2
commit fef9c99feb
11 changed files with 143 additions and 81 deletions

View File

@@ -111,7 +111,10 @@ Namespace SyncUsers
' Delete users that are assigned to the group but no longer exist in active directory
Dim oUserIdString = String.Join(",", oSyncedUserIds)
Dim oSQL As String = $"DELETE FROM TBDD_GROUPS_USER WHERE USER_ID NOT IN (${oUserIdString}) AND GROUP_ID = {oGroupId}"
If oSyncedUserIds.Count = 0 Then
oUserIdString = 0
End If
Dim oSQL As String = $"DELETE FROM TBDD_GROUPS_USER WHERE USER_ID NOT IN ({oUserIdString}) AND GROUP_ID = {oGroupId}"
Dim oDeletedRelations = _mssql.GetScalarValue(oSQL)
If oCreatedUsers.Count > 0 Then
_logger.Info("Created [{0}] new users", oCreatedUsers.Count)