LDAP-Synchronisation

This commit is contained in:
2023-05-15 13:06:53 +02:00
parent fa193fcfbd
commit 0f491590af
3 changed files with 125 additions and 110 deletions

View File

@@ -25,14 +25,9 @@ Public Class frmADsearch
dt.Columns.Add("sAMAccountName", GetType(String)) dt.Columns.Add("sAMAccountName", GetType(String))
dt.Columns.Add("givenName", GetType(String)) dt.Columns.Add("givenName", GetType(String))
dt.Columns.Add("sn", GetType(String)) dt.Columns.Add("sn", GetType(String))
dt.Columns.Add("DisplayName", GetType(String))
dt.Columns.Add("distinguishedName", GetType(String)) dt.Columns.Add("distinguishedName", GetType(String))
dt.Columns.Add("department", GetType(String)) dt.Columns.Add("department", GetType(String))
dt.Columns.Add("company", GetType(String)) dt.Columns.Add("company", GetType(String))
dt.Columns.Add("mail", GetType(String))
dt.Columns.Add("cn", GetType(String))
dt.Columns.Add("telephoneNumber", GetType(String))
dt.Columns.Add("extensionAttribute7", GetType(String))
dt.Columns.Add("adEntry", GetType(System.DirectoryServices.DirectoryEntry)) dt.Columns.Add("adEntry", GetType(System.DirectoryServices.DirectoryEntry))
End Sub End Sub
@@ -50,7 +45,6 @@ Public Class frmADsearch
.Columns("GivenName").Width = 75 .Columns("GivenName").Width = 75
.Columns("sn").Width = 100 .Columns("sn").Width = 100
.Columns("sn").HeaderText = "Lastname" .Columns("sn").HeaderText = "Lastname"
.Columns("DisplayName").Visible = False
.Columns("sAMAccountName").Width = 75 .Columns("sAMAccountName").Width = 75
.Columns("sAMAccountName").HeaderText = "Account" .Columns("sAMAccountName").HeaderText = "Account"
.Columns("department").Width = 75 .Columns("department").Width = 75
@@ -59,9 +53,7 @@ Public Class frmADsearch
.Columns("department").HeaderText = "Department" .Columns("department").HeaderText = "Department"
.Columns("company").Width = 75 .Columns("company").Width = 75
.Columns("company").HeaderText = "Company" .Columns("company").HeaderText = "Company"
.Columns("telephoneNumber").Visible = False .Columns("adEntry").Visible = False
.Columns("extensionAttribute7").Visible = False
.Columns("cn").Visible = False
End With End With
@@ -80,9 +72,8 @@ Public Class frmADsearch
Try Try
dirEntry = New System.DirectoryServices.DirectoryEntry(LDAPString) dirEntry = New System.DirectoryServices.DirectoryEntry(LDAPString)
dirSearcher = New System.DirectoryServices.DirectorySearcher(dirEntry) dirSearcher = New System.DirectoryServices.DirectorySearcher(dirEntry)
dirSearcher.Filter = "(samAccountName=" & username & ")" dirSearcher.Filter = " (&(objectClass=user)(objectCategory=person)(|(samAccountName=*" & username & "*)))"
dirSearcher.PropertiesToLoad.Add("GivenName")
dirSearcher.PropertiesToLoad.Add("sn")
Dim sr As DirectoryServices.SearchResultCollection = dirSearcher.FindAll() Dim sr As DirectoryServices.SearchResultCollection = dirSearcher.FindAll()
If sr Is Nothing Then If sr Is Nothing Then
lblHint.Text = "No Entries found" lblHint.Text = "No Entries found"
@@ -95,19 +86,13 @@ Public Class frmADsearch
Dim de As System.DirectoryServices.DirectoryEntry Dim de As System.DirectoryServices.DirectoryEntry
de = srEntry.GetDirectoryEntry() de = srEntry.GetDirectoryEntry()
'Dim ObjFirstName As String = ""
'Dim ObjLastName As String = String.Empty
Dim R As DataRow = dt.NewRow Dim R As DataRow = dt.NewRow
R("givenName") = de.Properties("givenName").Value.ToString() R("givenName") = setNoNullableValue(de.Properties("givenName").Value)
R("sAMAccountName") = de.Properties("sAMAccountName").Value.ToString() R("sn") = setNoNullableValue(de.Properties("sn").Value)
R("department") = de.Properties("department").Value.ToString() R("sAMAccountName") = setNoNullableValue(de.Properties("sAMAccountName").Value)
R("company") = de.Properties("company").Value.ToString() R("department") = setNoNullableValue(de.Properties("department").Value)
R("sn") = de.Properties("sn").Value.ToString() R("distinguishedName") = setNoNullableValue(de.Properties("distinguishedName").Value)
R("cn") = de.Properties("cn").Value.ToString() R("company") = setNoNullableValue(de.Properties("company").Value)
R("telephoneNumber") = de.Properties("telephoneNumber").Value.ToString()
R("distinguishedName") = de.Properties("distinguishedName").Value.ToString()
R("extensionAttribute7") = de.Properties("extensionAttribute7").Value.ToString()
R("adEntry") = de R("adEntry") = de
dt.Rows.Add(R) dt.Rows.Add(R)
@@ -162,23 +147,30 @@ Public Class frmADsearch
For Each row As DataGridViewRow In dgvAD.SelectedRows For Each row As DataGridViewRow In dgvAD.SelectedRows
activeDirectoryObj = New ADObject With { activeDirectoryObj = New ADObject With {
.sn = IIf(IsDBNull(row.Cells("sn").Value), "", row.Cells("sn").Value),
.sAMAccountName = IIf(IsDBNull(row.Cells("sAMAccountName").Value), "", row.Cells("sAMAccountName").Value),
.givenName = IIf(IsDBNull(row.Cells("givenName").Value), "", row.Cells("givenName").Value),
.cn = IIf(IsDBNull(row.Cells("cn").Value), "", row.Cells("cn").Value),
.department = IIf(IsDBNull(row.Cells("department").Value), "", row.Cells("department").Value),
.company = IIf(IsDBNull(row.Cells("company").Value), "", row.Cells("company").Value),
.telephoneNumber = IIf(IsDBNull(row.Cells("telephoneNumber").Value), "", row.Cells("telephoneNumber").Value),
.distinguishedName = IIf(IsDBNull(row.Cells("distinguishedName").Value), "", row.Cells("distinguishedName").Value),
.mail = IIf(IsDBNull(row.Cells("mail").Value), "", row.Cells("mail").Value),
.domain = cboDomain.Text, .domain = cboDomain.Text,
.emailExtension = IIf(IsDBNull(row.Cells("extensionAttribute7").Value), "", row.Cells("extensionAttribute7").Value),
.ADEntry = IIf(IsDBNull(row.Cells("adEntry").Value), "", row.Cells("adEntry").Value) .ADEntry = IIf(IsDBNull(row.Cells("adEntry").Value), "", row.Cells("adEntry").Value)
} }
Next Next
End Sub End Sub
Public Function setNoNullableValue(value As String) As String
If value IsNot Nothing Then
If value <> "" Then
Return value
End If
End If
Return ""
End Function
Private Sub txtUser_KeyDown(sender As Object, e As KeyEventArgs) Handles txtUser.KeyDown
If e.KeyCode = Keys.Enter Then
btnSearch_Click(sender, e)
End If
End Sub
End Class End Class
Public Class ADObject Public Class ADObject
@@ -186,17 +178,7 @@ Public Class ADObject
Public Sub New() Public Sub New()
End Sub End Sub
Public Property sn As String
Public Property givenName As String
Public Property cn As String
Public Property department As String
Public Property company As String
Public Property telephoneNumber As String
Public Property distinguishedName As String
Public Property mail As String
Public Property sAMAccountName As String
Public Property domain As String Public Property domain As String
Public Property emailExtension As String
Public Property ADEntry As System.DirectoryServices.DirectoryEntry Public Property ADEntry As System.DirectoryServices.DirectoryEntry
End Class End Class

