MS Folderwatcher
This commit is contained in:
@@ -97,7 +97,13 @@ Public Class frmAdmin_UserImport
|
||||
Logger.Warn("User [{0}] could not be imported!", oRow.samAccountName)
|
||||
End If
|
||||
Else
|
||||
oSkipped += 1
|
||||
If UpdatetUser(oRow.samAccountName, oRow.Surname, oRow.GivenName, oRow.Email) Then
|
||||
oImported += 1
|
||||
Else
|
||||
Logger.Warn("User [{0}] could not be updated!", oRow.samAccountName)
|
||||
oSkipped += 1
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
@@ -187,13 +193,24 @@ Public Class frmAdmin_UserImport
|
||||
VALUES ('{prename}','{name}','{username}','{email}','{oAddedWho}')"
|
||||
Dim oResult = My.DatabaseECM.ExecuteNonQuery(oSql)
|
||||
|
||||
Return True
|
||||
Return oResult
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Public Function UpdatetUser(username As String, prename As String, name As String, email As String)
|
||||
Try
|
||||
Dim oAddedWho As String = Environment.UserName
|
||||
Dim oSql As String = $"UPDATE TBDD_USER SET PRENAME = '{prename}', NAME = '{name}', EMAIL = , CHANGED_WHO = '{Environment.UserName}' WHERE USERNAME = '{username}')"
|
||||
Dim oResult = My.DatabaseECM.ExecuteNonQuery(oSql)
|
||||
|
||||
Return oResult
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Public Function InsertGroup(name As String, Optional ECM_FK_ID As Integer = 1, Optional adSync As Boolean = True, Optional internal As Boolean = False, Optional active As Boolean = True)
|
||||
Try
|
||||
Dim addedWho As String = Environment.UserName
|
||||
|
||||
Reference in New Issue
Block a user