ms
This commit is contained in:
parent
e38b5366a7
commit
42e0fd9a48
@ -7,7 +7,7 @@ Public Class ClassInit
|
|||||||
Public Sub InitLogger()
|
Public Sub InitLogger()
|
||||||
Try
|
Try
|
||||||
' legt den Speicherort fest
|
' legt den Speicherort fest
|
||||||
Dim f As New IO.DirectoryInfo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Digital Data\Clipboard Searcher\Log"))
|
Dim f As New IO.DirectoryInfo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Digital Data\Clipboard Watcher\Log"))
|
||||||
If IO.Directory.Exists(f.ToString) = False Then
|
If IO.Directory.Exists(f.ToString) = False Then
|
||||||
IO.Directory.CreateDirectory(f.ToString)
|
IO.Directory.CreateDirectory(f.ToString)
|
||||||
End If
|
End If
|
||||||
|
|||||||
@ -661,7 +661,7 @@ Partial Class frmAdministration
|
|||||||
Me.btnAddUser2Profile.Name = "btnAddUser2Profile"
|
Me.btnAddUser2Profile.Name = "btnAddUser2Profile"
|
||||||
Me.btnAddUser2Profile.Size = New System.Drawing.Size(256, 28)
|
Me.btnAddUser2Profile.Size = New System.Drawing.Size(256, 28)
|
||||||
Me.btnAddUser2Profile.TabIndex = 59
|
Me.btnAddUser2Profile.TabIndex = 59
|
||||||
Me.btnAddUser2Profile.Text = "User zu ausgefügtem Profil hinzufügen"
|
Me.btnAddUser2Profile.Text = "User zu ausgewähltem Profil hinzufügen"
|
||||||
Me.btnAddUser2Profile.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
Me.btnAddUser2Profile.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
||||||
Me.btnAddUser2Profile.UseVisualStyleBackColor = True
|
Me.btnAddUser2Profile.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
|
|||||||
@ -60,9 +60,13 @@ Public Class frmAdministration
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub GUIDTextBox_TextChanged(sender As Object, e As EventArgs) Handles GUIDTextBox.TextChanged
|
Private Sub GUIDTextBox_TextChanged(sender As Object, e As EventArgs) Handles GUIDTextBox.TextChanged
|
||||||
Refresh_Profile_user()
|
|
||||||
Refresh_Free_Users()
|
If GUIDTextBox.Text <> "" Then
|
||||||
Load_Profile_Process()
|
Refresh_Profile_user()
|
||||||
|
Refresh_Free_Users(GUIDTextBox.Text)
|
||||||
|
Load_Profile_Process()
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Sub Refresh_Profile_user()
|
Sub Refresh_Profile_user()
|
||||||
Try
|
Try
|
||||||
@ -97,20 +101,20 @@ Public Class frmAdministration
|
|||||||
For Each row As DataRow In MyDataset.TBWH_User.Rows
|
For Each row As DataRow In MyDataset.TBWH_User.Rows
|
||||||
row.Item(0) = CBool(False)
|
row.Item(0) = CBool(False)
|
||||||
Next
|
Next
|
||||||
Refresh_Free_Users()
|
If GUIDTextBox.Text <> "" Then
|
||||||
Refresh_Profile_user()
|
Refresh_Free_Users(GUIDTextBox.Text)
|
||||||
|
Refresh_Profile_user()
|
||||||
|
End If
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox("Unexpected Error while adding user-rights: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
MsgBox("Unexpected Error while adding user-rights: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
Sub Refresh_Free_Users()
|
Sub Refresh_Free_Users(PROFILE_ID As Integer)
|
||||||
Try
|
|
||||||
Dim ID = CInt(GUIDTextBox.Text)
|
Dim Sql = String.Format("SELECT DISTINCT * FROM VWDD_USER_MODULE_CW WHERE GUID NOT IN (SELECT USER_ID FROM TBCW_USER_PROFILE WHERE PROFILE_ID = {0}) ORDER BY USERNAME", PROFILE_ID)
|
||||||
Catch ex As Exception
|
|
||||||
Exit Sub
|
|
||||||
End Try
|
|
||||||
|
|
||||||
Dim Sql = String.Format("SELECT * FROM TBDD_USER WHERE MODULE_DDCBSEARCHER = 1 AND GUID NOT IN (SELECT USER_ID FROM TBCW_USER_PROFILE WHERE PROFILE_ID = {0}) ORDER BY USERNAME", GUIDTextBox.Text)
|
|
||||||
Dim DT_USER = clsDatabase.Return_Datatable(Sql)
|
Dim DT_USER = clsDatabase.Return_Datatable(Sql)
|
||||||
Try
|
Try
|
||||||
MyDataset.TBWH_User.Clear()
|
MyDataset.TBWH_User.Clear()
|
||||||
@ -148,7 +152,10 @@ Public Class frmAdministration
|
|||||||
Dim del = String.Format("DELETE FROM TBCW_USER_PROFILE WHERE GUID = {0}", ID)
|
Dim del = String.Format("DELETE FROM TBCW_USER_PROFILE WHERE GUID = {0}", ID)
|
||||||
If clsDatabase.Execute_non_Query(del) = True Then
|
If clsDatabase.Execute_non_Query(del) = True Then
|
||||||
Refresh_Profile_user()
|
Refresh_Profile_user()
|
||||||
Refresh_Free_Users()
|
If GUIDTextBox.Text <> "" Then
|
||||||
|
Refresh_Free_Users(GUIDTextBox.Text)
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox("Unexpected Error in deleting ProfileUserRelation: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
MsgBox("Unexpected Error in deleting ProfileUserRelation: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||||
@ -244,4 +251,10 @@ Public Class frmAdministration
|
|||||||
ToolTip1.ToolTipIcon = ToolTipIcon.Info
|
ToolTip1.ToolTipIcon = ToolTipIcon.Info
|
||||||
ToolTip1.UseAnimation = True
|
ToolTip1.UseAnimation = True
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub frmAdministration_Shown(sender As Object, e As EventArgs) Handles Me.Shown
|
||||||
|
If GUIDTextBox.Text = "" Then
|
||||||
|
Refresh_Free_Users(0)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
@ -145,9 +145,8 @@ Public Class frmMain
|
|||||||
If ERROR_INIT = "NO CLIENT" Then
|
If ERROR_INIT = "NO CLIENT" Then
|
||||||
MsgBox("You are not related to a client!" & vbNewLine & "Please contact the system administrator!", MsgBoxStyle.Exclamation)
|
MsgBox("You are not related to a client!" & vbNewLine & "Please contact the system administrator!", MsgBoxStyle.Exclamation)
|
||||||
Else
|
Else
|
||||||
MsgBox("Sorry Something went wrong in user configuration!" & vbNewLine & "Please contact the system administrator!", MsgBoxStyle.Exclamation)
|
MsgBox("Sorry Something went wrong in user configuration!" & vbNewLine & "Reason: " & ERROR_INIT & vbNewLine & "Please contact the system administrator!", MsgBoxStyle.Exclamation)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
Me.NotifyIconMain.Visible = True
|
Me.NotifyIconMain.Visible = True
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user