View File

@@ -71,6 +71,9 @@ Partial Class frmMitarbDetails
Me.Label59 = New System.Windows.Forms.Label() Me.Label59 = New System.Windows.Forms.Label()
Me.Label4 = New System.Windows.Forms.Label() Me.Label4 = New System.Windows.Forms.Label()
Me.GroupBox2 = New System.Windows.Forms.GroupBox() Me.GroupBox2 = New System.Windows.Forms.GroupBox()
Me.btnUpdateAD = New System.Windows.Forms.Button()
Me.txtEmailExtension = New System.Windows.Forms.TextBox()
Me.lblEmailExtension = New System.Windows.Forms.Label()
Me.txtAbweichenderAnzeigename = New System.Windows.Forms.TextBox() Me.txtAbweichenderAnzeigename = New System.Windows.Forms.TextBox()
Me.Label57 = New System.Windows.Forms.Label() Me.Label57 = New System.Windows.Forms.Label()
Me.cboFaktGrp = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.cboFaktGrp = New VERAG_PROG_ALLGEMEIN.MyComboBox()
@@ -184,9 +187,6 @@ Partial Class frmMitarbDetails
Me.PictureBox6 = New System.Windows.Forms.PictureBox() Me.PictureBox6 = New System.Windows.Forms.PictureBox()
Me.cboAdminBer = New System.Windows.Forms.ComboBox() Me.cboAdminBer = New System.Windows.Forms.ComboBox()
Me.Label7 = New System.Windows.Forms.Label() Me.Label7 = New System.Windows.Forms.Label()
Me.txtEmailExtension = New System.Windows.Forms.TextBox()
Me.lblEmailExtension = New System.Windows.Forms.Label()
Me.btnUpdateAD = New System.Windows.Forms.Button()
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.Panel1.SuspendLayout() Me.Panel1.SuspendLayout()
Me.TabControl2.SuspendLayout() Me.TabControl2.SuspendLayout()
@@ -798,6 +798,36 @@ Partial Class frmMitarbDetails
Me.GroupBox2.TabStop = False Me.GroupBox2.TabStop = False
Me.GroupBox2.Text = "Firmendaten" Me.GroupBox2.Text = "Firmendaten"
' '
'btnUpdateAD
'
Me.btnUpdateAD.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
Me.btnUpdateAD.BackColor = System.Drawing.Color.White
Me.btnUpdateAD.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnUpdateAD.Image = Global.ADMIN.My.Resources.Resources.refresh
Me.btnUpdateAD.Location = New System.Drawing.Point(669, 37)
Me.btnUpdateAD.Name = "btnUpdateAD"
Me.btnUpdateAD.Size = New System.Drawing.Size(27, 20)
Me.btnUpdateAD.TabIndex = 94
Me.btnUpdateAD.UseVisualStyleBackColor = False
'
'txtEmailExtension
'
Me.txtEmailExtension.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.txtEmailExtension.Location = New System.Drawing.Point(402, 204)
Me.txtEmailExtension.Name = "txtEmailExtension"
Me.txtEmailExtension.Size = New System.Drawing.Size(143, 20)
Me.txtEmailExtension.TabIndex = 111
'
'lblEmailExtension
'
Me.lblEmailExtension.AutoSize = True
Me.lblEmailExtension.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblEmailExtension.Location = New System.Drawing.Point(399, 188)
Me.lblEmailExtension.Name = "lblEmailExtension"
Me.lblEmailExtension.Size = New System.Drawing.Size(88, 13)
Me.lblEmailExtension.TabIndex = 112
Me.lblEmailExtension.Text = "E-Mail-Extension:"
'
'txtAbweichenderAnzeigename 'txtAbweichenderAnzeigename
' '
Me.txtAbweichenderAnzeigename.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtAbweichenderAnzeigename.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
@@ -2027,36 +2057,6 @@ Partial Class frmMitarbDetails
Me.Label7.TabIndex = 78 Me.Label7.TabIndex = 78
Me.Label7.Text = "Berechtigung:" Me.Label7.Text = "Berechtigung:"
' '
'txtEmailExtension
'
Me.txtEmailExtension.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.txtEmailExtension.Location = New System.Drawing.Point(402, 204)
Me.txtEmailExtension.Name = "txtEmailExtension"
Me.txtEmailExtension.Size = New System.Drawing.Size(143, 20)
Me.txtEmailExtension.TabIndex = 111
'
'lblEmailExtension
'
Me.lblEmailExtension.AutoSize = True
Me.lblEmailExtension.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblEmailExtension.Location = New System.Drawing.Point(399, 188)
Me.lblEmailExtension.Name = "lblEmailExtension"
Me.lblEmailExtension.Size = New System.Drawing.Size(88, 13)
Me.lblEmailExtension.TabIndex = 112
Me.lblEmailExtension.Text = "E-Mail-Extension:"
'
'btnUpdateAD
'
Me.btnUpdateAD.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
Me.btnUpdateAD.BackColor = System.Drawing.Color.White
Me.btnUpdateAD.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnUpdateAD.Image = Global.ADMIN.My.Resources.Resources.refresh
Me.btnUpdateAD.Location = New System.Drawing.Point(669, 37)
Me.btnUpdateAD.Name = "btnUpdateAD"
Me.btnUpdateAD.Size = New System.Drawing.Size(27, 20)
Me.btnUpdateAD.TabIndex = 94
Me.btnUpdateAD.UseVisualStyleBackColor = False
'
'frmMitarbDetails 'frmMitarbDetails
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)

