Timas ID und Date Culture
Kleinigkeiten
This commit is contained in:
18
Main.vb
18
Main.vb
@@ -1,4 +1,5 @@
|
||||
Imports System.Environment
|
||||
Imports System.Globalization
|
||||
Imports System.IO
|
||||
Public Class TSUserReporter
|
||||
|
||||
@@ -9,6 +10,7 @@ Public Class TSUserReporter
|
||||
Public Printer As New List(Of Drucker)
|
||||
Dim Standarddrucker As New Drucker("", "")
|
||||
Dim Bondrucker As New Drucker("", "")
|
||||
Dim Niederlassung As New Drucker("", "")
|
||||
Public Message As String
|
||||
Dim ThinClient As String
|
||||
Dim isTS As Boolean = False
|
||||
@@ -110,7 +112,7 @@ Public Class TSUserReporter
|
||||
'" & cRes.LocalUser.BenutzeranmeldeName & "',
|
||||
'" & cRes.LocalUser.Name & "',
|
||||
'" & cRes.LocalTeamviewerID & "',
|
||||
'" & Date.Now & "',
|
||||
'" & Date.Now.ToString("dd.MM.yyyy HH:mm:ss", New CultureInfo("de").NumberFormat) & "',
|
||||
'" & cRes.LocalUser.Domäne & "',
|
||||
'" & cRes.LocalUser.Company & "',
|
||||
'" & StartTime.ToString("dd.MM HH:mm") & "',
|
||||
@@ -135,7 +137,8 @@ Public Class TSUserReporter
|
||||
Label1.Text &= "Letzte Aktualisierung:" & vbCrLf
|
||||
Label1.Text &= lastupdate & vbCrLf
|
||||
Label1.Text &= Standarddrucker.Druckername & vbCrLf
|
||||
Label1.Text &= Bondrucker.Druckername & vbCrLf & vbCrLf
|
||||
Label1.Text &= Bondrucker.Druckername & vbCrLf
|
||||
Label1.Text &= "TimasID: " & cRes.LocalUser.TimasID & vbCrLf
|
||||
Label1.Text &= Message
|
||||
End Function
|
||||
|
||||
@@ -192,8 +195,10 @@ Public Class TSUserReporter
|
||||
|
||||
Function SetUserEnviroment()
|
||||
Try
|
||||
Environment.SetEnvironmentVariable("PC_SERVER", "pbx3.flashnet.at", EnvironmentVariableTarget.User)
|
||||
Environment.SetEnvironmentVariable("PC_USER", cRes.LocalDomUser.mit_username & "@verag", EnvironmentVariableTarget.User)
|
||||
Environment.SetEnvironmentVariable("PC_SERVER", "my.pbxcloud.at", EnvironmentVariableTarget.User)
|
||||
Environment.SetEnvironmentVariable("PC_USER", Nothing, EnvironmentVariableTarget.User)
|
||||
Environment.SetEnvironmentVariable("timasID", cRes.LocalUser.TimasID, EnvironmentVariableTarget.User)
|
||||
' Environment.SetEnvironmentVariable("PC_USER", cRes.LocalDomUser.mit_username & "@verag", EnvironmentVariableTarget.User)
|
||||
'Environment.SetEnvironmentVariable("PC_PASS", cRes.LocalDomUser.mit_pwd, EnvironmentVariableTarget.User)
|
||||
' Environment.SetEnvironmentVariable("PC_USE_CUSTOM_NOTIFICATIONS_AS_DEFAULT", "ENA", EnvironmentVariableTarget.User)
|
||||
' MsgBox(Environment.GetEnvironmentVariable("PC_SErVER"))
|
||||
@@ -278,6 +283,8 @@ Public Class TSUserReporter
|
||||
My.Computer.Registry.SetValue("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows", "Device", p.Druckername)
|
||||
ElseIf p.Druckertype = "Bon" Then
|
||||
Bondrucker = p
|
||||
ElseIf p.Druckertype = "Niederlassung" Then
|
||||
Niederlassung = p
|
||||
End If
|
||||
Next
|
||||
writeoutAVISO_OPTIONS()
|
||||
@@ -309,7 +316,8 @@ Public Class TSUserReporter
|
||||
Text = ""
|
||||
Else
|
||||
Text = "PRINTER:" & Standarddrucker.Druckername & vbCrLf
|
||||
Text &= "BON:" & Bondrucker.Druckername
|
||||
Text &= "BON:" & Bondrucker.Druckername & vbCrLf
|
||||
Text &= "Niederlassung:" & Niederlassung.Druckername
|
||||
End If
|
||||
Try
|
||||
System.IO.File.WriteAllText(PrintINI, Text)
|
||||
|
||||
@@ -14,9 +14,10 @@
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<PublishUrl>\\app01\Tools\Test\</PublishUrl>
|
||||
<Install>false</Install>
|
||||
<InstallFrom>Unc</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
@@ -24,10 +25,10 @@
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationRevision>2</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
@@ -69,7 +70,10 @@
|
||||
<SignManifests>true</SignManifests>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ManifestCertificateThumbprint>443CA3745EE904EED98572A89099259301BA06D1</ManifestCertificateThumbprint>
|
||||
<ManifestCertificateThumbprint>0E7F805EC73FC627C5B07472C1EF817DF8E04CE2</ManifestCertificateThumbprint>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<GenerateManifests>true</GenerateManifests>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
||||
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