This commit is contained in:
SchreiberM
2016-11-23 10:24:21 +01:00
parent a1d1b2a88e
commit fc9f391307
79 changed files with 7388 additions and 4524 deletions

View File

@@ -37,6 +37,7 @@ Partial Class frmUsersReworkRights
Me.GridColumn1 = New DevExpress.XtraGrid.Columns.GridColumn()
Me.GridColumn2 = New DevExpress.XtraGrid.Columns.GridColumn()
Me.colID = New DevExpress.XtraGrid.Columns.GridColumn()
Me.ProgressPanel1 = New DevExpress.XtraWaitForm.ProgressPanel()
CType(Me.MyDataset, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.TBAD_UsersBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.GridControlUsers2Menue, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -177,11 +178,24 @@ Partial Class frmUsersReworkRights
Me.colID.FieldName = "ID"
Me.colID.Name = "colID"
'
'ProgressPanel1
'
Me.ProgressPanel1.Appearance.BackColor = System.Drawing.Color.Transparent
Me.ProgressPanel1.Appearance.Options.UseBackColor = True
Me.ProgressPanel1.Description = "Collecting rights ..."
Me.ProgressPanel1.Location = New System.Drawing.Point(28, 324)
Me.ProgressPanel1.Name = "ProgressPanel1"
Me.ProgressPanel1.Size = New System.Drawing.Size(463, 45)
Me.ProgressPanel1.TabIndex = 90
Me.ProgressPanel1.Text = "ProgressPanel1"
Me.ProgressPanel1.Visible = False
'
'frmUsersReworkRights
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(528, 324)
Me.ClientSize = New System.Drawing.Size(528, 381)
Me.Controls.Add(Me.ProgressPanel1)
Me.Controls.Add(Me.GridControlUsers2Menue)
Me.Controls.Add(Me.lblstate)
Me.Controls.Add(Me.btncancel)
@@ -220,4 +234,5 @@ Partial Class frmUsersReworkRights
Friend WithEvents GridColumn1 As DevExpress.XtraGrid.Columns.GridColumn
Friend WithEvents GridColumn2 As DevExpress.XtraGrid.Columns.GridColumn
Friend WithEvents colID As DevExpress.XtraGrid.Columns.GridColumn
Friend WithEvents ProgressPanel1 As DevExpress.XtraWaitForm.ProgressPanel
End Class

View File

@@ -58,7 +58,9 @@ Public Class frmUsersReworkRights
ProgressBar1.Maximum = Count + 1
lblstate.Visible = True
lblstate.Text = "Background Worker started...."
ProgressPanel1.Description = "Preparing Right-Collector...."
Me.ProgressBar1.Visible = True
ProgressPanel1.Visible = True
btnCheckRights.Enabled = False
btncancel.Visible = True
AddHandler BW_RightsEntity.DoWork, AddressOf bw_DoWork
@@ -76,6 +78,7 @@ Public Class frmUsersReworkRights
Private Sub BW_RightsEntity_ProgressChanged(sender As Object, e As ProgressChangedEventArgs) Handles BW_RightsEntity.ProgressChanged
Me.ProgressBar1.Value = e.ProgressPercentage
ProgressPanel1.Description = "Collecting rights for user...."
End Sub
Private Sub bw_DoWork(ByVal sender As Object, ByVal e As DoWorkEventArgs)
Dim worker As BackgroundWorker = CType(sender, BackgroundWorker)
@@ -83,6 +86,7 @@ Public Class frmUsersReworkRights
Dim i As Integer = 1
For Each row As DataRow In MyDataset.TBAD_Users.Rows
If row.Item(0) = CBool(True) Then
' ProgressPanel1.Description = "Collecting rights for user: " & row.Item("USERNAME")
Dim proc = String.Format("EXEC PRPMO_RIGHTS_SERVICE_CHECK_USER {0}, '{1}'", row.Item(5), Environment.UserName)
If ClassDatabase.Execute_non_Query(proc) = False Then
MsgBox("Unexpected Error in Executing rightprocedure - Check the log!", MsgBoxStyle.Critical)
@@ -108,16 +112,19 @@ Public Class frmUsersReworkRights
btncancel.Visible = False
ProgressBar1.Visible = False
lblstate.Visible = False
btnCheckRights.Enabled = True
btncancel.Visible = False
ProgressPanel1.Visible = False
If _error = False Then
MsgBox("All rights of files belonging to User were checked and transmitted to the server!" & vbNewLine & "The setting of the rights might take up to 10 minutes!", MsgBoxStyle.Information)
Else
MsgBox("Some errors occured while checking and transmitting the rights...please check the log!", MsgBoxStyle.Exclamation)
End If
btnCheckRights.Enabled = True
btncancel.Visible = False
Catch ex As Exception
btnCheckRights.Enabled = True
btncancel.Visible = False
ProgressPanel1.Visible = False
End Try
End Sub
End Class