View File

@@ -7,8 +7,11 @@ Imports System.Net.WebRequestMethods
Imports System.Security.Policy Imports System.Security.Policy
Imports System.Text Imports System.Text
Imports System.Windows Imports System.Windows
Imports System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel
Imports DAKOSY_Worker.DEERRE Imports DAKOSY_Worker.DEERRE
Imports GrapeCity.ActiveReports.ReportsCore.Tools
Imports GrapeCity.Enterprise.Data.Expressions.Evaluation Imports GrapeCity.Enterprise.Data.Expressions.Evaluation
Imports Microsoft.VisualBasic.ApplicationServices
Imports Newtonsoft.Json Imports Newtonsoft.Json
Imports VERAG_PROG_ALLGEMEIN Imports VERAG_PROG_ALLGEMEIN
@@ -887,23 +890,23 @@ Public Class frmMitarbDetails
Private Sub Button7_Click(sender As Object, e As EventArgs) Handles btnADladen.Click Private Sub Button7_Click(sender As Object, e As EventArgs) Handles btnADladen.Click
Dim frmAD = New frmADsearch() Dim frmAD = New frmADsearch()
If frmAD.ShowDialog = DialogResult.OK Then If frmAD.ShowDialog = DialogResult.OK Then
txtEmail.Text = ""
txtUsername.Text = "" txtEmail.Text = frmAD.setNoNullableValue(frmAD.activeDirectoryObj.ADEntry.Properties("mail").Value)
txtVname.Text = "" txtUsername.Text = frmAD.setNoNullableValue(frmAD.activeDirectoryObj.ADEntry.Properties("sAMAccountName").Value)
txtNname.Text = "" txtVname.Text = frmAD.setNoNullableValue(frmAD.activeDirectoryObj.ADEntry.Properties("givenName").Value)
txtDurchwahl.Text = "" txtNname.Text = frmAD.setNoNullableValue(frmAD.activeDirectoryObj.ADEntry.Properties("sn").Value)
txtALIASUser.Text = "" txtStrasse.Text = frmAD.setNoNullableValue(frmAD.activeDirectoryObj.ADEntry.Properties("streetAdress").Value)
txtEmailExtension.Text = "" txtPlz.Text = frmAD.setNoNullableValue(frmAD.activeDirectoryObj.ADEntry.Properties("postalCode").Value)
txtEmail.Text = frmAD.activeDirectoryObj.mail txtOrt.Text = frmAD.setNoNullableValue(frmAD.activeDirectoryObj.ADEntry.Properties("I").Value)
txtUsername.Text = frmAD.activeDirectoryObj.sAMAccountName txtMobiltel.Text = frmAD.setNoNullableValue(frmAD.activeDirectoryObj.ADEntry.Properties("Mobile").Value)
txtVname.Text = frmAD.activeDirectoryObj.givenName txtDurchwahl.Text = frmAD.setNoNullableValue(frmAD.activeDirectoryObj.ADEntry.Properties("telephoneNumber").Value)
txtNname.Text = frmAD.activeDirectoryObj.sn txtALIASUser.Text = frmAD.setNoNullableValue(frmAD.activeDirectoryObj.ADEntry.Properties("sAMAccountName").Value)
txtDurchwahl.Text = frmAD.activeDirectoryObj.telephoneNumber txtEmailExtension.Text = frmAD.setNoNullableValue(frmAD.activeDirectoryObj.ADEntry.Properties("extensionAttribute7").Value)
txtALIASUser.Text = frmAD.activeDirectoryObj.sAMAccountName
txtEmailExtension.Text = frmAD.activeDirectoryObj.emailextension
cboALIASDomain.changeItem(frmAD.activeDirectoryObj.domain) cboALIASDomain.changeItem(frmAD.activeDirectoryObj.domain)
cboAbteilung.changeItem(frmAD.activeDirectoryObj.department) cboAbteilung.changeItem(frmAD.setNoNullableValue(frmAD.activeDirectoryObj.ADEntry.Properties("department").Value))
cboNiederlassung.changeItem(frmAD.activeDirectoryObj.company) cboNiederlassung.changeItem(frmAD.setNoNullableValue(frmAD.activeDirectoryObj.ADEntry.Properties("company").Value))
End If End If
End Sub End Sub
@@ -916,8 +919,6 @@ Public Class frmMitarbDetails
Dim a As MsgBoxResult = MsgBox("Die Daten des Mitarbeiters mit dem AD synchronisieren?", vbYesNo) Dim a As MsgBoxResult = MsgBox("Die Daten des Mitarbeiters mit dem AD synchronisieren?", vbYesNo)
If a = vbYes Then If a = vbYes Then
Dim domainName As String = ""
Dim ldap As String = "" Dim ldap As String = ""
Select Case cboALIASDomain._value Select Case cboALIASDomain._value
@@ -935,18 +936,22 @@ Public Class frmMitarbDetails
Try Try
dirEntry = New System.DirectoryServices.DirectoryEntry(ldap) dirEntry = New System.DirectoryServices.DirectoryEntry(ldap)
dirSearcher = New System.DirectoryServices.DirectorySearcher(dirEntry) dirSearcher = New System.DirectoryServices.DirectorySearcher(dirEntry)
dirSearcher.Filter = "(samAccountName=" & txtALIASUser.Text & ")"
dirSearcher.PropertiesToLoad.Add("GivenName") dirSearcher.Filter = " (&(objectClass=user)(objectCategory=person)(|(samAccountName=*" & txtALIASUser.Text & "*)))"
dirSearcher.PropertiesToLoad.Add("sn")
Dim sr As DirectoryServices.SearchResult = dirSearcher.FindOne() Dim sr As DirectoryServices.SearchResult = dirSearcher.FindOne()
If sr Is Nothing Then If sr Is Nothing Then
Dim b As MsgBoxResult = MsgBox("Mitarbeiterdaten sind im AD nicht vorhanden?" & vbNewLine & "Solle der Mitarbeiter " & txtALIASUser.Text & " in der Domain " & cboALIASDomain.Text & " angelegt werden?", vbYesNo) Dim b As MsgBoxResult = MsgBox("User ist im AD nicht vorhanden?" & vbNewLine & "Solle der Mitarbeiter " & txtALIASUser.Text & " in der Domain " & cboALIASDomain.Text & " angelegt werden?", vbYesNo)
If b = vbYes Then If b = vbYes Then
Dim frmAD = New frmADsearch("Referenzuser (Gruppen werden von diesem User übernommen)!") Dim frmAD = New frmADsearch("Referenzuser (Gruppenberechtigungen werden von diesem User übernommen)!")
If frmAD.ShowDialog = DialogResult.OK Then If frmAD.ShowDialog = DialogResult.OK Then
'frmAD.activeDirectoryObj.ADEntry.CopyTo(New DirectoryEntry(frmAD.activeDirectoryObj.ADEntry.Parent.Path, txtALIASUser.Text, txtPwd.Text)) MsgBox("The Lightweight Directory Access Protocol (LDAP) provider does not CURRENTLY support this method!")
'Sobald diese Funktion unterstützt wird, kann nachfolgende Funktion auskommentiert werden
'https://learn.microsoft.com/en-us/dotnet/api/system.directoryservices.directoryentry.copyto
'Dim NewADAccount As DirectoryEntry = New DirectoryEntry(frmAD.activeDirectoryObj.ADEntry.Parent.Path, txtALIASUser.Text, txtPwd.Text)
'frmAD.activeDirectoryObj.ADEntry.CopyTo(NewADAccount)
End If End If
Else Else
@@ -957,13 +962,28 @@ Public Class frmMitarbDetails
Dim de As System.DirectoryServices.DirectoryEntry = sr.GetDirectoryEntry() Dim de As System.DirectoryServices.DirectoryEntry = sr.GetDirectoryEntry()
de.Properties("givenName").Value = txtVname.Text If de.SchemaClassName <> "user" Then
'de.Properties("sAMAccountName").Value.ToString() MsgBox("hinterlegter AD-User ist nicht vom Typ USER")
de.Properties("department").Value = cboAbteilung._value Exit Sub
de.Properties("company").Value = cboFirma.SelectedValue End If
de.Properties("sn").Value = txtNname.Text
'de.Properties("extensionAttribute7").Value = txtEmailExtension.Text If (isFilled(de.Properties("givenName").Value)) Then de.Properties("givenName").Value = txtVname.Text
de.Properties("mail").Value = txtEmail.Text If (isFilled(de.Properties("department").Value)) Then de.Properties("department").Value = cboAbteilung._value
If (isFilled(de.Properties("company").Value)) Then de.Properties("company").Value = cboFirma.SelectedValue
If (isFilled(de.Properties("sn").Value)) Then de.Properties("sn").Value = txtNname.Text
If (isFilled(de.Properties("mail").Value)) Then de.Properties("mail").Value = txtEmail.Text
If cbxGekuendigt.Checked Then
Dim expire As DateTime = datGekuendigtAm.Value
expire = expire.AddDays(1)
de.Properties("accountExpires").Value = expire.ToFileTime.ToString
End If
'If (isFilled(de.Properties("streetAdress").Value)) Then de.Properties("streetAdress").Value = txtStrasse.Text
'If (isFilled(de.Properties("postalCode").Value)) Then de.Properties("postalCode").Value = txtPlz.Text
'If (isFilled(de.Properties("I").Value)) Then de.Properties("I").Value = txtOrt.Text
'If (isFilled(de.Properties("Mobile").Value)) Then de.Properties("Mobile").Value = txtMobiltel.Text
de.CommitChanges() de.CommitChanges()
Catch ex As Exception Catch ex As Exception
@@ -973,13 +993,26 @@ Public Class frmMitarbDetails
End Sub End Sub
Private Function setNoNullableValue(value As String) As String Private Sub txtALIASUser_TextChanged(sender As Object, e As EventArgs) Handles txtALIASUser.TextChanged, cboALIASDomain.TextChanged
If txtALIASUser.Text <> "" AndAlso cboALIASDomain._value <> "" Then
btnUpdateAD.Enabled = True
Else
btnUpdateAD.Enabled = False
End If
End Sub
Public Function isFilled(value As String) As Boolean
If value IsNot Nothing Then If value IsNot Nothing Then
If value <> "" Then If value <> "" Then
Return value Return False ' Werte aus AD sollen nur gesetzt, nicht überschr
Else
Return True
End If End If
End If End If
Return True
End Function End Function