This commit is contained in:
SchreiberM
2016-08-25 17:08:41 +02:00
parent c02e5e235c
commit 23612edc88
12 changed files with 2303 additions and 3120 deletions

View File

@@ -8,6 +8,7 @@ Public Class frmCheckRightsEntity
Private WorkingFiles As Integer = 0
Private CURR_DOCID As Integer
Private ENTITY_ID As Integer
Dim righterrors As Boolean = False
Private Sub frmCheckRightsEntity_Load(sender As Object, e As EventArgs) Handles Me.Load
Try
Dim sql = String.Format("SELECT T.FORM_ID, [dbo].[FNPMO_GETOBJECTCAPTION]('{0}','FORMVIEW_TITLE' + CONVERT(VARCHAR(5), T.[FORM_VIEW_ID]), 1) AS FORM_TITLE FROM VWPMO_CONSTRUCTOR_FORMS T WHERE DOCUMENT_VIEW = 1", USER_LANGUAGE)
@@ -24,6 +25,7 @@ Public Class frmCheckRightsEntity
Private Sub btnCheckRights_Click(sender As Object, e As EventArgs) Handles btnCheckRights.Click
If cmbentity.SelectedIndex <> -1 Then
Try
righterrors = False
CURR_DOCID = 0
ENTITY_ID = cmbentity.SelectedValue
Me.ProgressBar1.Visible = True
@@ -74,8 +76,7 @@ Public Class frmCheckRightsEntity
CURR_DOCID = row.Item("DocID")
If DD_Rights.ClassRights.File_DeleteAndSetRight(row.Item("DocID"), row.Item("FULL_FILENAME"), True) Then
If DD_Rights.ClassRights.MSG_RESULT <> "" Then
MsgBox("Unexpected Errors in setting rights: " & vbNewLine & DD_Rights.ClassRights.MSG_RESULT, MsgBoxStyle.Exclamation)
_error = True
righterrors = True
End If
Else
_error = True
@@ -113,7 +114,12 @@ Public Class frmCheckRightsEntity
lblstate.Visible = False
ProgressBar1.Visible = False
If _error = False Then
MsgBox("All rights of files belonging to entity were checked and refreshed successfully!", MsgBoxStyle.Information)
If righterrors = True Then
MsgBox("All rights of files belonging to entity were checked and refreshed, " & vbNewLine & "BUT some Userrights could not be set. Check the logfile!", MsgBoxStyle.Exclamation, "Attention")
Else
MsgBox("All rights of files belonging to entity were checked and refreshed successfully!", MsgBoxStyle.Information)
End If
Else
MsgBox("Some errors occured while checking and setting the rights...please check the log!" & vbNewLine & ">> " & ClassRights.COUNT_FILES.ToString & " files schould be worked." & _
">> " & ClassRights.WORKED_FILES.ToString & " were worked successfully.", MsgBoxStyle.Exclamation)

View File

