ms
This commit is contained in:
@@ -60,9 +60,13 @@ Public Class frmAdministration
|
||||
End Sub
|
||||
|
||||
Private Sub GUIDTextBox_TextChanged(sender As Object, e As EventArgs) Handles GUIDTextBox.TextChanged
|
||||
Refresh_Profile_user()
|
||||
Refresh_Free_Users()
|
||||
Load_Profile_Process()
|
||||
|
||||
If GUIDTextBox.Text <> "" Then
|
||||
Refresh_Profile_user()
|
||||
Refresh_Free_Users(GUIDTextBox.Text)
|
||||
Load_Profile_Process()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Sub Refresh_Profile_user()
|
||||
Try
|
||||
@@ -97,20 +101,20 @@ Public Class frmAdministration
|
||||
For Each row As DataRow In MyDataset.TBWH_User.Rows
|
||||
row.Item(0) = CBool(False)
|
||||
Next
|
||||
Refresh_Free_Users()
|
||||
Refresh_Profile_user()
|
||||
If GUIDTextBox.Text <> "" Then
|
||||
Refresh_Free_Users(GUIDTextBox.Text)
|
||||
Refresh_Profile_user()
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected Error while adding user-rights: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
End Sub
|
||||
Sub Refresh_Free_Users()
|
||||
Try
|
||||
Dim ID = CInt(GUIDTextBox.Text)
|
||||
Catch ex As Exception
|
||||
Exit Sub
|
||||
End Try
|
||||
Sub Refresh_Free_Users(PROFILE_ID As Integer)
|
||||
|
||||
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)
|
||||
|
||||
|
||||
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)
|
||||
Try
|
||||
MyDataset.TBWH_User.Clear()
|
||||
@@ -148,7 +152,10 @@ Public Class frmAdministration
|
||||
Dim del = String.Format("DELETE FROM TBCW_USER_PROFILE WHERE GUID = {0}", ID)
|
||||
If clsDatabase.Execute_non_Query(del) = True Then
|
||||
Refresh_Profile_user()
|
||||
Refresh_Free_Users()
|
||||
If GUIDTextBox.Text <> "" Then
|
||||
Refresh_Free_Users(GUIDTextBox.Text)
|
||||
End If
|
||||
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected Error in deleting ProfileUserRelation: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
@@ -244,4 +251,10 @@ Public Class frmAdministration
|
||||
ToolTip1.ToolTipIcon = ToolTipIcon.Info
|
||||
ToolTip1.UseAnimation = True
|
||||
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
|
||||
Reference in New Issue
Block a user