MS0211
This commit is contained in:
@@ -33,12 +33,18 @@ Public Class frmCheckRightsEntity
|
||||
BW_RightsEntity = New BackgroundWorker
|
||||
BW_RightsEntity.WorkerReportsProgress = True
|
||||
BW_RightsEntity.WorkerSupportsCancellation = True
|
||||
Dim sqlfiles = String.Format("SELECT * FROM VWPMO_WD_DOC_SEARCH where ENTITY_ID = {0} ORDER BY DocID", ENTITY_ID)
|
||||
Dim sqlfiles = String.Format("SELECT T.DocID,T.FULL_FILENAME,TRL.RECORD_ID,TR.FORM_ID AS [ENTITY_ID] FROM VWPMO_DOC_SEARCH T, TBPMO_DOC_RECORD_LINK TRL, TBPMO_RECORD TR where T.DocID = TRL.DOC_ID AND TRL.RECORD_ID = TR.GUID AND TR.FORM_ID = {0} ORDER BY DocID", ENTITY_ID)
|
||||
DT_FILES = clsDatabase.Return_Datatable(sqlfiles)
|
||||
If DD_Rights.ClassRights.Init(ENTITY_ID, chklogging.Checked, DT_FILES.Rows.Count) = False Then
|
||||
MsgBox("Could not init rights management. " & vbNewLine & "Check logfile", MsgBoxStyle.Critical)
|
||||
Exit Sub
|
||||
End If
|
||||
If DT_FILES.Rows.Count = 0 Then
|
||||
MsgBox("No files were found! Please check docsearch!", MsgBoxStyle.Critical)
|
||||
Exit Sub
|
||||
Else
|
||||
clsLogger.Add(String.Format(">> {0} files must be transferred!", DT_FILES.Rows.Count), False)
|
||||
End If
|
||||
btncancel.Visible = True
|
||||
lblstate.Visible = True
|
||||
lblstate.Text = "Starting Background Worker...."
|
||||
@@ -67,6 +73,7 @@ Public Class frmCheckRightsEntity
|
||||
'Jede Datei einzeln verarbeiten
|
||||
For Each row As DataRow In DT_FILES.Rows
|
||||
If BW_RightsEntity.CancellationPending = True Then
|
||||
MsgBox("Backgroundworker aborting - check log!", MsgBoxStyle.Critical)
|
||||
e.Cancel = True
|
||||
Exit For
|
||||
Else
|
||||
@@ -78,13 +85,21 @@ Public Class frmCheckRightsEntity
|
||||
righterrors = True
|
||||
End If
|
||||
Else
|
||||
MsgBox("Unexpected Error in DD_Rights.ClassRights.TransferRights2Service - Check the log!", MsgBoxStyle.Exclamation)
|
||||
If DD_Rights.ClassRights.MSG_RESULT <> "" Then
|
||||
MsgBox(DD_Rights.ClassRights.MSG_RESULT, MsgBoxStyle.Information)
|
||||
End If
|
||||
_error = True
|
||||
End If
|
||||
Else
|
||||
MsgBox("Unexpected Error in DD_Rights.ClassRights.Collect_Users - Check the log!", MsgBoxStyle.Exclamation)
|
||||
If DD_Rights.ClassRights.MSG_RESULT <> "" Then
|
||||
MsgBox(DD_Rights.ClassRights.MSG_RESULT, MsgBoxStyle.Information)
|
||||
End If
|
||||
_error = True
|
||||
End If
|
||||
BW_RightsEntity.ReportProgress(i)
|
||||
i += 1
|
||||
i += 1
|
||||
End If
|
||||
Next
|
||||
DD_Rights.ClassRights.Finalize_SettingRights()
|
||||
|
||||
Reference in New Issue
Block a user