MS_05042016
This commit is contained in:
@@ -161,7 +161,7 @@ Public Class frmConstructor_Main
|
||||
elapsed = sw.Elapsed.TotalSeconds
|
||||
sw.Stop()
|
||||
sw.Reset()
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> Form Load took " & Format(elapsed, "0.000000000") & " seconds", False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Form Load took " & Format(elapsed, "0.000000000") & " seconds", False)
|
||||
Catch ex As System.Exception
|
||||
MsgBox("Error while Loading Form" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
System.Windows.Forms.MessageBox.Show(ex.Message)
|
||||
@@ -488,7 +488,6 @@ Public Class frmConstructor_Main
|
||||
_ENTITYSQL = String.Format("SELECT SQL_QUICK_VIEW FROM VWPMO_CONSTRUCTOR_FORMS WHERE CONSTRUCT_ID = {0} AND FORM_ID = {1} AND SCREEN_ID = {2}", ConstructorId, FormId, CURRENT_SCREEN_ID)
|
||||
_ENTITYSQL = ClassDatabase.Execute_Scalar(_ENTITYSQL, True)
|
||||
If _ENTITYSQL = String.Empty Then
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> No Quick-View Configured", False)
|
||||
_ENTITYSQL = "SELECT T.* FROM VWTEMP_PMO_FORM" & FormId.ToString & " T"
|
||||
If IS_SINGLE_RECORD = True Or FORM_TYPE = 5 Then
|
||||
|
||||
@@ -606,7 +605,7 @@ Public Class frmConstructor_Main
|
||||
Column_Row_Handler()
|
||||
Me.Cursor = Cursors.Default
|
||||
'If dataloaded = True Then
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> grvwSelection_FocusedRowChanged - EditState: " & EDIT_STATE, False)
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(" >> grvwSelection_FocusedRowChanged - EditState: " & EDIT_STATE, False)
|
||||
' Dim selRecID = GetSelected_RecordID()
|
||||
' If Not selRecID Is Nothing And selRecID <> SelectedRecordID Or EDIT_STATE = "insert" Then
|
||||
' Focused_Row_Column_Changed()
|
||||
@@ -642,7 +641,7 @@ Public Class frmConstructor_Main
|
||||
If Grid_RecordID = RECORD_ID And ENTITY_RECORD_COUNT > 1 Then
|
||||
Exit Sub
|
||||
End If
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> RowHandler: RID: " & Grid_RecordID.ToString & " - " & Now, False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> RowHandler: RID: " & Grid_RecordID.ToString & " - " & Now, False)
|
||||
'Hier jetzt erst das Anzeigen für einen selektierten Datensatz
|
||||
If GRID_TYPE = GridType.Grid Then
|
||||
If IsTopFirstRow Then
|
||||
@@ -668,7 +667,7 @@ Public Class frmConstructor_Main
|
||||
DisableEditMode()
|
||||
VerknüpfungenAnzeigenToolStripMenuItem.Enabled = True
|
||||
Show_Selected_Record_Data(Grid_RecordID, False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> After Show_Selected_Record_Data - " & Now, False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> After Show_Selected_Record_Data - " & Now, False)
|
||||
If TabPos.PageVisible = True And TCDetails.SelectedTabPage.Text.StartsWith("Posi") Then
|
||||
Clear_GridPos_View()
|
||||
Dim POS_GRID_RECORD = Get_Focused_Row_Cell_Value_pos("Record-ID")
|
||||
@@ -815,7 +814,7 @@ Public Class frmConstructor_Main
|
||||
elapsed = sw.Elapsed.TotalSeconds
|
||||
sw.Stop()
|
||||
sw.Reset()
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> TreeView Load took " & Format(elapsed, "0.000000000") & " seconds", False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> TreeView Load took " & Format(elapsed, "0.000000000") & " seconds", False)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -847,12 +846,13 @@ Public Class frmConstructor_Main
|
||||
|
||||
Dim elapsed As Double
|
||||
elapsed = sw.Elapsed.TotalSeconds
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> Load_Tree_View_Data1 took " & Format(elapsed, "0.000000000") & " seconds", False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Load_Tree_View_Data1 took " & Format(elapsed, "0.000000000") & " seconds", False)
|
||||
Get_RecordCounts_Nodes()
|
||||
Load_Entity_Data(ACT_EBENE)
|
||||
sw.Stop()
|
||||
sw.Reset()
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> Load_Tree_View_Data2 took " & Format(elapsed, "0.000000000") & " seconds", False)
|
||||
elapsed = elapsed - sw.Elapsed.TotalSeconds
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Load_Tree_View_Data2 took " & Format(elapsed, "0.000000000") & " seconds", False)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -908,7 +908,7 @@ Public Class frmConstructor_Main
|
||||
elapsed = sw.Elapsed.TotalSeconds
|
||||
sw.Stop()
|
||||
sw.Reset()
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> Get_RecordCounts_Nodes took " & Format(elapsed, "0.000000000") & " seconds", False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Get_RecordCounts_Nodes took " & Format(elapsed, "0.000000000") & " seconds", False)
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in Get_RecordCounts_Nodes:" & vbNewLine & ex.Message, MsgBoxStyle.Exclamation)
|
||||
End Try
|
||||
@@ -995,7 +995,9 @@ Public Class frmConstructor_Main
|
||||
|
||||
#Region "Controls"
|
||||
Sub Load_Controls(frmview_id As Integer)
|
||||
|
||||
Dim sw As New Stopwatch
|
||||
sw.Start()
|
||||
Dim elapsed As Double
|
||||
FORMVIEW_ID = frmview_id
|
||||
ENTITY_ID = ClassDatabase.Execute_Scalar("SELECT FORM_ID FROM TBPMO_FORM_VIEW WHERE GUID = " & frmview_id)
|
||||
CtrlBuilder = New ClassControlBuilder(pnlDetails)
|
||||
@@ -1010,6 +1012,10 @@ Public Class frmConstructor_Main
|
||||
|
||||
AddHandler CtrlBuilder.OnRecordChanged, AddressOf OnRecordChanged
|
||||
AddHandler CtrlBuilder.OnMouseHover, AddressOf HandleToolTip
|
||||
elapsed = sw.Elapsed.TotalSeconds
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Load_Controls took " & Format(elapsed, "0.000000000") & " seconds", False)
|
||||
sw.Stop()
|
||||
sw.Reset()
|
||||
End Sub
|
||||
|
||||
Private Sub HandleToolTip(sender As Object, e As EventArgs)
|
||||
@@ -1085,6 +1091,7 @@ Public Class frmConstructor_Main
|
||||
tsButtonSave.Enabled = True
|
||||
EDIT_STATE = EditState.Insert
|
||||
RECORD_CHANGED = True
|
||||
tsslblRecord.Text = "Adding record ......"
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected Error in Insert: " & ex.Message)
|
||||
@@ -1095,6 +1102,9 @@ Public Class frmConstructor_Main
|
||||
End Sub
|
||||
|
||||
Private Sub tsButtonSave_Click(sender As Object, e As EventArgs) Handles tsButtonSave.Click
|
||||
Save_Record()
|
||||
End Sub
|
||||
Function Save_Record()
|
||||
Try
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
SAVE_ROUTINE_ACTIVE = True
|
||||
@@ -1107,7 +1117,7 @@ Public Class frmConstructor_Main
|
||||
If Not RECORD_CHANGED Then
|
||||
Update_Status_Label(True, "KEINE Änderungen an Datensatz.")
|
||||
Me.Cursor = Cursors.Default
|
||||
Exit Sub
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
'Update aller Control-Werte
|
||||
@@ -1116,9 +1126,9 @@ Public Class frmConstructor_Main
|
||||
Try
|
||||
ResultMessage = Update_Record_OnChange()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Fehler beim Speichern des Datensatzes")
|
||||
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Error in saving Record")
|
||||
Me.Cursor = Cursors.Default
|
||||
Exit Sub
|
||||
Return False
|
||||
End Try
|
||||
|
||||
Dim recid As Integer
|
||||
@@ -1136,7 +1146,7 @@ Public Class frmConstructor_Main
|
||||
If RECORD_ID = 0 Then
|
||||
MsgBox("Attention: no current record Selected!", MsgBoxStyle.Exclamation)
|
||||
Me.Cursor = Cursors.Default
|
||||
Exit Sub
|
||||
Return False
|
||||
End If
|
||||
If EDIT_STATE = EditState.Insert Then
|
||||
Select Case ACT_EBENE
|
||||
@@ -1219,6 +1229,7 @@ Public Class frmConstructor_Main
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in Save Data:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
Return False
|
||||
End Try
|
||||
|
||||
If CtrlCommandUI.IsInsert Then
|
||||
@@ -1232,24 +1243,34 @@ Public Class frmConstructor_Main
|
||||
RECORD_CHANGED = False
|
||||
SAVE_ROUTINE_ACTIVE = False
|
||||
Me.Cursor = Cursors.Default
|
||||
End Sub
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub tsButtonDelete_Click(sender As Object, e As EventArgs) Handles tsButtonDelete.Click
|
||||
Dim msg = "Sind Sie sicher, dass Sie diesen Record/Datensatz löschen wollen?"
|
||||
If USER_LANGUAGE <> "de-DE" Then
|
||||
msg = "Are You sure You want to delete the selected record?"
|
||||
End If
|
||||
Dim result As MsgBoxResult
|
||||
result = MessageBox.Show("Möchten Sie den Datensatz wirklich löschen?", "Bestätigung erforderlich:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
|
||||
result = MessageBox.Show(msg, "Confirmation:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
|
||||
If result = MsgBoxResult.Yes Then
|
||||
EDIT_STATE = EditState.Delete
|
||||
If CtrlCommandUI.DeleteRecord(SELECTED_RECORD_ID) = True Then
|
||||
Update_Status_Label(True, "Der Datensatz '" & SELECTED_RECORD_ID & "' wurde erfolgreich gelöscht - " & Now, EditState.Update)
|
||||
Dim del = "EXEC [dbo].[PRPMO_DELETE_RECORD] " & SELECTED_RECORD_ID
|
||||
If ClassDatabase.Execute_non_Query(del, True) = True Then
|
||||
msg = "Der Datensatz '" & SELECTED_RECORD_ID & "' wurde erfolgreich gelöscht - " & Now
|
||||
If USER_LANGUAGE <> "de-DE" Then
|
||||
msg = "The record and all dependencies for '" & SELECTED_RECORD_ID & "' were deleted - " & Now
|
||||
End If
|
||||
Update_Status_Label(True, msg, EditState.Update)
|
||||
Update_Record_Label(SELECTED_RECORD_ID)
|
||||
Load_Tree_View_Data()
|
||||
' Nach dem löschen muss die aktuelle Ansicht neugeladen werden
|
||||
Load_Entity_Data(ACT_EBENE)
|
||||
DisableEditMode()
|
||||
RECORD_CHANGED = False
|
||||
EDIT_STATE = EditState.None
|
||||
End If
|
||||
End If
|
||||
EDIT_STATE = EditState.None
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub tsButtonEditMode_Click(sender As Object, e As EventArgs) Handles tsButtonEditMode.Click
|
||||
@@ -1351,6 +1372,7 @@ Public Class frmConstructor_Main
|
||||
Try
|
||||
Dim sw As New Stopwatch
|
||||
sw.Start()
|
||||
Dim elapsed As Double
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
RECORD_CHANGED = False
|
||||
RECORD_ID = 0
|
||||
@@ -1395,6 +1417,8 @@ Public Class frmConstructor_Main
|
||||
|
||||
'Abhängig von der Entität die Selektierungs-Daten laden
|
||||
Get_Grid_Sql(CONSTRUCTORID, ENTITY_ID, CURRENT_CONSTRUCTOR_DETAIL_ID)
|
||||
elapsed = sw.Elapsed.TotalSeconds
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Get_Grid_Sql took " & Format(elapsed, "0.000000000") & " seconds", False)
|
||||
'Anzahl der Datensätze
|
||||
ENTITY_RECORD_COUNT = ClassDatabase.Execute_Scalar("SELECT COUNT(*) FROM TBPMO_RECORD where FORM_ID = " & ENTITY_ID, True)
|
||||
Select Case ClickedLevel
|
||||
@@ -1410,7 +1434,7 @@ Public Class frmConstructor_Main
|
||||
PARENT_ID = 0
|
||||
EBENE1_ENTITY = TreeViewMain.SelectedNode.Text
|
||||
ACT_EBENE_STRING = EBENE1_ENTITY
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> Level 1 selected in TreeView", False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Level 1 selected in TreeView", False)
|
||||
|
||||
|
||||
'tslblEntity2.Visible = False
|
||||
@@ -1432,7 +1456,7 @@ Public Class frmConstructor_Main
|
||||
'End If
|
||||
EBENE2_ENTITY = TreeViewMain.SelectedNode.Text
|
||||
ACT_EBENE_STRING = EBENE2_ENTITY
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> Level 2 selected in TreeView", False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Level 2 selected in TreeView", False)
|
||||
EBENE3_ENTITY = ""
|
||||
'Wenn bereits ein Record für Ebene 1 gewählt wurde dann einschränken
|
||||
If EBENE1_RECID > 0 Then
|
||||
@@ -1471,7 +1495,7 @@ Public Class frmConstructor_Main
|
||||
Case 3
|
||||
EBENE3_ENTITY = TreeViewMain.SelectedNode.Text
|
||||
ACT_EBENE_STRING = EBENE3_ENTITY
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> Level 3 selected in TreeView", False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Level 3 selected in TreeView", False)
|
||||
|
||||
EBENE3_COLUMNNAME = ClassDatabase.Execute_Scalar("SELECT COLUMN_NAME1 FROM VWPMO_CONSTRUCTOR_FORMS WHERE CONSTRUCT_ID = " & CONSTRUCTORID & " AND FORM_ID = " & ENTITY_ID & " AND SCREEN_ID = " & CURRENT_SCREEN_ID)
|
||||
'Wenn bereits ein Record für Ebene 1 gewählt wurde dann eisnchränken
|
||||
@@ -1509,7 +1533,8 @@ Public Class frmConstructor_Main
|
||||
EBENE3_GRID_RESULT = Nothing
|
||||
End Select
|
||||
|
||||
|
||||
elapsed = sw.Elapsed.TotalSeconds - elapsed
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Select Case entities took " & Format(elapsed, "0.000000000") & " seconds", False)
|
||||
_ENTITYSTRING = ACT_EBENE_STRING
|
||||
PARENT_ID = PARENT_RECORDID
|
||||
act_FormViewID = ClassDatabase.Execute_Scalar("SELECT GUID FROM TBPMO_FORM_VIEW where FORM_ID = " & ENTITY_ID)
|
||||
@@ -1594,7 +1619,7 @@ Public Class frmConstructor_Main
|
||||
' sql1.Replace("T.*", "TOP 1 [Record-ID]")
|
||||
' Dim id = ClassDatabase.Execute_Scalar(sql1, True)
|
||||
' If Not id Is Nothing Then
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> Load Record directly - RecordID: " & RECORD_ID, False)
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(" >> Load Record directly - RecordID: " & RECORD_ID, False)
|
||||
' Load_Record_Data()
|
||||
' End If
|
||||
'End If
|
||||
@@ -1640,11 +1665,11 @@ Public Class frmConstructor_Main
|
||||
End If
|
||||
|
||||
|
||||
Dim elapsed As Double
|
||||
|
||||
elapsed = sw.Elapsed.TotalSeconds
|
||||
sw.Stop()
|
||||
sw.Reset()
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> Load_Entity_Data took " & Format(elapsed, "0.000000000") & " seconds", False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Load_Entity_Data took " & Format(elapsed, "0.000000000") & " seconds", False)
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in Load_Entity_Data:" & vbNewLine & ex.Message, MsgBoxStyle.Exclamation)
|
||||
Finally
|
||||
@@ -1948,7 +1973,7 @@ Public Class frmConstructor_Main
|
||||
If IsNothing(PARENT_RECORD1) Then
|
||||
Dim New_Record = ClassControlCommandsUI.GetLastRecord
|
||||
If Not IsNothing(New_Record) Then
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> Parent-Record Ebene 1 wird neu angelegt...", False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Parent-Record Ebene 1 wird neu angelegt...", False)
|
||||
'Die neue Record-ID setzen
|
||||
ClassControlCommandsUI.ConnectRecord(New_Record, RECORDID, "PARENT-LINK FOR ENTITY " & ENTITY_ID & "")
|
||||
Return New_Record
|
||||
@@ -1967,7 +1992,7 @@ Public Class frmConstructor_Main
|
||||
If IsNothing(PARENT_RECORD2) Then
|
||||
Dim New_Record = ClassControlCommandsUI.GetLastRecord
|
||||
If Not IsNothing(New_Record) Then
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> Parent-Record Ebene 1 wird neu angelegt...", False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Parent-Record Ebene 1 wird neu angelegt...", False)
|
||||
'Die neue Record-ID setzen
|
||||
ClassControlCommandsUI.ConnectRecord(New_Record, RECORDID, "PARENT-LINK FOR ENTITY " & ENTITY_ID & "")
|
||||
Return New_Record
|
||||
@@ -2098,8 +2123,11 @@ Public Class frmConstructor_Main
|
||||
End Sub
|
||||
Private Sub Show_Selected_Record_Data(Rec_ID As Integer, EntityLoad As Boolean)
|
||||
Try
|
||||
Dim sw As New Stopwatch
|
||||
sw.Start()
|
||||
|
||||
Update_Status_Label(False, "")
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> GRID_RECORD ID: " & Rec_ID.ToString, False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> GRID_RECORD ID: " & Rec_ID.ToString, False)
|
||||
'Me.pnlDetails.Visible = True
|
||||
ZeigeRecordLogsToolStripMenuItem.Enabled = False
|
||||
If FORM_TYPE = 5 And EntityLoad = False Or IS_SINGLE_RECORD = True And EntityLoad = False Then '#### Es sind untergeordnete Entitäten geöffnet####
|
||||
@@ -2169,28 +2197,31 @@ Public Class frmConstructor_Main
|
||||
End If
|
||||
End Select
|
||||
End If
|
||||
Select Case TCDetails.SelectedTabPageIndex
|
||||
Case 0
|
||||
Dim sw1 As New Stopwatch
|
||||
sw1.Start()
|
||||
ClassControlValues.LoadControlValues(SELECTED_RECORD_ID, PARENT_ID, ENTITY_ID, CtrlBuilder.AllControls)
|
||||
Dim elapsed1 As Double
|
||||
elapsed1 = sw1.Elapsed.TotalSeconds
|
||||
sw1.Stop()
|
||||
sw1.Reset()
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> LoadControlValues took " & Format(elapsed1, "0.000000000") & " seconds", False)
|
||||
Case 1
|
||||
If RECORD_ID = 0 Then
|
||||
RUN_WD_SEARCH(WD_Suche, "ENTITY")
|
||||
Else
|
||||
RUN_WD_SEARCH(WD_Suche, "RECORD")
|
||||
End If
|
||||
Case 2
|
||||
tsButtonEditMode.Enabled = False
|
||||
Refresh_FollowUps()
|
||||
dtpFollowUp.Enabled = False
|
||||
lblWiedervorlage_Control.Text = "<< Waiting for Selection:"
|
||||
'ListBoxUser2Profile.Items.Clear()
|
||||
grpbxFU_Profile.Enabled = False
|
||||
End Select
|
||||
|
||||
|
||||
If TCDetails.SelectedTabPage.Text.ToLower.StartsWith("windr") Then
|
||||
If RECORD_ID = 0 Then
|
||||
RUN_WD_SEARCH(WD_Suche, "ENTITY")
|
||||
Else
|
||||
RUN_WD_SEARCH(WD_Suche, "RECORD")
|
||||
End If
|
||||
End If
|
||||
If TCDetails.SelectedTabPage.Text.StartsWith("Detail") Or TCDetails.SelectedTabPage.Text.StartsWith("Kopf") Then
|
||||
'Daten zu Record in jedem Fall laden
|
||||
'ClassControlValues.LoadControlValues(SELECTED_RECORD_ID, ENTITY_ID, CtrlBuilder.AllControls)
|
||||
ClassControlValues.LoadControlValues(SELECTED_RECORD_ID, PARENT_ID, ENTITY_ID, CtrlBuilder.AllControls)
|
||||
End If
|
||||
If TCDetails.SelectedTabPage.Text.ToLower.StartsWith("wieder") Then
|
||||
tsButtonEditMode.Enabled = False
|
||||
Refresh_FollowUps()
|
||||
dtpFollowUp.Enabled = False
|
||||
lblWiedervorlage_Control.Text = "<< Waiting for Selection:"
|
||||
'ListBoxUser2Profile.Items.Clear()
|
||||
grpbxFU_Profile.Enabled = False
|
||||
End If
|
||||
' Laden der Daten bedeutet nicht dass Daten vom Benutzer geändert wurden!
|
||||
RECORD_CHANGED = False
|
||||
|
||||
@@ -2208,6 +2239,12 @@ Public Class frmConstructor_Main
|
||||
Me.tsButtonShowWorkflowTasks.Enabled = True
|
||||
Me.tsButtonShowTaskOverview.Enabled = True
|
||||
RECORD_ID = SELECTED_RECORD_ID
|
||||
|
||||
Dim elapsed As Double
|
||||
elapsed = sw.Elapsed.TotalSeconds
|
||||
sw.Stop()
|
||||
sw.Reset()
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Show Selected RecordData took " & Format(elapsed, "0.000000000") & " seconds", False)
|
||||
'tsstatus_Detail_show(False, "")
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in SelectedRecord_ShowData:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
@@ -2477,6 +2514,9 @@ Public Class frmConstructor_Main
|
||||
|
||||
End Function
|
||||
Private Sub RUN_WD_SEARCH(BaseSearch As String, Type As String)
|
||||
Dim sw As New Stopwatch
|
||||
sw.Start()
|
||||
Dim elapsed As Double
|
||||
Try
|
||||
Dim windream_temp_search
|
||||
If Not windream_Docshow = True Or Sett_LoadWD_Docs = False Or TCDetails.SelectedTabPageIndex <> 1 Then
|
||||
@@ -2492,7 +2532,11 @@ Public Class frmConstructor_Main
|
||||
Clear_Windream_ResultList()
|
||||
Exit Sub
|
||||
End If
|
||||
tslblWindreamView.Text = "Windream-Dokumente für Entität: " & ACT_EBENE_STRING
|
||||
Dim msg = "Windream-Dokumente für Entität: " & ACT_EBENE_STRING
|
||||
If USER_LANGUAGE <> "de-DE" Then
|
||||
msg = "windream-files for entity: " & ACT_EBENE_STRING
|
||||
End If
|
||||
tslblWindreamView.Text = msg
|
||||
Else
|
||||
Clear_Windream_ResultList()
|
||||
Exit Sub
|
||||
@@ -2505,7 +2549,11 @@ Public Class frmConstructor_Main
|
||||
Clear_Windream_ResultList()
|
||||
Exit Sub
|
||||
End If
|
||||
tslblWindreamView.Text = "Windream-Dokumente für Record: " & RECORD_ID
|
||||
Dim msg = "Windream-Dokumente für Record: " & RECORD_ID
|
||||
If USER_LANGUAGE <> "de-DE" Then
|
||||
msg = "windream-files for record: " & RECORD_ID
|
||||
End If
|
||||
tslblWindreamView.Text = msg
|
||||
Else
|
||||
Clear_Windream_ResultList()
|
||||
Exit Sub
|
||||
@@ -2554,17 +2602,17 @@ Public Class frmConstructor_Main
|
||||
Dim WDUnicode = ClassDatabase.Execute_Scalar("SELECT WD_UNICODE FROM TBPMO_KONFIGURATION WHERE GUID = 1")
|
||||
If WDUnicode = True Then
|
||||
EncodingFormat = Encoding.GetEncoding(1252) '1252
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> Unicode is used (Encoding.GetEncoding(1252))", False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Unicode is used (Encoding.GetEncoding(1252))", False)
|
||||
Else
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> UTF8 (Encoding.GetEncoding(65001))", False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> UTF8 (Encoding.GetEncoding(65001))", False)
|
||||
EncodingFormat = Encoding.GetEncoding(65001)
|
||||
End If
|
||||
|
||||
|
||||
Dim fileContents As String
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> ReadAlltext: " & windream_temp_search, False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> ReadAlltext: " & windream_temp_search, False)
|
||||
fileContents = My.Computer.FileSystem.ReadAllText(BaseSearch, EncodingFormat) ', System.Text.Encoding.Unicode
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> fileContents geladen", False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> fileContents geladen", False)
|
||||
fileContents = fileContents.Replace("Í", "Ö")
|
||||
Dim _sp1 = SP1
|
||||
Dim _sp2 = SP2
|
||||
@@ -2625,7 +2673,7 @@ Public Class frmConstructor_Main
|
||||
xml.Load(Reader)
|
||||
Reader.Close()
|
||||
xml.Save(windream_temp_search)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> Xml Generiert: " & windream_temp_search, False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Xml Generiert: " & windream_temp_search, False)
|
||||
|
||||
Dim windreamSucheErgebnisse As WMObjects
|
||||
Try
|
||||
@@ -2633,7 +2681,8 @@ Public Class frmConstructor_Main
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in windreamSucheErgebnisse:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
|
||||
elapsed = sw.Elapsed.TotalSeconds
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> GetSearchDocuments took " & Format(elapsed, "0.000000000") & " seconds", False)
|
||||
If windreamSucheErgebnisse.Count > 0 Then
|
||||
|
||||
|
||||
@@ -2719,12 +2768,10 @@ Public Class frmConstructor_Main
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected Error in Construct windreamResultList: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
|
||||
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> AxObjectListControl geladen ", False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> AxObjectListControl loaded ", False)
|
||||
'Execute the search
|
||||
Dim results As WMObjects = windreamSucheErgebnisse
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> results geladen ", False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> results loaded ", False)
|
||||
'Set the contents without displaying them
|
||||
AxObjectListControl.SetContentsEx(results)
|
||||
'Change the icon
|
||||
@@ -2743,6 +2790,10 @@ Public Class frmConstructor_Main
|
||||
Loop
|
||||
AxObjectListControl.SetStatusIcon(3)
|
||||
Else
|
||||
Dim msg = "Windream-Dokumente für Record: " & RECORD_ID & " - Keine Dateien gefunden"
|
||||
If USER_LANGUAGE <> "de-DE" Then
|
||||
msg = "windream-files for record: " & RECORD_ID & " - vo files found"
|
||||
End If
|
||||
tslblWindreamView.Text = "Windream-Dokumente für Record: " & RECORD_ID & " - Keine Dateien gefunden"
|
||||
Clear_Windream_ResultList()
|
||||
End If
|
||||
@@ -2756,6 +2807,10 @@ Public Class frmConstructor_Main
|
||||
MsgBox("Error in RUN_WD_SEARCH:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
Cursor = Cursors.Default
|
||||
End Try
|
||||
elapsed = sw.Elapsed.TotalSeconds
|
||||
sw.Stop()
|
||||
sw.Reset()
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Run WD Search took " & Format(elapsed, "0.000000000") & " seconds", False)
|
||||
|
||||
End Sub
|
||||
Private Function Return_SearchPattern(ByVal content As String)
|
||||
@@ -2787,16 +2842,15 @@ Public Class frmConstructor_Main
|
||||
stg = "windream-files"
|
||||
End If
|
||||
TabWindream.Text = stg
|
||||
|
||||
Dim elapsed As Double
|
||||
elapsed = sw.Elapsed.TotalSeconds
|
||||
sw.Stop()
|
||||
sw.Reset()
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> Clear Result List took " & Format(elapsed, "0.000000000") & " seconds", False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Clear Result List took " & Format(elapsed, "0.000000000") & " seconds", False)
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected Error in Clear Result List:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
|
||||
|
||||
End Sub
|
||||
Sub CheckDocView()
|
||||
Dim _index = AxObjectListControl.GetFirstSelectedObject
|
||||
@@ -2968,6 +3022,11 @@ Public Class frmConstructor_Main
|
||||
Exit Sub
|
||||
End If
|
||||
If e.Data.GetDataPresent(DataFormats.StringFormat) Then
|
||||
If RECORD_CHANGED = True Then
|
||||
If Save_Record() = False Then
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
Dim Wert As String = CType(e.Data.GetData(DataFormats.StringFormat), Object)
|
||||
Console.WriteLine(Wert)
|
||||
If Wert.Contains("SCAN") Then
|
||||
@@ -2991,6 +3050,11 @@ Public Class frmConstructor_Main
|
||||
End Sub
|
||||
Sub Check_Dropped_Files()
|
||||
Try
|
||||
If RECORD_CHANGED = True Then
|
||||
If Save_Record() = False Then
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
If RECORD_ID = 0 Then
|
||||
MsgBox("Bitte wählen Sie einen Datensatz aus!", MsgBoxStyle.Information)
|
||||
Exit Sub
|
||||
@@ -3213,12 +3277,12 @@ Public Class frmConstructor_Main
|
||||
End Sub
|
||||
Sub Show_act_WFTask()
|
||||
Try
|
||||
Me.VWPMO_WF_ACTIVETableAdapter.FillByRecord(Me.DD_DMSDataSet.VWPMO_WF_ACTIVE, RECORD_ID, Environment.UserName)
|
||||
Me.VWPMO_WF_ACTIVETableAdapter.FillByRecord(Me.DD_DMSDataSet.VWPMO_WF_ACTIVE, USER_LANGUAGE, Environment.UserName, RECORD_ID)
|
||||
tsslblWorkflowstate.BackColor = Color.Black
|
||||
If DD_DMSDataSet.VWPMO_WF_ACTIVE.Rows.Count > 0 Then
|
||||
CURRENT_TASK_ID = Me.DD_DMSDataSet.VWPMO_WF_ACTIVE.Rows(0).Item("WF_TASK_ID")
|
||||
Dim text = "Task: " & Me.DD_DMSDataSet.VWPMO_WF_ACTIVE.Rows(0).Item("TITLE")
|
||||
text += " - " & Me.DD_DMSDataSet.VWPMO_WF_ACTIVE.Rows(0).Item("STATE_DESC")
|
||||
Dim text = "Task: " & Me.DD_DMSDataSet.VWPMO_WF_ACTIVE.Rows(0).Item("WF_TITLE")
|
||||
text += " - " & Me.DD_DMSDataSet.VWPMO_WF_ACTIVE.Rows(0).Item("STATE_TITLE")
|
||||
text += " - " & Me.DD_DMSDataSet.VWPMO_WF_ACTIVE.Rows(0).Item("DUE_DATE")
|
||||
tsslblWorkflowstate.Text = text
|
||||
tsslblWorkflowstate.Visible = True
|
||||
@@ -3244,8 +3308,8 @@ Public Class frmConstructor_Main
|
||||
tsButtonShowWorkflowTasks.Visible = False
|
||||
' grvwSelection.Appearance.FocusedRow.BackColor = Color.Fuchsia
|
||||
End If
|
||||
Dim sql1 As String = "SELECT COUNT(*) FROM TBPMO_WORKFLOW_FORM where FORM_ID = @FORM_ID"
|
||||
sql1 = sql1.Replace("@FORM_ID", ENTITY_ID)
|
||||
Dim sql1 As String = "SELECT COUNT(*) FROM TBPMO_WORKFLOW_ENTITY_STATE where ENTITY_ID = @ID"
|
||||
sql1 = sql1.Replace("@ID", ENTITY_ID)
|
||||
Dim result As Integer = ClassDatabase.Execute_Scalar(sql1)
|
||||
If result > 0 Then
|
||||
tsButtonShowWorkflowTasks.Visible = True
|
||||
@@ -3306,7 +3370,7 @@ Public Class frmConstructor_Main
|
||||
MsgBox("Unexpected Error in Create Workflowtasks Record: " & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ZeigeRecordLogsToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ZeigeRecordLogsToolStripMenuItem.Click
|
||||
@@ -3358,7 +3422,7 @@ Public Class frmConstructor_Main
|
||||
Sub Jump_Record()
|
||||
Try
|
||||
Dim sw As Stopwatch = Stopwatch.StartNew()
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> " & Now.ToString & " Jump_Record", False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> " & Now.ToString & " Jump_Record", False)
|
||||
If JUMP_RECORD_ID > 0 Then
|
||||
Dim sql = String.Format("SELECT FORM_ID FROM TBPMO_RECORD WHERE GUID = {0}", JUMP_RECORD_ID)
|
||||
Dim FormID = ClassDatabase.Execute_Scalar(sql, True)
|
||||
@@ -3476,7 +3540,7 @@ Public Class frmConstructor_Main
|
||||
End If
|
||||
End If
|
||||
sw.Stop()
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(String.Format("Load_Level1 took {0} milliseconds to load", sw.ElapsedMilliseconds), False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(String.Format(">> Load_Level1 took {0} milliseconds to load", sw.ElapsedMilliseconds), False)
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in Load_Level1:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
|
||||
Reference in New Issue
Block a user