MS ZSG
This commit is contained in:
@@ -281,11 +281,10 @@ Public Class frmConstructor_Main
|
||||
Dim DT_PROXY_ENTITY As DataTable
|
||||
Dim SQL
|
||||
Try
|
||||
progressLoadEntity.Visible = False
|
||||
labelLoadEntity.Visible = False
|
||||
BarEditItem2.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||
bsitmLoadEntity.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||
CURRENT_DT_DOC_ENTITY_SEARCH = Nothing
|
||||
tsslblRecord.Text = ""
|
||||
tsslblStatus.Text = ""
|
||||
bsitmState.Caption = ""
|
||||
_FormClosing = False
|
||||
CONSTRUCTORID = CURRENT_CONSTRUCTOR_ID
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
@@ -1120,6 +1119,17 @@ Public Class frmConstructor_Main
|
||||
End If
|
||||
|
||||
End If
|
||||
If RIGHT_RECORD_AND_FILE_READ_ONLY = True Or NODE_NAVIGATION = True Then
|
||||
bbtniCopyRecord.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||
bbtniNewVariant2.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||
bbtniParentLink.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||
bbtniWFTask.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||
Else
|
||||
bbtniCopyRecord.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
||||
bbtniNewVariant2.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
||||
bbtniParentLink.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
||||
bbtniWFTask.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
||||
End If
|
||||
If NODE_NAVIGATION = False Then
|
||||
Get_RecordCounts_Nodes()
|
||||
Else
|
||||
@@ -1379,12 +1389,12 @@ Public Class frmConstructor_Main
|
||||
async.bw.RunWorkerAsync()
|
||||
While async.bw.IsBusy
|
||||
Application.DoEvents()
|
||||
progressLoadEntity.Visible = True
|
||||
labelLoadEntity.Visible = True
|
||||
labelLoadEntity.Text = "Loading TreeView..."
|
||||
BarEditItem2.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
||||
bsitmLoadEntity.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
||||
bsitmLoadEntity.Caption = "Loading TreeView..."
|
||||
End While
|
||||
progressLoadEntity.Visible = False
|
||||
labelLoadEntity.Visible = False
|
||||
BarEditItem2.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||
bsitmLoadEntity.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||
MyTreeview = async.newTreeview
|
||||
Catch ex As Exception
|
||||
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error in Async NodeBuild", ex.Message & vbNewLine & "ADDI will try an alternative method!", ex.StackTrace)
|
||||
@@ -1540,7 +1550,7 @@ Public Class frmConstructor_Main
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub BW_LoadTreeView_RunWorkerCompleted(sender As Object, e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles BW_LoadTreeView.RunWorkerCompleted
|
||||
progressLoadEntity.Visible = False
|
||||
BarEditItem2.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||
If NODE_NAVIGATION = False Then
|
||||
TreeViewMain.ExpandAll()
|
||||
End If
|
||||
@@ -1787,16 +1797,21 @@ Public Class frmConstructor_Main
|
||||
#Region "Status Bar"
|
||||
|
||||
Public Sub Update_Status_Label(visible As Boolean, Optional text As String = "", Optional state As EditState = EditState.None)
|
||||
tsslblStatus.Text = text
|
||||
tsslblStatus.Visible = visible
|
||||
bsitmState.Caption = text
|
||||
If visible = True Then
|
||||
bsitmState.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
||||
Else
|
||||
bsitmState.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||
End If
|
||||
|
||||
|
||||
Select Case state
|
||||
Case EditState.Insert
|
||||
tsslblStatus.BackColor = Color.Yellow
|
||||
bsitmState.ItemAppearance.Normal.BackColor = Color.Yellow
|
||||
Case EditState.Update
|
||||
tsslblStatus.BackColor = Color.LightBlue
|
||||
bsitmState.ItemAppearance.Normal.BackColor = Color.LightBlue
|
||||
Case Else
|
||||
tsslblStatus.BackColor = Color.LightGray
|
||||
bsitmState.ItemAppearance.Normal.BackColor = Color.LightGray
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -1816,23 +1831,23 @@ Public Class frmConstructor_Main
|
||||
If resultDT.Rows.Count = 0 Then
|
||||
Exit Sub
|
||||
End If
|
||||
tsslblRecord.Visible = False
|
||||
bsitmRecord.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||
Dim CreateChangeString = String.Format("Added by '{0}', when: {1}", resultDT.Rows(0).Item(0), resultDT.Rows(0).Item(1))
|
||||
If CtrlCommandUI.IsInsert = False Then
|
||||
CreateChangeString = CreateChangeString + String.Format(" - Changed by '{0}', when: {1}", resultDT.Rows(0).Item(2), resultDT.Rows(0).Item(3))
|
||||
End If
|
||||
|
||||
If FORM_TYPE = 5 Then
|
||||
tsslblRecord.Text = String.Format("Group-Record ({0}) - {1}", RecordId, CreateChangeString.ToString)
|
||||
bsitmRecord.Caption = String.Format("Group-Record ({0}) - {1}", RecordId, CreateChangeString.ToString)
|
||||
Else
|
||||
If IS_SINGLE_RECORD = True Then
|
||||
tsslblRecord.Text = String.Format("Single-Record ({0}) - {1}", RecordId, CreateChangeString.ToString)
|
||||
bsitmRecord.Caption = String.Format("Single-Record ({0}) - {1}", RecordId, CreateChangeString.ToString)
|
||||
Else
|
||||
tsslblRecord.Text = String.Format("Record ({0}) - {1}", RecordId, CreateChangeString.ToString)
|
||||
bsitmRecord.Caption = String.Format("Record ({0}) - {1}", RecordId, CreateChangeString.ToString)
|
||||
End If
|
||||
|
||||
End If
|
||||
tsslblRecord.Visible = True
|
||||
bsitmRecord.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", ex.Message, ex.StackTrace)
|
||||
@@ -2482,10 +2497,10 @@ Public Class frmConstructor_Main
|
||||
SQL_DOC_READ_ONLY = resultDT_VWPMO_CONSTRUCTOR_FORMS.Item("SQL_RIGHT_WINDREAM_VIEW")
|
||||
DOC_SEARCH_TAB1 = resultDT_VWPMO_CONSTRUCTOR_FORMS.Item("DOC_SEARCH_TAB1")
|
||||
If DOC_SEARCH_TAB1 = True Then
|
||||
tslblDocIDMain.Visible = False
|
||||
bsitmDocID.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||
tslblDocIDTab1.Visible = True
|
||||
Else
|
||||
tslblDocIDMain.Visible = True
|
||||
bsitmDocID.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
||||
tslblDocIDTab1.Visible = False
|
||||
End If
|
||||
|
||||
@@ -2498,9 +2513,9 @@ Public Class frmConstructor_Main
|
||||
GEODATA = False
|
||||
End If
|
||||
If GEODATA = True Then
|
||||
tsbtnGeodata.Visible = True
|
||||
bbtniGeodaten.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
||||
Else
|
||||
tsbtnGeodata.Visible = False
|
||||
bbtniGeodaten.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||
End If
|
||||
ACTIVATE_DOC_SEARCH_ON_EDIT = resultDT_VWPMO_CONSTRUCTOR_FORMS.Item("ACTIVATE_DOC_SEARCH_ON_EDIT")
|
||||
Try
|
||||
@@ -2638,7 +2653,7 @@ Public Class frmConstructor_Main
|
||||
SELECTED_RECORD_ID = 0
|
||||
PARENT_RECORDID = 0
|
||||
'NavPane.Categories.Clear()
|
||||
tsslblRecord.Text = ""
|
||||
bsitmRecord.Caption = ""
|
||||
Update_Status_Label(True, "Entity 1 skipped - All Records loaded", EditState.Update)
|
||||
PARENT_SKIPPED = True
|
||||
End If
|
||||
@@ -2684,7 +2699,7 @@ Public Class frmConstructor_Main
|
||||
PARENT_RECORDID = 0
|
||||
'NavPane.Categories.Clear()
|
||||
Update_Status_Label(True, "Entity 2 skipped - All Records loaded", EditState.Update)
|
||||
tsslblRecord.Text = ""
|
||||
bsitmRecord.Caption = ""
|
||||
PARENT_SKIPPED = True
|
||||
End If
|
||||
'Select Case FORM_TYPE
|
||||
@@ -2750,9 +2765,9 @@ Public Class frmConstructor_Main
|
||||
TabDetails.PageVisible = True
|
||||
GridControlMain.Visible = True
|
||||
|
||||
progressLoadEntity.Visible = True
|
||||
labelLoadEntity.Visible = True
|
||||
labelLoadEntity.Text = "Loading record-data..."
|
||||
BarEditItem2.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
||||
bsitmLoadEntity.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
||||
bsitmLoadEntity.Caption = "Loading record-data..."
|
||||
If LOCK_CONTROLS_BG_LOAD = True Then
|
||||
SplitContainerMain.Panel2.Enabled = False
|
||||
End If
|
||||
@@ -2772,8 +2787,8 @@ Public Class frmConstructor_Main
|
||||
SplitContainerMain.Panel2.Enabled = True
|
||||
End If
|
||||
|
||||
progressLoadEntity.Visible = False
|
||||
labelLoadEntity.Visible = False
|
||||
BarEditItem2.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||
bsitmLoadEntity.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||
|
||||
If IsNothing(CURRENT_DT_ENTITY_RECORDS) Then
|
||||
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in getting Entity-Data - Check logfile")
|
||||
@@ -2838,7 +2853,7 @@ Public Class frmConstructor_Main
|
||||
|
||||
TabPos.PageVisible = False
|
||||
End If
|
||||
Load_Templates()
|
||||
'Load_Templates()
|
||||
|
||||
' Hinfällig, da hier die Record-ID nicht gebraucht wird
|
||||
CtrlBuilder.WatchRecordChanges = False
|
||||
@@ -3259,7 +3274,7 @@ Public Class frmConstructor_Main
|
||||
If USER_LANGUAGE <> "de-DE" Then
|
||||
msg = "number of records: "
|
||||
End If
|
||||
tslbldisplayRecords.Text = msg & Get_Grid_Row_Count()
|
||||
bStaticItem1.Caption = msg & Get_Grid_Row_Count()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error in LoadGrid_Records", ex.Message, ex.StackTrace)
|
||||
@@ -3660,7 +3675,6 @@ Public Class frmConstructor_Main
|
||||
Private Sub Check_windream_Show(FORM_VIEW_ID As Integer)
|
||||
Try
|
||||
|
||||
'Dim sql = "SELECT * FROM TBPMO_FORM_VIEW WHERE WINDREAM_SEARCH <> '' AND GUID = " & FORM_VIEW_ID
|
||||
'Dim DTWD As DataTable = ClassDatabase.Return_Datatable(sql)
|
||||
Dim wdsearch = DT_TBPMO_FORM_VIEW.Rows(0).Item("DOCUMENT_VIEW")
|
||||
If CBool(wdsearch) = False Then
|
||||
@@ -3804,8 +3818,8 @@ Public Class frmConstructor_Main
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
Dim sw As New SW("RUN_WDSEARCH_GRID")
|
||||
Try
|
||||
progressLoadEntity.Visible = True
|
||||
labelLoadEntity.Text = "Documents loading..."
|
||||
BarEditItem2.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
||||
bsitmLoadEntity.Caption = "Documents loading..."
|
||||
If CURRENT_SEARCH_TYPE = "NODE_DOWN" Then
|
||||
Dim node As TreeNode = TreeViewMain.SelectedNode
|
||||
Dim NODE_GUID = ClassNodeNavigation.Return_NODEID_forTag(node.Tag)
|
||||
@@ -3971,8 +3985,8 @@ Public Class frmConstructor_Main
|
||||
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in Run WD-Search Database: ", ex.Message)
|
||||
End Try
|
||||
sw.Done()
|
||||
progressLoadEntity.Visible = False
|
||||
labelLoadEntity.Visible = False
|
||||
BarEditItem2.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||
bsitmLoadEntity.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||
Cursor = Cursors.Default
|
||||
End Sub
|
||||
Private Sub OnCBSelectedValueChanged(sender As Object, e As EventArgs)
|
||||
@@ -4757,7 +4771,8 @@ Public Class frmConstructor_Main
|
||||
DT_FU_ENTITY = ClassDatabase.Return_Datatable(sql)
|
||||
If DT_FU_ENTITY.Rows.Count > 0 Then
|
||||
'Die Userauswahl füllen
|
||||
Dim DTUser As DataTable = ClassDatabase.Return_Datatable("select guid, username from TBDD_USER t where T.EMAIL IS NOT NULL AND MODULE_RECORD_ORG = 1 order by USERNAME")
|
||||
Dim DTUser As DataTable = ClassDatabase.Return_Datatable("select T.guid, T.username from TBDD_USER t INNER JOIN TBDD_USER_MODULES T1 ON T.GUID = T1.USER_ID INNER JOIN TBDD_MODULES T2 ON T1.MODULE_ID = T2.GUID
|
||||
WHERE T2.SHORT_NAME = 'ADDI' AND T.EMAIL IS NOT NULL order by USERNAME")
|
||||
cmbFollowUpUser.DataSource = DTUser
|
||||
cmbFollowUpUser.DisplayMember = DTUser.Columns(1).ColumnName
|
||||
cmbFollowUpUser.ValueMember = DTUser.Columns(0).ColumnName
|
||||
@@ -4820,12 +4835,13 @@ Public Class frmConstructor_Main
|
||||
Dim Entity_rows = query.ToList()
|
||||
If Entity_rows.Count > 0 Then
|
||||
If _MANUAL_WORKFLOW = True Then
|
||||
CreateWorkflowtaskstsmi.Enabled = True
|
||||
bbtniWFTask.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
||||
End If
|
||||
tsslblWorkflowstate.Visible = True
|
||||
bsitmWFState.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
||||
|
||||
Else
|
||||
CreateWorkflowtaskstsmi.Enabled = False
|
||||
tsslblWorkflowstate.Visible = False
|
||||
bbtniWFTask.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||
bsitmWFState.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||
End If
|
||||
tsButtonShowTaskOverview.Visible = False
|
||||
For Each _row In Entity_rows
|
||||
@@ -4835,7 +4851,7 @@ Public Class frmConstructor_Main
|
||||
Dim text = "Task: " & _row.Item("WF_TITLE")
|
||||
text += " - " & _row.Item("STATE_TITLE")
|
||||
text += " - " & _row.Item("DUE_DATE")
|
||||
tsslblWorkflowstate.Text = text
|
||||
bsitmWFState.Caption = text
|
||||
'Direkten Zugriff auf RecordView Workflow erlauben
|
||||
|
||||
Dim Colorstring = _row.Item("COLOR")
|
||||
@@ -4845,13 +4861,13 @@ Public Class frmConstructor_Main
|
||||
If Colorstring <> "" Then
|
||||
'grvwSelection.Appearance.FocusedRow.BackColor = ColorTranslator.FromWin32(CInt(Colorstring))
|
||||
'grvwSelection.Appearance.FocusedRow.ForeColor = Color.Yellow
|
||||
tsslblWorkflowstate.BackColor = ColorTranslator.FromWin32(CInt(Colorstring))
|
||||
Select Case tsslblWorkflowstate.BackColor
|
||||
bsitmWFState.ItemAppearance.Normal.BackColor = ColorTranslator.FromWin32(CInt(Colorstring))
|
||||
Select Case bsitmWFState.ItemAppearance.Normal.BackColor
|
||||
Case Color.Red
|
||||
tsslblWorkflowstate.ForeColor = Color.White
|
||||
bsitmWFState.ItemAppearance.Normal.ForeColor = Color.White
|
||||
End Select
|
||||
Else
|
||||
tsslblWorkflowstate.BackColor = Color.Transparent
|
||||
bsitmWFState.ItemAppearance.Normal.BackColor = Color.Transparent
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
@@ -5018,28 +5034,28 @@ Public Class frmConstructor_Main
|
||||
End Sub
|
||||
|
||||
|
||||
Sub Load_Templates()
|
||||
Try
|
||||
Dim sql As String = "SELECT * FROM VWPMO_TEMPLATE_ENTITY WHERE ENTITY_ID = " & ENTITY_ID & " ORDER BY TEMPLATE_NAME"
|
||||
Dim DT As DataTable = ClassDatabase.Return_Datatable(sql)
|
||||
If Not IsNothing(DT) Then
|
||||
If DT.Rows.Count > 0 Then
|
||||
OfficeVorlagentsmi.Enabled = True
|
||||
OfficeVorlagentsmi.DropDownItems.Clear()
|
||||
For Each row As DataRow In DT.Rows
|
||||
Dim item As ToolStripMenuItem = OfficeVorlagentsmi
|
||||
Dim newItem As ToolStripMenuItem = New ToolStripMenuItem(row.Item("TEMPLATE_NAME").ToString, Nothing, AddressOf TemplateItem_Click)
|
||||
newItem.Tag = row.Item("TEMPLATE_ID")
|
||||
item.DropDownItems.Add(newItem) ' subitem.DropDownItems.Add(newItem)
|
||||
Next
|
||||
Else
|
||||
OfficeVorlagentsmi.Enabled = False
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in Load_Templates: ", ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
'Sub Load_Templates()
|
||||
' Try
|
||||
' Dim sql As String = "SELECT * FROM VWPMO_TEMPLATE_ENTITY WHERE ENTITY_ID = " & ENTITY_ID & " ORDER BY TEMPLATE_NAME"
|
||||
' Dim DT As DataTable = ClassDatabase.Return_Datatable(sql)
|
||||
' If Not IsNothing(DT) Then
|
||||
' If DT.Rows.Count > 0 Then
|
||||
' OfficeVorlagentsmi.Enabled = True
|
||||
' OfficeVorlagentsmi.DropDownItems.Clear()
|
||||
' For Each row As DataRow In DT.Rows
|
||||
' Dim item As ToolStripMenuItem = OfficeVorlagentsmi
|
||||
' Dim newItem As ToolStripMenuItem = New ToolStripMenuItem(row.Item("TEMPLATE_NAME").ToString, Nothing, AddressOf TemplateItem_Click)
|
||||
' newItem.Tag = row.Item("TEMPLATE_ID")
|
||||
' item.DropDownItems.Add(newItem) ' subitem.DropDownItems.Add(newItem)
|
||||
' Next
|
||||
' Else
|
||||
' OfficeVorlagentsmi.Enabled = False
|
||||
' End If
|
||||
' End If
|
||||
' Catch ex As Exception
|
||||
' ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in Load_Templates: ", ex.Message)
|
||||
' End Try
|
||||
'End Sub
|
||||
|
||||
Private Sub TemplateItem_Click(sender As Object, e As EventArgs)
|
||||
Dim item As ToolStripMenuItem = DirectCast(sender, ToolStripMenuItem)
|
||||
@@ -5328,7 +5344,7 @@ Public Class frmConstructor_Main
|
||||
End Sub
|
||||
Private Sub grvwGrid_ColumnFilterChanged(sender As Object, e As EventArgs) Handles grvwGrid.ColumnFilterChanged
|
||||
SET_ROWCOUNT_STRING()
|
||||
|
||||
Save_Grid_Layout()
|
||||
End Sub
|
||||
|
||||
Sub SET_ROWCOUNT_STRING()
|
||||
@@ -5347,7 +5363,7 @@ Public Class frmConstructor_Main
|
||||
If USER_LANGUAGE <> "de-DE" Then
|
||||
msg = "number of records: "
|
||||
End If
|
||||
tslbldisplayRecords.Text = msg & grvwGrid.RowCount
|
||||
bStaticItem1.Caption = msg & grvwGrid.RowCount
|
||||
sw.Done()
|
||||
End Sub
|
||||
Public Sub New()
|
||||
@@ -5417,10 +5433,10 @@ Public Class frmConstructor_Main
|
||||
Sub Refresh_DocID()
|
||||
If ClassWindreamDocGrid.SELECTED_DOC_ID <> 0 Then
|
||||
Dim msg = "Doc-ID: " & ClassWindreamDocGrid.SELECTED_DOC_ID.ToString
|
||||
tslblDocIDMain.Text = msg
|
||||
bsitmDocID.Caption = msg
|
||||
tslblDocIDTab1.Text = msg
|
||||
Else
|
||||
tslblDocIDMain.Text = "DocRow not selected"
|
||||
bsitmDocID.Caption = "DocRow not selected"
|
||||
tslblDocIDTab1.Text = "DocRow not selected"
|
||||
End If
|
||||
End Sub
|
||||
@@ -5929,14 +5945,23 @@ Public Class frmConstructor_Main
|
||||
ROW_READ_ONLY = False
|
||||
Select Case Result.ToString
|
||||
Case "R"
|
||||
ContextMenu_Read()
|
||||
If USER_IS_ADMIN = False Then
|
||||
ContextMenu_Read()
|
||||
Else
|
||||
ClassLogger.Add(">> FileRight is R but User is Admin!! - Check the configuration!", False)
|
||||
End If
|
||||
|
||||
ROW_READ_ONLY = True
|
||||
Case "RW"
|
||||
ContextMenu_Write()
|
||||
Case "RWA"
|
||||
ContextMenu_Write()
|
||||
Case ""
|
||||
ContextMenu_Read()
|
||||
If USER_IS_ADMIN = False Then
|
||||
ContextMenu_Read()
|
||||
Else
|
||||
ClassLogger.Add(">> FileRight is '' but User is Admin!! - Check the configuration!", False)
|
||||
End If
|
||||
ROW_READ_ONLY = True
|
||||
End Select
|
||||
Else
|
||||
@@ -5945,7 +5970,11 @@ Public Class frmConstructor_Main
|
||||
End If
|
||||
If ROW_READ_ONLY = False Then
|
||||
If RIGHT_READ_ONLY_DOC = True Then
|
||||
ContextMenu_Read()
|
||||
If USER_IS_ADMIN = False Then
|
||||
ContextMenu_Read()
|
||||
Else
|
||||
ClassLogger.Add(">> RIGHT_READ_ONLY_DOC = True but User is Admin!! - Check the configuration!", False)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
If ClassWindreamDocGrid.DT_RESULTFILES.Rows.Count = 1 Then
|
||||
@@ -6352,141 +6381,13 @@ Public Class frmConstructor_Main
|
||||
MsgBox("Could not read the rights for selected file! Check the log for further infomation!", MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CreateWorkflowtaskstsbtn_Click(sender As Object, e As EventArgs) Handles CreateWorkflowtaskstsmi.Click
|
||||
Dim result As MsgBoxResult
|
||||
Dim stg, caption As String
|
||||
If USER_LANGUAGE = "de-DE" Then
|
||||
stg = "Wollen Sie die Workflowtasks für diesen Datensatz erzeugen? Alte Workflows werden gelöscht!"
|
||||
caption = "Bestätigung erforderlich:"
|
||||
Else
|
||||
stg = "Do You really want to create workflowtasks for this record? Existing workflows will be deleted!"
|
||||
caption = "Confirmation needed:"
|
||||
End If
|
||||
result = MessageBox.Show(stg, caption, MessageBoxButtons.YesNo, MessageBoxIcon.Question)
|
||||
If result = MsgBoxResult.Yes Then
|
||||
Try
|
||||
CURRENT_ENTITY_ID = ENTITY_ID
|
||||
Dim sql = "EXEC PRPMO_CREATE_WF_TASKS " & CURRENT_ENTITY_ID & ", " & RECORD_ID
|
||||
If ClassDatabase.Execute_non_Query(sql) = True Then
|
||||
ClassWorkflow.Refresh_Workflows_Entity()
|
||||
Show_act_WFTask()
|
||||
If USER_LANGUAGE = "de-DE" Then
|
||||
stg = "Workflows erzeugt! Wollen Sie die Workflowübersicht nun anzeigen?"
|
||||
caption = "Erfolgreich:"
|
||||
Else
|
||||
stg = "Workflows created! Would You like to show the Workflow-Overview?"
|
||||
caption = "Success:"
|
||||
End If
|
||||
result = MessageBox.Show(stg, caption, MessageBoxButtons.YesNo, MessageBoxIcon.Question)
|
||||
If result = MsgBoxResult.Yes Then
|
||||
ClassJumpRecord.JumpToRecord(2, RECORD_ID)
|
||||
ClassWorkflow.Refresh_Workflows_Entity()
|
||||
JUMP_RECORD_ID = 0
|
||||
End If
|
||||
Else
|
||||
If USER_LANGUAGE = "de-DE" Then
|
||||
stg = "Die Workflows konnten nicht erzeugt werden. Bitte prüfen Sie die Log-Datei!"
|
||||
Else
|
||||
stg = "Error in Creating Workflow-Tasks. Please check the logfile!"
|
||||
End If
|
||||
MsgBox(stg, MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error inCreate Workflowtasks Record: ", ex.Message)
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ChangeParentLinktsbtn_Click(sender As Object, e As EventArgs) Handles ChangeParentLinktsmi.Click
|
||||
Show_Verknuepfungen()
|
||||
End Sub
|
||||
|
||||
Private Sub CopyRecordtsbtn_Click(sender As Object, e As EventArgs) Handles CopyRecordtsmi.Click
|
||||
Dim msg As String
|
||||
If RIGHT_RECORD_AND_FILE_READ_ONLY = False Then
|
||||
Dim result As MsgBoxResult
|
||||
msg = "Möchten Sie den Datensatz wirklich kopieren?"
|
||||
If USER_LANGUAGE <> "de-DE" Then
|
||||
msg = "Would You like to copy the record?"
|
||||
End If
|
||||
result = MessageBox.Show(msg, "Copy Record:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
|
||||
If result = MsgBoxResult.Yes Then
|
||||
Dim SQL = String.Format("EXEC PRPMO_COPY_RECORD {0}, '{1}'", RECORD_ID, USER_USERNAME)
|
||||
If ClassDatabase.Execute_non_Query_withConn(SQL, 1) = True Then
|
||||
Load_Entity_Data_CONTROLS_RECORDS()
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
msg = "Sie dürfen diesen Datensatz nicht löschen! (Rechtekonzept)!"
|
||||
If USER_LANGUAGE <> "de-DE" Then
|
||||
msg = "Due to right-privileges You are not allowed to delete this record!"
|
||||
End If
|
||||
MessageBox.Show(msg, "Warning:", MessageBoxButtons.OK, MessageBoxIcon.Information)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub showRecordLogtsbtn_Click(sender As Object, e As EventArgs) Handles showRecordLogtsmi.Click
|
||||
CURRENT_RECORD_ID = RECORD_ID
|
||||
frmRecord_Changes.ShowDialog()
|
||||
End Sub
|
||||
Private Sub AnwendungscacheResettsbtn_Click(sender As Object, e As EventArgs) Handles AnwendungscacheResettsmi.Click
|
||||
Dim result As MsgBoxResult
|
||||
Dim msg = "Möchten Sie den Anwendungscache wirklich leeren?" & vbNewLine & "Die Entität wird dann automatisch neugeladen!"
|
||||
If USER_LANGUAGE <> "de-DE" Then
|
||||
msg = "Would You like to clear the applications-cache?" & vbNewLine & "All data will be loaded new!"
|
||||
End If
|
||||
result = MessageBox.Show(msg, "Clear cache:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
|
||||
If result = MsgBoxResult.Yes Then
|
||||
Try
|
||||
Cursor = Cursors.WaitCursor
|
||||
CURRENT_ENTITY_ID = ENTITY_ID
|
||||
ClassControlValueCache.ClearCache()
|
||||
DisableEditMode()
|
||||
Load_Entity_Data_CONTROLS_RECORDS()
|
||||
RECORD_CHANGED = False
|
||||
Catch ex As Exception
|
||||
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in Clear Cache: ", ex.Message)
|
||||
Finally
|
||||
Cursor = Cursors.Default
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OfficeVorlagenToolStripMenuItem_Click(sender As Object, e As EventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub NewVarianttsmi_Click(sender As Object, e As EventArgs) Handles NewVarianttsmi.Click
|
||||
Dim msg As String
|
||||
If RIGHT_RECORD_AND_FILE_READ_ONLY = False Then
|
||||
CURRENT_ENTITY_ID = ENTITY_ID
|
||||
CURRENT_RECORD_ID = RECORD_ID
|
||||
Dim recid = CURRENT_RECORD_ID
|
||||
frmNewVariant.ShowDialog()
|
||||
If recid <> CURRENT_RECORD_ID Then
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
ClassProxy.PRPROXY_SYNC_DETAIL_OBJECT("TBPMO_RECORD_VARIANT")
|
||||
ClassProxy.PRPROXY_SYNC_DETAIL_OBJECT("TBPMO_RECORD")
|
||||
Me.Cursor = Cursors.Default
|
||||
Load_Datafor_Entity(True)
|
||||
LocateRecordinGridById(CURRENT_RECORD_ID)
|
||||
End If
|
||||
Else
|
||||
msg = "Sie dürfen diesen Datensatz nicht löschen! (Rechtekonzept)!"
|
||||
If USER_LANGUAGE <> "de-DE" Then
|
||||
msg = "Due to right-privileges You are not allowed to delete this record!"
|
||||
End If
|
||||
MessageBox.Show(msg, "Warning:", MessageBoxButtons.OK, MessageBoxIcon.Information)
|
||||
End If
|
||||
Private Sub NewVarianttsmi_Click(sender As Object, e As EventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub tsbtnRefresh_Entity_Click(sender As Object, e As EventArgs) Handles tsbtnRefresh_Entity.Click
|
||||
Refresh_Entity_Data(True)
|
||||
End Sub
|
||||
|
||||
Private Sub RecordDeleteToolStripMenuItem_Click(sender As Object, e As EventArgs)
|
||||
Delete_Record()
|
||||
End Sub
|
||||
@@ -6532,11 +6433,7 @@ Public Class frmConstructor_Main
|
||||
End Try
|
||||
JUMP_RECORD_ID = 0
|
||||
End Sub
|
||||
Private Sub ToolStripButton2_Click(sender As Object, e As EventArgs) Handles tsbtnGeodata.Click
|
||||
'ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in Show_Detail_Record: ", "dsdfsdfdsfdsf")
|
||||
Dim frm As New frmGeodataNavigation(GridControlMain, CURRENT_ENTITY_ID)
|
||||
frm.Show()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub GridControl1_DoubleClick(sender As Object, e As EventArgs) Handles GridControl1.DoubleClick
|
||||
Load_Variant_Record()
|
||||
@@ -6872,7 +6769,11 @@ Public Class frmConstructor_Main
|
||||
If Not IsNothing(Result) Then
|
||||
Select Case Result.ToString
|
||||
Case "R"
|
||||
ContextMenu_Read()
|
||||
If USER_IS_ADMIN = False Then
|
||||
ContextMenu_Read()
|
||||
Else
|
||||
ClassLogger.Add(">> OpenFile.FileRight is R but User is Admin!! - Check the configuration!", False)
|
||||
End If
|
||||
allow_Open = True
|
||||
Case "RW"
|
||||
allow_Open = True
|
||||
@@ -6999,7 +6900,11 @@ Public Class frmConstructor_Main
|
||||
If Not IsNothing(Result) Then
|
||||
Select Case Result.ToString
|
||||
Case "R"
|
||||
ContextMenu_Read()
|
||||
If USER_IS_ADMIN = False Then
|
||||
ContextMenu_Read()
|
||||
Else
|
||||
ClassLogger.Add(">>cmsRFB_O.FileRight is R but User is Admin!! - Check the configuration!", False)
|
||||
End If
|
||||
Case Else
|
||||
ContextMenu_Write()
|
||||
End Select
|
||||
@@ -7023,27 +6928,27 @@ Public Class frmConstructor_Main
|
||||
ClassHelper.Open_Folder(row.Item("DOC_PATH"), row.Item("DOC_ID"))
|
||||
Next
|
||||
End Sub
|
||||
Private Sub ToolStripDropDownButton3_DropDownOpening(sender As Object, e As EventArgs) Handles ToolStripDropDownButton3.DropDownOpening
|
||||
Private Sub ToolStripDropDownButton3_DropDownOpening(sender As Object, e As EventArgs)
|
||||
Try
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
Dim Record_Changes As String = "SELECT count(GUID) FROM VWPMO_RECORD_CHANGES WHERE RECORD_ID = " & RECORD_ID
|
||||
Dim RC = ClassDatabase.Execute_Scalar(Record_Changes, True)
|
||||
showRecordLogtsmi.Enabled = False
|
||||
bbtniReclog.Enabled = False
|
||||
If Not RC Is Nothing Then
|
||||
If RC > 0 Then
|
||||
showRecordLogtsmi.Enabled = True
|
||||
bbtniReclog.Enabled = True
|
||||
End If
|
||||
End If
|
||||
If RIGHT_RECORD_AND_FILE_READ_ONLY = True Then
|
||||
CopyRecordtsmi.Enabled = False
|
||||
NewVarianttsmi.Enabled = False
|
||||
ChangeParentLinktsmi.Enabled = False
|
||||
CreateWorkflowtaskstsmi.Enabled = False
|
||||
If RIGHT_RECORD_AND_FILE_READ_ONLY = True Or NODE_NAVIGATION = True Then
|
||||
bbtniCopyRecord.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||
bbtniNewVariant2.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||
bbtniParentLink.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||
bbtniWFTask.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||
Else
|
||||
CopyRecordtsmi.Enabled = True
|
||||
NewVarianttsmi.Enabled = True
|
||||
ChangeParentLinktsmi.Enabled = True
|
||||
CreateWorkflowtaskstsmi.Enabled = True
|
||||
bbtniCopyRecord.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
||||
bbtniNewVariant2.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
||||
bbtniParentLink.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
||||
bbtniWFTask.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Finally
|
||||
@@ -7319,4 +7224,152 @@ Public Class frmConstructor_Main
|
||||
Private Sub tsmiNodeNew_Click(sender As Object, e As EventArgs) Handles tsmiNodeNew.Click
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonItem1_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtniRefresh.ItemClick
|
||||
Refresh_Entity_Data(True)
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonItem2_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtniGeodaten.ItemClick
|
||||
'ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in Show_Detail_Record: ", "dsdfsdfdsfdsf")
|
||||
Dim frm As New frmGeodataNavigation(GridControlMain, CURRENT_ENTITY_ID)
|
||||
frm.Show()
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonItem1_ItemClick_1(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtniCopyRecord.ItemClick
|
||||
Dim msg As String
|
||||
If RIGHT_RECORD_AND_FILE_READ_ONLY = False Then
|
||||
Dim result As MsgBoxResult
|
||||
msg = "Möchten Sie den Datensatz wirklich kopieren?"
|
||||
If USER_LANGUAGE <> "de-DE" Then
|
||||
msg = "Would You like to copy the record?"
|
||||
End If
|
||||
result = MessageBox.Show(msg, "Copy Record:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
|
||||
If result = MsgBoxResult.Yes Then
|
||||
Dim SQL = String.Format("EXEC PRPMO_COPY_RECORD {0}, '{1}'", RECORD_ID, USER_USERNAME)
|
||||
If ClassDatabase.Execute_non_Query_withConn(SQL, 1) = True Then
|
||||
Load_Entity_Data_CONTROLS_RECORDS()
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
msg = "Sie dürfen diesen Datensatz nicht löschen! (Rechtekonzept)!"
|
||||
If USER_LANGUAGE <> "de-DE" Then
|
||||
msg = "Due to right-privileges You are not allowed to delete this record!"
|
||||
End If
|
||||
MessageBox.Show(msg, "Warning:", MessageBoxButtons.OK, MessageBoxIcon.Information)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub bbtniNewVariant_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub bbtniWFTask_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtniWFTask.ItemClick
|
||||
Dim result As MsgBoxResult
|
||||
Dim stg, caption As String
|
||||
If USER_LANGUAGE = "de-DE" Then
|
||||
stg = "Wollen Sie die Workflowtasks für diesen Datensatz erzeugen? Alte Workflows werden gelöscht!"
|
||||
caption = "Bestätigung erforderlich:"
|
||||
Else
|
||||
stg = "Do You really want to create workflowtasks for this record? Existing workflows will be deleted!"
|
||||
caption = "Confirmation needed:"
|
||||
End If
|
||||
result = MessageBox.Show(stg, caption, MessageBoxButtons.YesNo, MessageBoxIcon.Question)
|
||||
If result = MsgBoxResult.Yes Then
|
||||
Try
|
||||
CURRENT_ENTITY_ID = ENTITY_ID
|
||||
Dim sql = "EXEC PRPMO_CREATE_WF_TASKS " & CURRENT_ENTITY_ID & ", " & RECORD_ID
|
||||
If ClassDatabase.Execute_non_Query(sql) = True Then
|
||||
ClassWorkflow.Refresh_Workflows_Entity()
|
||||
Show_act_WFTask()
|
||||
If USER_LANGUAGE = "de-DE" Then
|
||||
stg = "Workflows erzeugt! Wollen Sie die Workflowübersicht nun anzeigen?"
|
||||
caption = "Erfolgreich:"
|
||||
Else
|
||||
stg = "Workflows created! Would You like to show the Workflow-Overview?"
|
||||
caption = "Success:"
|
||||
End If
|
||||
result = MessageBox.Show(stg, caption, MessageBoxButtons.YesNo, MessageBoxIcon.Question)
|
||||
If result = MsgBoxResult.Yes Then
|
||||
ClassJumpRecord.JumpToRecord(2, RECORD_ID)
|
||||
ClassWorkflow.Refresh_Workflows_Entity()
|
||||
JUMP_RECORD_ID = 0
|
||||
End If
|
||||
Else
|
||||
If USER_LANGUAGE = "de-DE" Then
|
||||
stg = "Die Workflows konnten nicht erzeugt werden. Bitte prüfen Sie die Log-Datei!"
|
||||
Else
|
||||
stg = "Error in Creating Workflow-Tasks. Please check the logfile!"
|
||||
End If
|
||||
MsgBox(stg, MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error inCreate Workflowtasks Record: ", ex.Message)
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub bbtniclearCache_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtniclearCache.ItemClick
|
||||
Dim result As MsgBoxResult
|
||||
Dim msg = "Möchten Sie den Anwendungscache wirklich leeren?" & vbNewLine & "Die Entität wird dann automatisch neugeladen!"
|
||||
If USER_LANGUAGE <> "de-DE" Then
|
||||
msg = "Would You like to clear the applications-cache?" & vbNewLine & "All data will be loaded new!"
|
||||
End If
|
||||
result = MessageBox.Show(msg, "Clear cache:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
|
||||
If result = MsgBoxResult.Yes Then
|
||||
Try
|
||||
Cursor = Cursors.WaitCursor
|
||||
CURRENT_ENTITY_ID = ENTITY_ID
|
||||
ClassControlValueCache.ClearCache()
|
||||
DisableEditMode()
|
||||
Load_Entity_Data_CONTROLS_RECORDS()
|
||||
RECORD_CHANGED = False
|
||||
Catch ex As Exception
|
||||
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in Clear Cache: ", ex.Message)
|
||||
Finally
|
||||
Cursor = Cursors.Default
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonItem2_ItemClick_1(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtniNewVariant2.ItemClick
|
||||
Dim msg As String
|
||||
If RIGHT_RECORD_AND_FILE_READ_ONLY = False Then
|
||||
CURRENT_ENTITY_ID = ENTITY_ID
|
||||
CURRENT_RECORD_ID = RECORD_ID
|
||||
Dim recid = CURRENT_RECORD_ID
|
||||
frmNewVariant.ShowDialog()
|
||||
If recid <> CURRENT_RECORD_ID Then
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
ClassProxy.PRPROXY_SYNC_DETAIL_OBJECT("TBPMO_RECORD_VARIANT")
|
||||
ClassProxy.PRPROXY_SYNC_DETAIL_OBJECT("TBPMO_RECORD")
|
||||
Me.Cursor = Cursors.Default
|
||||
Load_Datafor_Entity(True)
|
||||
LocateRecordinGridById(CURRENT_RECORD_ID)
|
||||
End If
|
||||
Else
|
||||
msg = "Sie dürfen diesen Datensatz nicht löschen! (Rechtekonzept)!"
|
||||
If USER_LANGUAGE <> "de-DE" Then
|
||||
msg = "Due to right-privileges You are not allowed to delete this record!"
|
||||
End If
|
||||
MessageBox.Show(msg, "Warning:", MessageBoxButtons.OK, MessageBoxIcon.Information)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub bbtniParentLink_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtniParentLink.ItemClick
|
||||
Show_Verknuepfungen()
|
||||
End Sub
|
||||
|
||||
Private Sub bbtniReclog_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtniReclog.ItemClick
|
||||
CURRENT_RECORD_ID = RECORD_ID
|
||||
frmRecord_Changes.ShowDialog()
|
||||
End Sub
|
||||
|
||||
Private Sub OfficeVorlagentsmi_Click(sender As Object, e As EventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub BarEditItem2_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarEditItem2.ItemClick
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user