Timas ID und Date Culture
Kleinigkeiten
This commit is contained in:
19
cBenutzer.vb
19
cBenutzer.vb
@@ -17,8 +17,9 @@ Public Class cBenutzer
|
||||
Property suchname As String = ""
|
||||
Property Hostname As String = ""
|
||||
Property Company As String = ""
|
||||
|
||||
Property Username As String = ""
|
||||
Property sAMAccountName As String = ""
|
||||
Property TimasID As String = ""
|
||||
|
||||
'test
|
||||
|
||||
@@ -37,6 +38,7 @@ Public Class cBenutzer
|
||||
If dcabfrage = True Then
|
||||
'Class1.DebugText = userPrincipalName & LDAPa
|
||||
FillFromDC(userPrincipalName, "userPrincipalName", LDAPa)
|
||||
FillTimasID()
|
||||
End If
|
||||
End Function
|
||||
|
||||
@@ -100,6 +102,7 @@ Public Class cBenutzer
|
||||
.PropertiesToLoad.Add("msDS-PrincipalName")
|
||||
.PropertiesToLoad.Add("userPrincipalName")
|
||||
.PropertiesToLoad.Add("company")
|
||||
.PropertiesToLoad.Add("sAMAccountName")
|
||||
|
||||
End With
|
||||
Dim Result As DirectoryServices.SearchResult = searcher.FindOne
|
||||
@@ -115,13 +118,25 @@ Public Class cBenutzer
|
||||
Me.msDSPrincipalName = blablabla(Result, "msDS-PrincipalName")
|
||||
Me.userPrincipalName = blablabla(Result, "userPrincipalName")
|
||||
Me.Company = blablabla(Result, "company")
|
||||
Me.sAMAccountName = blablabla(Result, "sAMAccountName")
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("FillFromDC: " & ex.Message)
|
||||
'MsgBox("FillFromDC: " & ex.Message)
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
Function FillTimasID()
|
||||
Dim ds As New DataSet
|
||||
cSQL.SQL2DS("SELECT mit_timasID FROM ADMIN.dbo.tblMitarbeiter where mit_AliasAD_Username = '" & Me.sAMAccountName & "'", ds)
|
||||
If ds.Tables.Count > 0 Then
|
||||
If ds.Tables(0).Rows(0).Item(0) > 0 Then
|
||||
Me.TimasID = ds.Tables(0).Rows(0).Item(0)
|
||||
End If
|
||||
End If
|
||||
|
||||
End Function
|
||||
|
||||
Function isDokuAdmin() As Boolean
|
||||
Dim ds As New DataSet
|
||||
cSQL.SQL2DS("select * from TbL_Berechtigungen where Benutzeranmeldename = '" & Me.BenutzeranmeldeName & "' AND Standort = 'DokuAdmin'", ds)
|
||||
|
||||
Reference in New Issue
Block a user