@@ -29,6 +29,7 @@ Partial Class frmStart
Me.Button2 = New System.Windows.Forms.Button()
Me.XtraTabControl1 = New DevExpress.XtraTab.XtraTabControl()
Me.XtraTabPage1 = New DevExpress.XtraTab.XtraTabPage()
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
Me.chkLogerrorsonly = New System.Windows.Forms.CheckBox()
Me.XtraTabPage2 = New DevExpress.XtraTab.XtraTabPage()
Me.btnrefreshJobs = New System.Windows.Forms.Button()
@@ -47,16 +48,15 @@ Partial Class frmStart
Me.Label1 = New System.Windows.Forms.Label()
Me.VWPMO_RIGHTS_2B_WORKEDTableAdapter = New RecordOrganizer_RightManager.MyDatasetTableAdapters.VWPMO_RIGHTS_2B_WORKEDTableAdapter()
Me.TableAdapterManager = New RecordOrganizer_RightManager.MyDatasetTableAdapters.TableAdapterManager()
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
CType(Me.XtraTabControl1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.XtraTabControl1.SuspendLayout()
Me.XtraTabPage1.SuspendLayout()
Me.GroupBox1.SuspendLayout()
Me.XtraTabPage2.SuspendLayout()
CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.VWPMO_RIGHTS_2B_WORKEDBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.MyDataset, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.GridView1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.GroupBox1.SuspendLayout()
Me.SuspendLayout()
'
'Button1
@@ -96,7 +96,7 @@ Partial Class frmStart
Me.Button2.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Button2.Image = Global.RecordOrganizer_RightManager.My.Resources.Resources.folder_Closed_16xSM
Me.Button2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button2.Location = New System.Drawing.Point(703, 14)
Me.Button2.Location = New System.Drawing.Point(707, 14)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(111, 23)
Me.Button2.TabIndex = 1
@@ -122,9 +122,20 @@ Partial Class frmStart
Me.XtraTabPage1.Controls.Add(Me.btnWorkUserRightsSV_ADD)
Me.XtraTabPage1.Controls.Add(Me.btnWorkUserRights)
Me.XtraTabPage1.Name = "XtraTabPage1"
Me.XtraTabPage1.Size = New System.Drawing.Size(821, 304)
Me.XtraTabPage1.Size = New System.Drawing.Size(825, 307)
Me.XtraTabPage1.Text = "Jobs and Tools"
'
'GroupBox1
'
Me.GroupBox1.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.GroupBox1.Controls.Add(Me.chkLogerrorsonly)
Me.GroupBox1.Location = New System.Drawing.Point(618, 43)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(200, 67)
Me.GroupBox1.TabIndex = 6
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "Dienstkonfiguration:"
'
'chkLogerrorsonly
'
Me.chkLogerrorsonly.AutoSize = True
@@ -290,17 +301,6 @@ Partial Class frmStart
Me.TableAdapterManager.Connection = Nothing
Me.TableAdapterManager.UpdateOrder = RecordOrganizer_RightManager.MyDatasetTableAdapters.TableAdapterManager.UpdateOrderOption.InsertUpdateDelete
'
'GroupBox1
'
Me.GroupBox1.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.GroupBox1.Controls.Add(Me.chkLogerrorsonly)
Me.GroupBox1.Location = New System.Drawing.Point(614, 43)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(200, 67)
Me.GroupBox1.TabIndex = 6
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "Dienstkonfiguration:"
'
'frmStart
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@@ -315,14 +315,14 @@ Partial Class frmStart
CType(Me.XtraTabControl1, System.ComponentModel.ISupportInitialize).EndInit()
Me.XtraTabControl1.ResumeLayout(False)
Me.XtraTabPage1.ResumeLayout(False)
Me.GroupBox1.ResumeLayout(False)
Me.GroupBox1.PerformLayout()
Me.XtraTabPage2.ResumeLayout(False)
Me.XtraTabPage2.PerformLayout()
CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.VWPMO_RIGHTS_2B_WORKEDBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.MyDataset, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.GridView1, System.ComponentModel.ISupportInitialize).EndInit()
Me.GroupBox1.ResumeLayout(False)
Me.GroupBox1.PerformLayout()
Me.ResumeLayout(False)
End Sub

View File

@@ -8,7 +8,7 @@ Public Class frmStart
MsgBox("Error in Initializing Database. Please check log.", MsgBoxStyle.Critical)
Me.Close()
End If
chkLogerrorsonly.Checked = CBool(clsDatabase.Execute_Scalar("SELECT LOG_ERR_ONLY_RIGHTS_MANAGER FROM TBPMO_KONFIGURATION WHERE GUID = 1"))
chkLogerrorsonly.Checked = CBool(clsDatabase.Execute_Scalar("SELECT LOG_ERR_ONLY FROM TBPMO_SERVICE_RIGHT_CONFIG WHERE GUID = 1"))
Dim sql = String.Format("SELECT * FROM TBDD_USER WHERE (LOWER(USERNAME) = LOWER('{0}'))", Environment.UserName)
clsLogger.Add(">> Login at: " & Now.ToString, False)
clsLogger.Add(">> Username: " & Environment.UserName, False)
@@ -143,7 +143,7 @@ Public Class frmStart
If chkLogerrorsonly.Checked Then
_set = 1
End If
Dim upd = String.Format("UPDATE TBPMO_KONFIGURATION SET LOG_ERR_ONLY_RIGHTS_MANAGER = {0} where GUID = 1", _set)
Dim upd = String.Format("UPDATE TBPMO_SERVICE_RIGHT_CONFIG SET LOG_ERR_ONLY = {0} where GUID = 1", _set)
clsDatabase.Execute_non_Query(upd)
End Sub

View File

@@ -131,14 +131,14 @@ Public Class frmSupervisorEntity
MsgBox("Unexpected Errors in setting rights: " & vbNewLine & DD_Rights.ClassRights.MSG_RESULT, MsgBoxStyle.Exclamation)
_error = True
Else
If DD_Rights.ClassRights.Collect_MainUsers(row.Item("ENTITY_ID"), USER_ID, row.Item("RECORD_ID")) Then
If ClassRights.DT_USER_RIGHTS.Rows.Count > 0 Then
If DD_Rights.ClassRights.Collect_MainUsers(row.Item("ENTITY_ID"), USER_ID, row.Item("RECORD_ID"), True) Then
If ClassRights.DT_USER_RIGHT.Rows.Count > 0 Then
clsLogger.Add(">> User owns rights for File/Record - right will be set!", False)
If ClassRights.File_DeleteAndSetRight(row.Item("DocID"), row.Item("FULL_FILENAME"), False) Then
End If
End If
End If
End If
Else