This commit is contained in:
SchreiberM
2016-04-08 14:55:25 +02:00
parent d1eb7ecb5b
commit ef2a87d849
47 changed files with 12718 additions and 9964 deletions

View File

@@ -7,7 +7,7 @@ Imports DevExpress.XtraGrid.Views.Base
Imports DevExpress.XtraGrid.Views.Tile
Imports DevExpress.XtraScheduler
Imports System.Text
Imports WINDREAMLib
'Imports WINDREAMLib
Imports System.IO
Imports DevExpress.XtraGrid
@@ -34,6 +34,7 @@ Public Class frmConstructor_Main
Private VIEW_ID_RUNTIME As Integer = -1
Public RECORD_ENABLED As Boolean = False
Private windream_inited = False
Private ENTITY_RECORD_COUNT As Integer = 0
Private EBENE1_ENTITY
@@ -62,8 +63,14 @@ Public Class frmConstructor_Main
Private SP4 As String
Private SP5 As String
Private RIGHT_EDIT_R As Boolean = True
Private RIGHT_ADD_R As Boolean = True
Private RIGHT_DELETE_R As Boolean = False
Private RIGHT_ADD_DOC As Boolean = True
Private RIGHT_VIEW_DOC As Boolean = True
Private RIGHT_DELETE_DOC As Boolean = False
Private windream_Docshow As Boolean = False
Private _windream As New ClassWindream
Private WD_Suche As String
Private DocView
Private DocViewString As String
@@ -96,10 +103,6 @@ Public Class frmConstructor_Main
Private _ENTITYSQL As String
Private _ENTITYSTRING As String
Public Enum EditState
None
Insert
@@ -164,7 +167,7 @@ Public Class frmConstructor_Main
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)
'System.Windows.Forms.MessageBox.Show(ex.Message)
End Try
Me.Cursor = Cursors.Default
@@ -667,7 +670,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 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")
@@ -685,7 +688,7 @@ Public Class frmConstructor_Main
End If
If RECORD_ID > 0 Then
tsButtonEditMode.Enabled = True
tsButtonEdit.Enabled = True
Get_RecordCounts_Nodes()
End If
End If
@@ -816,10 +819,8 @@ Public Class frmConstructor_Main
sw.Reset()
If LogErrorsOnly = False Then ClassLogger.Add(" >> TreeView Load took " & Format(elapsed, "0.000000000") & " seconds", False)
End If
TreeViewMain.ExpandAll()
End Sub
Sub Load_Tree_View_Data()
Dim sw As New Stopwatch
sw.Start()
@@ -827,7 +828,7 @@ Public Class frmConstructor_Main
If SelectedNode IsNot Nothing Then
ENTITY_LOADED = False
Dim FormId As Integer = SelectedNode.Tag
ENTITY_ID = SelectedNode.Tag
Dim parentNode As TreeNode = TryCast(SelectedNode.Parent, TreeNode)
ACT_EBENE = 2
@@ -840,7 +841,6 @@ Public Class frmConstructor_Main
Else
ACT_EBENE = 1
End If
ENTITY_ID = FormId
Dim Sql = "SELECT GUID from VWPMO_CONSTRUCTOR_FORMS WHERE CONSTRUCT_ID = " & CONSTRUCTORID & " AND FORM_ID = " & ENTITY_ID & " AND SCREEN_ID = " & CURRENT_SCREEN_ID
CONSTRUCTOR_DETAIL_ID = ClassDatabase.Execute_Scalar(Sql, True)
@@ -1273,7 +1273,7 @@ Public Class frmConstructor_Main
End Sub
Private Sub tsButtonEditMode_Click(sender As Object, e As EventArgs) Handles tsButtonEditMode.Click
Private Sub tsButtonEditMode_Click(sender As Object, e As EventArgs) Handles tsButtonEdit.Click
ToggleEditMode()
End Sub
@@ -1297,11 +1297,11 @@ Public Class frmConstructor_Main
Else
stg = "End Working"
End If
Me.tsButtonEditMode.Text = stg
Me.tsButtonEdit.Text = stg
CURRENT_RECORD_ID = RECORD_ID
' Abhängige Listen laden
ClassControlValues.LoadControlValuesListWithPlaceholders(ENTITY_ID, RECORD_ID, PARENT_ID, CtrlBuilder.AllControls)
ClassControlValues.LoadControlValuesListWithPlaceholders(ENTITY_ID, RECORD_ID, PARENT_ID, CtrlBuilder.AllControls, ENTITY_ID)
RECORD_ENABLED = True
CURRENT_RECORD_ENABLED = True
@@ -1325,8 +1325,8 @@ Public Class frmConstructor_Main
Else
stg = "Work record"
End If
Me.tsButtonEditMode.Text = stg
Me.tsButtonEditMode.Text = stg
Me.tsButtonEdit.Text = stg
Me.tsButtonEdit.Text = stg
'Funktion nur zum load der Inhalte
If RECORD_ENABLED = True Then
@@ -1367,7 +1367,75 @@ Public Class frmConstructor_Main
Return Convert.ToInt32(apt.CustomFields("RecordID")) = SELECTED_RECORD_ID
End Function
#End Region
Sub GetSet_Rights()
Try
Dim sel = String.Format("SELECT DISTINCT EDIT_REC,ADD_REC,DELETE_REC,ADD_DOC,VIEW_DOC,DELETE_DOC FROM TBPMO_RIGHT_GROUP WHERE ENTITY_ID = {0} AND GROUP_ID IN (SELECT GROUP_ID FROM TBDD_GROUPS_USER WHERE USER_ID = {1})", ENTITY_ID, USER_GUID)
If LogErrorsOnly = False Then ClassLogger.Add(" >> Select Rightsmanagement " & sel, False)
Dim DT As DataTable = ClassDatabase.Return_Datatable(sel, "GetSet_Rights")
If DT.Rows.Count > 0 Then
For Each row As DataRow In DT.Rows
'RIGHT_EDIT_R = True
'RIGHT_ADD_R = True
'RIGHT_DELETE_R = False
'RIGHT_ADD_DOC = True
'RIGHT_VIEW_DOC = True
'RIGHT_DELETE_DOC = False
If RIGHT_EDIT_R = True And CBool(DT.Rows(0).Item(0)) = False Then
RIGHT_EDIT_R = False
ElseIf RIGHT_EDIT_R = False And CBool(DT.Rows(0).Item(0)) = True Then
RIGHT_EDIT_R = True
End If
If RIGHT_ADD_R = True And CBool(DT.Rows(0).Item(1)) = False Then
RIGHT_ADD_R = False
ElseIf RIGHT_EDIT_R = False And CBool(DT.Rows(0).Item(1)) = True Then
RIGHT_EDIT_R = True
End If
If RIGHT_DELETE_R = False And CBool(DT.Rows(0).Item(2)) = True Then
RIGHT_DELETE_R = True
ElseIf RIGHT_DELETE_R = False And CBool(DT.Rows(0).Item(2)) = False Then
RIGHT_DELETE_R = False
End If
If RIGHT_ADD_DOC = True And CBool(DT.Rows(0).Item(3)) = False Then
RIGHT_ADD_DOC = False
ElseIf RIGHT_ADD_DOC = False And CBool(DT.Rows(0).Item(3)) = True Then
RIGHT_ADD_DOC = True
End If
If RIGHT_VIEW_DOC = True And CBool(DT.Rows(0).Item(4)) = False Then
RIGHT_VIEW_DOC = False
ElseIf RIGHT_VIEW_DOC = True And CBool(DT.Rows(0).Item(4)) = False Then
RIGHT_VIEW_DOC = True
End If
If RIGHT_DELETE_DOC = False And CBool(DT.Rows(0).Item(5)) = True Then
RIGHT_DELETE_DOC = False
ElseIf RIGHT_DELETE_DOC = True And CBool(DT.Rows(0).Item(5)) = False Then
RIGHT_DELETE_DOC = True
End If
Next
End If
tsButtonSave.Visible = True
tsButtonAdd.Visible = True
tsButtonEdit.Visible = True
tsButtonDelete.Visible = True
If RIGHT_ADD_R = False Then
tsButtonAdd.Visible = False
End If
If RIGHT_EDIT_R = False Then
tsButtonEdit.Visible = False
If RIGHT_ADD_R = False Then
tsButtonSave.Visible = False
End If
End If
If RIGHT_DELETE_R = False Then
tsButtonDelete.Visible = False
End If
Catch ex As Exception
MsgBox("Error in GetSet_Rights:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Sub Load_Entity_Data(ClickedLevel As Integer)
Try
Dim sw As New Stopwatch
@@ -1377,6 +1445,8 @@ Public Class frmConstructor_Main
RECORD_CHANGED = False
RECORD_ID = 0
VerknüpfungenAnzeigenToolStripMenuItem.Enabled = True
'Setzen von Rechten
'GetSet_Rights()
'VerknüpfungenToolStripMenuItem.Enabled = False
FORM_TYPE = ClassDatabase.Execute_Scalar("SELECT FORM_TYPE_ID FROM TBPMO_FORM WHERE GUID = " & ENTITY_ID)
IS_SINGLE_RECORD = ClassDatabase.Execute_Scalar("SELECT SINGLE_RECORD FROM TBPMO_FORM WHERE GUID = " & ENTITY_ID)
@@ -1692,7 +1762,7 @@ Public Class frmConstructor_Main
RECORD_ID = Grid_RecordID
'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)
ClassControlValues.LoadControlValues(SELECTED_RECORD_ID, PARENT_ID, ENTITY_ID, CtrlBuilder.AllControls, ENTITY_ID)
' Laden der Daten bedeutet nicht dass Daten vom Benutzer geändert wurden!
RECORD_CHANGED = False
Update_Record_Label(Grid_RecordID)
@@ -1900,7 +1970,13 @@ Public Class frmConstructor_Main
End If
If RECORD_CHANGED = True Then
Dim result As DialogResult = MessageBox.Show("Sie haben ungespeicherte Änderungen. Wollen Sie diese speichern?", "Ungespeicherte Änderungen", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
Dim msg = "Sie haben ungespeicherte Änderungen. Wollen Sie diese speichern?"
Dim msg1 = "Ungespeicherte Änderungen"
If USER_LANGUAGE <> "de-DE" Then
msg = "There are unsaved changes. Would You like to save?"
msg1 = "Unsaved changes"
End If
Dim result As DialogResult = MessageBox.Show(msg, msg1, MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If result = Windows.Forms.DialogResult.Yes Then
If CtrlCommandUI.IsInsert = True Then
EDIT_STATE = EditState.None
@@ -1908,13 +1984,11 @@ Public Class frmConstructor_Main
'Me.pnlDetails.Enabled = False
'CtrlCommandUI.IsInsert = False
End If
Try
Update_Record_OnChange()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Fehler beim Speichern des Datensatzes")
MsgBox("Error in Save Record Changes: " & vbNewLine & ex.Message, MsgBoxStyle.Exclamation)
End Try
End If
CtrlCommandUI.IsInsert = False
RECORD_CHANGED = False
@@ -2201,7 +2275,7 @@ Public Class frmConstructor_Main
Case 0
Dim sw1 As New Stopwatch
sw1.Start()
ClassControlValues.LoadControlValues(SELECTED_RECORD_ID, PARENT_ID, ENTITY_ID, CtrlBuilder.AllControls)
ClassControlValues.LoadControlValues(SELECTED_RECORD_ID, PARENT_ID, ENTITY_ID, CtrlBuilder.AllControls, ENTITY_ID)
Dim elapsed1 As Double
elapsed1 = sw1.Elapsed.TotalSeconds
sw1.Stop()
@@ -2214,7 +2288,7 @@ Public Class frmConstructor_Main
RUN_WD_SEARCH(WD_Suche, "RECORD")
End If
Case 2
tsButtonEditMode.Enabled = False
tsButtonEdit.Enabled = False
Refresh_FollowUps()
dtpFollowUp.Enabled = False
lblWiedervorlage_Control.Text = "<< Waiting for Selection:"
@@ -2434,14 +2508,26 @@ Public Class frmConstructor_Main
Private Sub Refresh_FollowUp_TabHeader()
Try
DT_FU_Record = ClassDatabase.Return_Datatable("select * from VWPMO_FOLLOW_UP_EMAIL_ENTITY_RECORD where Record_ID = " & RECORD_ID, "Refresh FollowUp TabHeader")
Dim msg As String = "Wiedervorlage (Nicht Abrufbar)"
If USER_LANGUAGE <> "de-DE" Then
msg = "Follow Up - (Not accessable)"
End If
If IsNothing(DT_FU_Record) Then
TabFollowUp.Text = "Wiedervorlage (Nicht Abrufbar)"
TabFollowUp.Text = msg
Exit Sub
End If
If DT_FU_Record.Rows.Count = 0 Then
TabFollowUp.Text = "Wiedervorlage (Nicht aktiviert)"
msg = "Wiedervorlage (Nicht aktiviert)"
If USER_LANGUAGE <> "de-DE" Then
msg = "Follow Up - (Not activated)"
End If
TabFollowUp.Text = msg
Else
TabFollowUp.Text = "Wiedervorlage (Aktive Profile)"
msg = "Wiedervorlage (Aktive Profile)"
If USER_LANGUAGE <> "de-DE" Then
msg = "Follow Up - (active profiles)"
End If
TabFollowUp.Text = msg
End If
Catch ex As Exception
MsgBox("Error in Refresh_FollowUp_TabHeader:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
@@ -2456,7 +2542,12 @@ Public Class frmConstructor_Main
If missingControlValues.Count > 0 Then
Dim nameString As String = String.Join(vbNewLine, missingControlValues)
Dim errorMessage As String = String.Format("Die folgenden Steuerelemente müssen ausgefüllt sein: {0}{1}", vbNewLine, nameString)
Dim msg = String.Format("Die folgenden Steuerelemente müssen ausgefüllt sein: {0}{1}", vbNewLine, nameString)
If USER_LANGUAGE <> "de-DE" Then
msg = String.Format("the following controls must be filled with values: {0}{1}", vbNewLine, nameString)
End If
Dim errorMessage As String = msg
Throw New Exception(errorMessage)
End If
@@ -2477,6 +2568,7 @@ Public Class frmConstructor_Main
For Each row As DataRow In DT.Rows
Dim prsql As String = row.Item("EXECUTE_COMMAND")
prsql = prsql.ToUpper.Replace("@FORM_ID", ENTITY_ID)
prsql = prsql.ToUpper.Replace("@ENTITY_ID", ENTITY_ID)
prsql = prsql.ToUpper.Replace("@RECORD_ID", RECORD_ID)
ClassDatabase.Execute_non_Query(prsql, True)
Next
@@ -2493,7 +2585,6 @@ Public Class frmConstructor_Main
Dim DTWD As DataTable = ClassDatabase.Return_Datatable(sql)
If DTWD.Rows.Count = 1 Then
TabWindream.PageVisible = True
If IsDBNull(DTWD.Rows(0).Item(0)) Then
windream_Docshow = False
WindreamsucheNeuLadenToolStripMenuItem.Visible = False
@@ -2501,6 +2592,19 @@ Public Class frmConstructor_Main
End If
WindreamsucheNeuLadenToolStripMenuItem.Visible = True
windream_Docshow = True
If windream_inited = False Then
Dim sw As New Stopwatch
sw.Start()
Dim elapsed As Double
If ClassWindream.Init() = True Then
windream_inited = True
End If
elapsed = sw.Elapsed.TotalSeconds
sw.Stop()
sw.Reset()
If LogErrorsOnly = False Then ClassLogger.Add(" >> Windream init took " & Format(elapsed, "0.000000000") & " seconds", False)
End If
Else
windream_Docshow = False
TabWindream.PageVisible = False
@@ -2530,6 +2634,7 @@ Public Class frmConstructor_Main
If DTWD.Rows.Count = 1 Then
If IsDBNull(DTWD.Rows(0).Item(0)) Then
Clear_Windream_ResultList()
Cursor = Cursors.Default
Exit Sub
End If
Dim msg = "Windream-Dokumente für Entität: " & ACT_EBENE_STRING
@@ -2539,6 +2644,8 @@ Public Class frmConstructor_Main
tslblWindreamView.Text = msg
Else
Clear_Windream_ResultList()
Cursor = Cursors.Default
Exit Sub
Exit Sub
End If
Else
@@ -2547,6 +2654,8 @@ Public Class frmConstructor_Main
If DTWD.Rows.Count = 1 Then
If IsDBNull(DTWD.Rows(0).Item(0)) Then
Clear_Windream_ResultList()
Cursor = Cursors.Default
Exit Sub
Exit Sub
End If
Dim msg = "Windream-Dokumente für Record: " & RECORD_ID
@@ -2556,12 +2665,16 @@ Public Class frmConstructor_Main
tslblWindreamView.Text = msg
Else
Clear_Windream_ResultList()
Cursor = Cursors.Default
Exit Sub
Exit Sub
End If
End If
'Die SearchPatterns durchlaufen und zwischenspeichern
If IsDBNull(DTWD.Rows(0).Item(0)) Then
Clear_Windream_ResultList()
Cursor = Cursors.Default
Exit Sub
Exit Sub
End If
BaseSearch = DTWD.Rows(0).Item(0)
@@ -2675,9 +2788,9 @@ Public Class frmConstructor_Main
xml.Save(windream_temp_search)
If LogErrorsOnly = False Then ClassLogger.Add(" >> Xml Generiert: " & windream_temp_search, False)
Dim windreamSucheErgebnisse As WMObjects
Dim windreamSucheErgebnisse As WINDREAMLib.WMObjects
Try
windreamSucheErgebnisse = Me._windream.GetSearchDocuments(windream_temp_search)
windreamSucheErgebnisse = ClassWindream.GetSearchDocuments(windream_temp_search)
Catch ex As Exception
MsgBox("Error in windreamSucheErgebnisse:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
@@ -2770,7 +2883,7 @@ Public Class frmConstructor_Main
End Try
If LogErrorsOnly = False Then ClassLogger.Add(" >> AxObjectListControl loaded ", False)
'Execute the search
Dim results As WMObjects = windreamSucheErgebnisse
Dim results As WINDREAMLib.WMObjects = windreamSucheErgebnisse
If LogErrorsOnly = False Then ClassLogger.Add(" >> results loaded ", False)
'Set the contents without displaying them
AxObjectListControl.SetContentsEx(results)
@@ -2805,13 +2918,13 @@ Public Class frmConstructor_Main
Cursor = Cursors.Default
Catch ex As Exception
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)
Cursor = Cursors.Default
End Sub
Private Function Return_SearchPattern(ByVal content As String)
Select Case content.ToUpper
@@ -2822,8 +2935,8 @@ Public Class frmConstructor_Main
Case "@ParentID".ToUpper
Return PARENT_RECORDID
Case Else
MsgBox("Undefinierter Pattern '" & content & "' in der Windream-SuchKonfiguration. Bitte den Administrator verständigen", MsgBoxStyle.Exclamation)
ClassLogger.Add(" >> Undefinierter Such-Pattern: " & content, True)
MsgBox("Undefined pattern '" & content & "' in windream-Search Config. Please inform Your system-administrator.", MsgBoxStyle.Exclamation)
ClassLogger.Add(" >> Undefined Search-pattern in windream-search config: " & content, True)
End Select
End Function
Private Sub AxObjectListControl_ItemClicked(sender As Object, e As EventArgs) Handles AxObjectListControl.ItemClicked
@@ -2959,22 +3072,22 @@ Public Class frmConstructor_Main
Private Sub TCDetails_SelectedPageChanged(sender As Object, e As DevExpress.XtraTab.TabPageChangedEventArgs) Handles TCDetails.SelectedPageChanged
Update_Status_Label(False, "")
tsButtonEditMode.Enabled = True
tsButtonEdit.Enabled = True
If TCDetails.SelectedTabPage.Text.ToLower.StartsWith("pos") Then
tsButtonEditMode.Enabled = False
tsButtonEdit.Enabled = False
Load_Pos_Data()
Load_POSGrid_Layout()
End If
If TCDetails.SelectedTabPage.Text.ToLower.StartsWith("windr") Then
tsButtonEditMode.Enabled = False
tsButtonEdit.Enabled = False
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.ToLower.StartsWith("wieder") Then
tsButtonEditMode.Enabled = False
If TCDetails.SelectedTabPage.Text.ToLower.StartsWith("wieder") Or TCDetails.SelectedTabPage.Text.ToLower.StartsWith("follo") Then
tsButtonEdit.Enabled = False
Refresh_FollowUps()
dtpFollowUp.Enabled = False
lblWiedervorlage_Control.Text = "<< Waiting for Selection:"
@@ -3056,7 +3169,7 @@ Public Class frmConstructor_Main
End If
End If
If RECORD_ID = 0 Then
MsgBox("Bitte wählen Sie einen Datensatz aus!", MsgBoxStyle.Information)
MsgBox("Please choose a record!", MsgBoxStyle.Information)
Exit Sub
End If
For Each Str As Object In ClassDragDrop.files_dropped
@@ -3183,7 +3296,7 @@ Public Class frmConstructor_Main
ListBoxUser2Profile.DisplayMember = DT.Columns(1).ColumnName
ListBoxUser2Profile.ValueMember = DT.Columns(0).ColumnName
Catch ex As Exception
MsgBox("Fehler bei Load_FUUser:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
MsgBox("Error in Load Follow Up User:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Private Sub dtpWV_ValueChanged(sender As Object, e As EventArgs) Handles dtpFollowUp.ValueChanged
@@ -3401,7 +3514,12 @@ Public Class frmConstructor_Main
Cursor = Cursors.WaitCursor
GridControlMain.MainView.ExportToXlsx(saveFileDialog1.FileName)
Dim result As MsgBoxResult
result = MessageBox.Show("Datei wurde erstellt! Wollen Sie diese nun öffnen?", "Erfolgsmeldung:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
Dim msg = String.Format("Datei wurde erstellt! Wollen Sie diese nun öffnen?")
If USER_LANGUAGE <> "de-DE" Then
msg = String.Format("File was created. Do You want to open excel?")
End If
result = MessageBox.Show(msg, "Exporting result:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If result = MsgBoxResult.Yes Then
Process.Start(saveFileDialog1.FileName)
End If
@@ -3412,16 +3530,19 @@ Public Class frmConstructor_Main
Private Sub frmForm_Constructor_Main_Shown(sender As Object, e As EventArgs) Handles Me.Shown
Dim sw As Stopwatch = Stopwatch.StartNew()
Dim elapsed As Double
Me.BringToFront()
' LoadLayouts()
Load_Level1()
Jump_Record()
sw.Stop()
If LogErrorsOnly = False Then ClassLogger.Add(String.Format(">> Form Shown took {0} milliseconds to load", sw.ElapsedMilliseconds), False)
elapsed = sw.Elapsed.TotalSeconds
If LogErrorsOnly = False Then ClassLogger.Add(String.Format(" >> Form Shown took {0} to load", Format(elapsed, "0.000000000") & " seconds"), False)
End Sub
Sub Jump_Record()
Try
Dim sw As Stopwatch = Stopwatch.StartNew()
Dim elapsed As Double
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)
@@ -3433,8 +3554,9 @@ Public Class frmConstructor_Main
Next
End If
End If
elapsed = sw.Elapsed.TotalSeconds
sw.Stop()
If LogErrorsOnly = False Then ClassLogger.Add(String.Format(">> Jump_Record took {0} milliseconds to load", sw.ElapsedMilliseconds), False)
If LogErrorsOnly = False Then ClassLogger.Add(String.Format(" >> Jump_Record took {0} to load", Format(elapsed, "0.000000000") & " seconds"), False)
Catch ex As Exception
MsgBox("Unexpected error in jump-Record: " & ex.Message, MsgBoxStyle.Critical)
End Try
@@ -3515,11 +3637,19 @@ Public Class frmConstructor_Main
End If
Cursor = Cursors.Default
Else
MsgBox("Bitte wählen Sie nochmal einen Datensatz aus!", MsgBoxStyle.Exclamation)
Dim msg = "Bitte wählen Sie nochmal einen Datensatz aus."
If USER_LANGUAGE <> "de-DE" Then
msg = "Please choose a record again."
End If
MsgBox(msg, MsgBoxStyle.Exclamation)
End If
End If
Else
MsgBox("Bitte wählen Sie zuerst einen Datensatz aus.", MsgBoxStyle.Exclamation)
Dim msg = "Bitte wählen Sie zuerst einen Datensatz aus."
If USER_LANGUAGE <> "de-DE" Then
msg = "Please choose a record first."
End If
MsgBox(msg, MsgBoxStyle.Exclamation)
End If
@@ -3529,6 +3659,7 @@ Public Class frmConstructor_Main
Try
Dim sw As Stopwatch = Stopwatch.StartNew()
Dim elapsed As Double
Dim sql As String = "SELECT * from VWPMO_CONSTRUCTOR_FORMS WHERE PARENT_ID = 0 AND CONSTRUCT_ID = " & CONSTRUCTORID & " AND SCREEN_ID = " & CURRENT_SCREEN_ID & " ORDER BY SEQUENCE"
Dim dt As DataTable = ClassDatabase.Return_Datatable(sql)
@@ -3539,8 +3670,9 @@ Public Class frmConstructor_Main
TreeViewMain.Select()
End If
End If
elapsed = sw.Elapsed.TotalSeconds
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} to load", Format(elapsed, "0.000000000") & " seconds"), False)
Catch ex As Exception
MsgBox("Error in Load_Level1:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
@@ -3576,10 +3708,10 @@ Public Class frmConstructor_Main
' Wenn cId = 0, existiert noch kein wert für diese controlId/FormId Kombination
If cId = 0 Then
ClassControlCommandsUI.InsertControlValue(controlid, POS_RECORD_ID, e.Value)
Update_Status_Label(True, "Datensatz wurde eingefügt", EditState.Insert)
Update_Status_Label(True, "Record was added!", EditState.Insert)
Else
ClassControlCommandsUI.UpdateControlValue(controlid, POS_RECORD_ID, e.Value)
Update_Status_Label(True, "Datensatz wurde aktualisiert", EditState.Update)
Update_Status_Label(True, "Record was updated!", EditState.Update)
End If
Else
Update_Status_Label(False)
@@ -3675,12 +3807,21 @@ Public Class frmConstructor_Main
End Sub
Sub Show_Verknuepfungen()
If SplitContainerBottom.Collapsed = True Then
VerknüpfungenAnzeigenToolStripMenuItem.Text = "Verknüfungen ausblenden"
Dim msg = "Verknüpfungen ausblenden"
If USER_LANGUAGE <> "de-DE" Then
msg = "Hide record-links"
End If
MsgBox(msg, MsgBoxStyle.Exclamation)
VerknüpfungenAnzeigenToolStripMenuItem.Text = msg
Load_ParentConnections()
TCDetails.SelectedTabPageIndex = 0
SplitContainerBottom.Collapsed = False
Else
VerknüpfungenAnzeigenToolStripMenuItem.Text = "Verknüfungen einblenden"
Dim msg = "Verknüpfungen einblenden"
If USER_LANGUAGE <> "de-DE" Then
msg = "Show record-links"
End If
VerknüpfungenAnzeigenToolStripMenuItem.Text = msg
SplitContainerBottom.Collapsed = True
'Save_GridViewParentEntityLayout()
My.Settings.Save()
@@ -3726,7 +3867,7 @@ Public Class frmConstructor_Main
btnRelinkParentID.Enabled = False
btnRelinkParentID.BackColor = Color.WhiteSmoke
btnRelinkParentID.FlatAppearance.BorderColor = Color.WhiteSmoke
ClassLogger.Add(">> Grid_RecordID konnte nicht gewählt werden - GetFocusedParentID", True)
ClassLogger.Add(">> Grid_RecordID koncould not be chosen - GetFocusedParentID", True)
' lblParentID.Text = "keine Auswahl möglich"
End If
Else
@@ -3743,7 +3884,11 @@ Public Class frmConstructor_Main
Private Sub btnRelinkParentID_Click(sender As Object, e As EventArgs) Handles btnRelinkParentID.Click
If PARENT_ID > 0 Then
Dim result As MsgBoxResult
result = MessageBox.Show("Möchten Sie den Parent-Datensatz für den aktuellen Datensatz wirklich aktualisieren?", "Bestätigung erforderlich:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
Dim msg = "Möchten Sie den Parent-Datensatz für den aktuellen Datensatz wirklich aktualisieren?"
If USER_LANGUAGE <> "de-DE" Then
msg = "Would You like to change the parent-record?"
End If
result = MessageBox.Show(msg, "Change parent-record:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If result <> MsgBoxResult.Yes Then
Exit Sub
Else
@@ -3755,7 +3900,11 @@ Public Class frmConstructor_Main
End If
If ClassControlCommandsUI.ConnectRecord(LinkParentID, RECORD_ID, "ReLInk ENTITY " & ENTITY_ID.ToString) = True Then
'Save_GridViewParentEntityLayout()
MsgBox("Die Parent-Entität wurde erfolgreich aktualisiert!", MsgBoxStyle.Information)
Dim msg = "Die Parent-Entität wurde erfolgreich aktualisiert!"
If USER_LANGUAGE <> "de-DE" Then
msg = "The Parent-Record was changed successful!"
End If
MsgBox(msg, MsgBoxStyle.Information)
Check_Record_Changed()
'Load_Data_for_TreeView()
btnRelinkParentID.BackColor = Color.Lime
@@ -3767,7 +3916,11 @@ Public Class frmConstructor_Main
Private Sub RecordKopierenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles RecordKopierenToolStripMenuItem.Click
Dim result As MsgBoxResult
result = MessageBox.Show("Möchten Sie den Datensatz wirklich kopieren?", "Bestätigung erforderlich:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
Dim 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 PRDD_COPY_RECORD {0}, '{1}'", RECORD_ID, Environment.UserName)
If ClassDatabase.Execute_non_Query(SQL, True) = True Then
@@ -3784,7 +3937,11 @@ Public Class frmConstructor_Main
Private Sub AnwendungscacheFreigebenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AnwendungscacheFreigebenToolStripMenuItem.Click
Dim result As MsgBoxResult
result = MessageBox.Show("Möchten Sie den Anwendungscache wirklich leeren?" & vbNewLine & "Die Entität wird dann automatisch neugeladen!", "Bestätigung erforderlich:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
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
@@ -3799,15 +3956,17 @@ Public Class frmConstructor_Main
Cursor = Cursors.Default
End Try
End If
End Sub
Private Sub grvwGrid_ColumnFilterChanged(sender As Object, e As EventArgs) Handles grvwGrid.ColumnFilterChanged
Console.WriteLine("Filter changed: " & Now)
End Sub
Public Sub New()
' Dieser Aufruf ist für den Designer erforderlich.
InitializeComponent()
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
Private Sub ToolStripButton1_Click(sender As Object, e As EventArgs)
MsgBox(grvwGrid.ActiveFilterString)
End Sub
End Class