diff --git a/app/DD_PM_WINDREAM/DD_DMSLiteDataSet.Designer.vb b/app/DD_PM_WINDREAM/DD_DMSLiteDataSet.Designer.vb index ee265df..af7e4e0 100644 --- a/app/DD_PM_WINDREAM/DD_DMSLiteDataSet.Designer.vb +++ b/app/DD_PM_WINDREAM/DD_DMSLiteDataSet.Designer.vb @@ -7025,14 +7025,17 @@ Partial Public Class DD_DMSLiteDataSet Me.columnCHOICE_LIST.MaxLength = 50 Me.columnSQL_COMMAND.MaxLength = 2000 Me.columnREAD_ONLY.AllowDBNull = false + Me.columnREAD_ONLY.DefaultValue = CType(false,Boolean) Me.columnLOAD_IDX_VALUE.AllowDBNull = false Me.columnADDED_WHO.AllowDBNull = false Me.columnADDED_WHO.MaxLength = 30 Me.columnADDED_WHEN.AllowDBNull = false Me.columnCHANGED_WHO.MaxLength = 30 Me.columnREGEX_MATCH.AllowDBNull = false + Me.columnREGEX_MATCH.DefaultValue = CType("",String) Me.columnREGEX_MATCH.MaxLength = 1000 Me.columnREGEX_MESSAGE_EN.AllowDBNull = false + Me.columnREGEX_MESSAGE_EN.DefaultValue = CType("No Message",String) Me.columnREGEX_MESSAGE_EN.MaxLength = 1000 Me.columnREGEX_MESSAGE_DE.AllowDBNull = false Me.columnREGEX_MESSAGE_DE.MaxLength = 1000 @@ -21388,7 +21391,10 @@ Namespace DD_DMSLiteDataSetTableAdapters Me._commandCollection(2).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CONTROL_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "CONTROL_ID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) Me._commandCollection(3) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(3).Connection = Me.Connection - Me._commandCollection(3).CommandText = "SELECT *"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM TBPM_CONTROL_TABLE" + Me._commandCollection(3).CommandText = "SELECT GUID, CONTROL_ID, SPALTENNAME, SPALTEN_HEADER, SPALTENBREITE, VALID"& _ + "ATION, CHOICE_LIST, CONNECTION_ID, SQL_COMMAND, READ_ONLY, LOAD_IDX_VALUE, ADDED"& _ + "_WHO, ADDED_WHEN, CHANGED_WHO, "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" CHANGED_WHEN, REGEX_MA"& _ + "TCH, REGEX_MESSAGE_EN, REGEX_MESSAGE_DE"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM TBPM_CONTROL_TABLE" Me._commandCollection(3).CommandType = Global.System.Data.CommandType.Text Me._commandCollection(4) = New Global.System.Data.SqlClient.SqlCommand() Me._commandCollection(4).Connection = Me.Connection diff --git a/app/DD_PM_WINDREAM/DD_DMSLiteDataSet.xsc b/app/DD_PM_WINDREAM/DD_DMSLiteDataSet.xsc index f740567..841d30e 100644 --- a/app/DD_PM_WINDREAM/DD_DMSLiteDataSet.xsc +++ b/app/DD_PM_WINDREAM/DD_DMSLiteDataSet.xsc @@ -65,25 +65,19 @@ - - + - - + - - + - - + - - + - - + diff --git a/app/DD_PM_WINDREAM/DD_DMSLiteDataSet.xsd b/app/DD_PM_WINDREAM/DD_DMSLiteDataSet.xsd index dbda0c5..297b8c9 100644 --- a/app/DD_PM_WINDREAM/DD_DMSLiteDataSet.xsd +++ b/app/DD_PM_WINDREAM/DD_DMSLiteDataSet.xsd @@ -1925,7 +1925,8 @@ WHERE (CONTROL_ID = @CONTROL_ID) - SELECT * + SELECT GUID, CONTROL_ID, SPALTENNAME, SPALTEN_HEADER, SPALTENBREITE, VALIDATION, CHOICE_LIST, CONNECTION_ID, SQL_COMMAND, READ_ONLY, LOAD_IDX_VALUE, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, + CHANGED_WHEN, REGEX_MATCH, REGEX_MESSAGE_EN, REGEX_MESSAGE_DE FROM TBPM_CONTROL_TABLE @@ -2095,7 +2096,7 @@ FROM dbo.FNPM_GET_FREE_USER_FOR_PROFILE(@PROFILE_ID) AS FNPM_GET_FREE - + @@ -2148,7 +2149,7 @@ FROM dbo.FNPM_GET_FREE_USER_FOR_PROFILE(@PROFILE_ID) AS FNPM_GET_FREE - + @@ -2244,7 +2245,7 @@ FROM dbo.FNPM_GET_FREE_USER_FOR_PROFILE(@PROFILE_ID) AS FNPM_GET_FREE - + @@ -2309,7 +2310,7 @@ FROM dbo.FNPM_GET_FREE_USER_FOR_PROFILE(@PROFILE_ID) AS FNPM_GET_FREE - + @@ -2339,7 +2340,7 @@ FROM dbo.FNPM_GET_FREE_USER_FOR_PROFILE(@PROFILE_ID) AS FNPM_GET_FREE - + @@ -2362,7 +2363,7 @@ FROM dbo.FNPM_GET_FREE_USER_FOR_PROFILE(@PROFILE_ID) AS FNPM_GET_FREE - + @@ -2473,7 +2474,7 @@ FROM dbo.FNPM_GET_FREE_USER_FOR_PROFILE(@PROFILE_ID) AS FNPM_GET_FREE - + @@ -2546,7 +2547,7 @@ FROM dbo.FNPM_GET_FREE_USER_FOR_PROFILE(@PROFILE_ID) AS FNPM_GET_FREE - + @@ -2595,7 +2596,7 @@ FROM dbo.FNPM_GET_FREE_USER_FOR_PROFILE(@PROFILE_ID) AS FNPM_GET_FREE - + @@ -2610,7 +2611,7 @@ FROM dbo.FNPM_GET_FREE_USER_FOR_PROFILE(@PROFILE_ID) AS FNPM_GET_FREE - + @@ -2631,7 +2632,7 @@ FROM dbo.FNPM_GET_FREE_USER_FOR_PROFILE(@PROFILE_ID) AS FNPM_GET_FREE - + @@ -2739,7 +2740,7 @@ FROM dbo.FNPM_GET_FREE_USER_FOR_PROFILE(@PROFILE_ID) AS FNPM_GET_FREE - + @@ -2812,7 +2813,7 @@ FROM dbo.FNPM_GET_FREE_USER_FOR_PROFILE(@PROFILE_ID) AS FNPM_GET_FREE - + @@ -2863,7 +2864,7 @@ FROM dbo.FNPM_GET_FREE_USER_FOR_PROFILE(@PROFILE_ID) AS FNPM_GET_FREE - + @@ -2979,7 +2980,7 @@ FROM dbo.FNPM_GET_FREE_USER_FOR_PROFILE(@PROFILE_ID) AS FNPM_GET_FREE - + @@ -3015,7 +3016,7 @@ FROM dbo.FNPM_GET_FREE_USER_FOR_PROFILE(@PROFILE_ID) AS FNPM_GET_FREE - + @@ -3033,14 +3034,14 @@ FROM dbo.FNPM_GET_FREE_USER_FOR_PROFILE(@PROFILE_ID) AS FNPM_GET_FREE - + - + @@ -3057,7 +3058,7 @@ FROM dbo.FNPM_GET_FREE_USER_FOR_PROFILE(@PROFILE_ID) AS FNPM_GET_FREE - + @@ -3098,7 +3099,7 @@ FROM dbo.FNPM_GET_FREE_USER_FOR_PROFILE(@PROFILE_ID) AS FNPM_GET_FREE - + @@ -3136,7 +3137,7 @@ FROM dbo.FNPM_GET_FREE_USER_FOR_PROFILE(@PROFILE_ID) AS FNPM_GET_FREE - + @@ -3271,11 +3272,11 @@ FROM dbo.FNPM_GET_FREE_USER_FOR_PROFILE(@PROFILE_ID) AS FNPM_GET_FREE - - - - - + + + + + \ No newline at end of file diff --git a/app/DD_PM_WINDREAM/DD_DMSLiteDataSet.xss b/app/DD_PM_WINDREAM/DD_DMSLiteDataSet.xss index 6fffa86..191d9b7 100644 --- a/app/DD_PM_WINDREAM/DD_DMSLiteDataSet.xss +++ b/app/DD_PM_WINDREAM/DD_DMSLiteDataSet.xss @@ -4,7 +4,7 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + diff --git a/app/DD_PM_WINDREAM/clsWMDocGrid.vb b/app/DD_PM_WINDREAM/clsWMDocGrid.vb index d4061c0..e8b62ca 100644 --- a/app/DD_PM_WINDREAM/clsWMDocGrid.vb +++ b/app/DD_PM_WINDREAM/clsWMDocGrid.vb @@ -53,15 +53,12 @@ Public Class clsWMDocGrid '_Helper = New ClassHelper SELECTED_DOC_ID = 0 If Init_Table() = True Then - - SELECTED_DOC_ID = 0 LOGGER.Debug("gridView.SelectedRowsCount: " & ActiveDocGrid.SelectedRowsCount.ToString) If ActiveDocGrid.SelectedRowsCount >= 1 Then DTDocuments.Clear() For Each row In ActiveDocGrid.GetSelectedRows Dim newRow As DataRow = DTDocuments.NewRow() Try - Dim DOC_ID = ActiveDocGrid.GetRowCellValue(row, "DocID") SELECTED_DOC_ID = DOC_ID newRow("DOC_ID") = ActiveDocGrid.GetRowCellValue(row, "DocID") diff --git a/app/DD_PM_WINDREAM/frmAdministration.vb b/app/DD_PM_WINDREAM/frmAdministration.vb index 78ff6ef..78abe34 100644 --- a/app/DD_PM_WINDREAM/frmAdministration.vb +++ b/app/DD_PM_WINDREAM/frmAdministration.vb @@ -668,17 +668,12 @@ Public Class frmAdministration If result = MsgBoxResult.Yes Then Try Dim profileID = PROFILGUIDTextBox.Text - Dim del As String = "delete from TBPM_CONTROL_TABLE where CONTROL_ID in (SELECT GUID FROM TBPM_PROFILE_CONTROLS where PROFIL_ID = " & profileID & ")" - ClassDatabase.Execute_non_Query(del) - TBPM_ERROR_LOGTableAdapter.DeletePROFIL(profileID) - TBPM_PROFILE_FILESTableAdapter.cmdDeleteProfilData(profileID) - TBPM_PROFILE_FINAL_INDEXINGTableAdapter.DeleteFinalIndex(profileID) - TBPM_PROFILE_CONTROLSTableAdapter.cmdDeleteProfil(profileID) - TBPROFILE_USERTableAdapter.cmdDeleteAllForProfile(profileID) - TBPROFILE_GROUPTableAdapter.CmdDeleteAllForProfile(profileID) - TBPM_PROFILETableAdapter.cmdDelete(profileID) - MsgBox("Das Profil " & NAMETextBox.Text & " wurde erfolgreich gelöscht!", MsgBoxStyle.Information, "Erfolgsmeldung") - Refresh_Profildaten() + Dim del As String = $"EXEC PRPM_DELETE_PROFILE {profileID}" + If ClassDatabase.Execute_non_Query(del) = True Then + MsgBox("Das Profil " & NAMETextBox.Text & " wurde erfolgreich gelöscht!", MsgBoxStyle.Information, "Erfolgsmeldung") + Refresh_Profildaten() + End If + Catch ex As Exception LOGGER.Error(ex) MsgBox("Fehler bei Löschen des Profils:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler:") diff --git a/app/DD_PM_WINDREAM/frmMain.Designer.vb b/app/DD_PM_WINDREAM/frmMain.Designer.vb index a667315..cfab5e6 100644 --- a/app/DD_PM_WINDREAM/frmMain.Designer.vb +++ b/app/DD_PM_WINDREAM/frmMain.Designer.vb @@ -56,18 +56,6 @@ Partial Class frmMain Me.tsslblLastSysnc = New System.Windows.Forms.ToolStripStatusLabel() Me.tslblmessage = New System.Windows.Forms.ToolStripStatusLabel() Me.Panel1 = New System.Windows.Forms.Panel() - Me.pnlNavigator = New System.Windows.Forms.Panel() - Me.BindingNavigator1 = New System.Windows.Forms.BindingNavigator(Me.components) - Me.bindsourcegrid = New System.Windows.Forms.BindingSource(Me.components) - Me.BindingNavigatorCountItem = New System.Windows.Forms.ToolStripLabel() - Me.BindingNavigatorMoveFirstItem = New System.Windows.Forms.ToolStripButton() - Me.BindingNavigatorMovePreviousItem = New System.Windows.Forms.ToolStripButton() - Me.BindingNavigatorSeparator = New System.Windows.Forms.ToolStripSeparator() - Me.BindingNavigatorPositionItem = New System.Windows.Forms.ToolStripTextBox() - Me.BindingNavigatorSeparator1 = New System.Windows.Forms.ToolStripSeparator() - Me.BindingNavigatorMoveNextItem = New System.Windows.Forms.ToolStripButton() - Me.BindingNavigatorMoveLastItem = New System.Windows.Forms.ToolStripButton() - Me.BindingNavigatorSeparator2 = New System.Windows.Forms.ToolStripSeparator() Me.GridControl_Docs = New DevExpress.XtraGrid.GridControl() Me.ContextMenuGrid = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.CMGroupStart = New System.Windows.Forms.ToolStripMenuItem() @@ -76,7 +64,18 @@ Partial Class frmMain Me.tsmiMarkedFilesFinish = New System.Windows.Forms.ToolStripMenuItem() Me.GroupToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.GridView_Docs = New DevExpress.XtraGrid.Views.Grid.GridView() - Me.lblViewType = New System.Windows.Forms.Label() + Me.BindingNavigator1 = New System.Windows.Forms.BindingNavigator(Me.components) + Me.bindsourcegrid = New System.Windows.Forms.BindingSource(Me.components) + Me.BindingNavigatorCountItem = New System.Windows.Forms.ToolStripLabel() + Me.ToolStripLabelViewTape = New System.Windows.Forms.ToolStripLabel() + Me.BindingNavigatorSeparator2 = New System.Windows.Forms.ToolStripSeparator() + Me.BindingNavigatorMoveFirstItem = New System.Windows.Forms.ToolStripButton() + Me.BindingNavigatorMovePreviousItem = New System.Windows.Forms.ToolStripButton() + Me.BindingNavigatorSeparator = New System.Windows.Forms.ToolStripSeparator() + Me.BindingNavigatorPositionItem = New System.Windows.Forms.ToolStripTextBox() + Me.BindingNavigatorSeparator1 = New System.Windows.Forms.ToolStripSeparator() + Me.BindingNavigatorMoveNextItem = New System.Windows.Forms.ToolStripButton() + Me.BindingNavigatorMoveLastItem = New System.Windows.Forms.ToolStripButton() Me.NavBarControl1 = New DevExpress.XtraNavBar.NavBarControl() Me.NavBarGroupProfiles = New DevExpress.XtraNavBar.NavBarGroup() Me.cmsNavPane = New System.Windows.Forms.ContextMenuStrip(Me.components) @@ -114,13 +113,12 @@ Partial Class frmMain Me.ToolStrip1.SuspendLayout() Me.StatusStrip1.SuspendLayout() Me.Panel1.SuspendLayout() - Me.pnlNavigator.SuspendLayout() - CType(Me.BindingNavigator1, System.ComponentModel.ISupportInitialize).BeginInit() - Me.BindingNavigator1.SuspendLayout() - CType(Me.bindsourcegrid, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.GridControl_Docs, System.ComponentModel.ISupportInitialize).BeginInit() Me.ContextMenuGrid.SuspendLayout() CType(Me.GridView_Docs, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.BindingNavigator1, System.ComponentModel.ISupportInitialize).BeginInit() + Me.BindingNavigator1.SuspendLayout() + CType(Me.bindsourcegrid, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.NavBarControl1, System.ComponentModel.ISupportInitialize).BeginInit() Me.cmsNavPane.SuspendLayout() CType(Me.TBPM_USERBindingSource, System.ComponentModel.ISupportInitialize).BeginInit() @@ -374,91 +372,19 @@ Partial Class frmMain ' 'Panel1 ' - Me.Panel1.Controls.Add(Me.pnlNavigator) Me.Panel1.Controls.Add(Me.GridControl_Docs) - Me.Panel1.Controls.Add(Me.lblViewType) + Me.Panel1.Controls.Add(Me.BindingNavigator1) Me.Panel1.Controls.Add(Me.NavBarControl1) Me.Panel1.Controls.Add(Me.ToolStrip1) + Me.Panel1.Controls.Add(Me.StatusStrip1) Me.Panel1.Controls.Add(Me.SplitContainerDashboard) resources.ApplyResources(Me.Panel1, "Panel1") Me.Panel1.Name = "Panel1" ' - 'pnlNavigator - ' - resources.ApplyResources(Me.pnlNavigator, "pnlNavigator") - Me.pnlNavigator.Controls.Add(Me.BindingNavigator1) - Me.pnlNavigator.Name = "pnlNavigator" - ' - 'BindingNavigator1 - ' - Me.BindingNavigator1.AddNewItem = Nothing - Me.BindingNavigator1.BindingSource = Me.bindsourcegrid - Me.BindingNavigator1.CountItem = Me.BindingNavigatorCountItem - Me.BindingNavigator1.CountItemFormat = "von {0} Dateien" - Me.BindingNavigator1.DeleteItem = Nothing - resources.ApplyResources(Me.BindingNavigator1, "BindingNavigator1") - Me.BindingNavigator1.ImageScalingSize = New System.Drawing.Size(20, 20) - Me.BindingNavigator1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.BindingNavigatorMoveFirstItem, Me.BindingNavigatorMovePreviousItem, Me.BindingNavigatorSeparator, Me.BindingNavigatorPositionItem, Me.BindingNavigatorCountItem, Me.BindingNavigatorSeparator1, Me.BindingNavigatorMoveNextItem, Me.BindingNavigatorMoveLastItem, Me.BindingNavigatorSeparator2}) - Me.BindingNavigator1.MoveFirstItem = Me.BindingNavigatorMoveFirstItem - Me.BindingNavigator1.MoveLastItem = Me.BindingNavigatorMoveLastItem - Me.BindingNavigator1.MoveNextItem = Me.BindingNavigatorMoveNextItem - Me.BindingNavigator1.MovePreviousItem = Me.BindingNavigatorMovePreviousItem - Me.BindingNavigator1.Name = "BindingNavigator1" - Me.BindingNavigator1.PositionItem = Me.BindingNavigatorPositionItem - ' - 'BindingNavigatorCountItem - ' - Me.BindingNavigatorCountItem.Name = "BindingNavigatorCountItem" - resources.ApplyResources(Me.BindingNavigatorCountItem, "BindingNavigatorCountItem") - ' - 'BindingNavigatorMoveFirstItem - ' - Me.BindingNavigatorMoveFirstItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image - resources.ApplyResources(Me.BindingNavigatorMoveFirstItem, "BindingNavigatorMoveFirstItem") - Me.BindingNavigatorMoveFirstItem.Name = "BindingNavigatorMoveFirstItem" - ' - 'BindingNavigatorMovePreviousItem - ' - Me.BindingNavigatorMovePreviousItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image - resources.ApplyResources(Me.BindingNavigatorMovePreviousItem, "BindingNavigatorMovePreviousItem") - Me.BindingNavigatorMovePreviousItem.Name = "BindingNavigatorMovePreviousItem" - ' - 'BindingNavigatorSeparator - ' - Me.BindingNavigatorSeparator.Name = "BindingNavigatorSeparator" - resources.ApplyResources(Me.BindingNavigatorSeparator, "BindingNavigatorSeparator") - ' - 'BindingNavigatorPositionItem - ' - resources.ApplyResources(Me.BindingNavigatorPositionItem, "BindingNavigatorPositionItem") - Me.BindingNavigatorPositionItem.Name = "BindingNavigatorPositionItem" - ' - 'BindingNavigatorSeparator1 - ' - Me.BindingNavigatorSeparator1.Name = "BindingNavigatorSeparator1" - resources.ApplyResources(Me.BindingNavigatorSeparator1, "BindingNavigatorSeparator1") - ' - 'BindingNavigatorMoveNextItem - ' - Me.BindingNavigatorMoveNextItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image - resources.ApplyResources(Me.BindingNavigatorMoveNextItem, "BindingNavigatorMoveNextItem") - Me.BindingNavigatorMoveNextItem.Name = "BindingNavigatorMoveNextItem" - ' - 'BindingNavigatorMoveLastItem - ' - Me.BindingNavigatorMoveLastItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image - resources.ApplyResources(Me.BindingNavigatorMoveLastItem, "BindingNavigatorMoveLastItem") - Me.BindingNavigatorMoveLastItem.Name = "BindingNavigatorMoveLastItem" - ' - 'BindingNavigatorSeparator2 - ' - Me.BindingNavigatorSeparator2.Name = "BindingNavigatorSeparator2" - resources.ApplyResources(Me.BindingNavigatorSeparator2, "BindingNavigatorSeparator2") - ' 'GridControl_Docs ' - resources.ApplyResources(Me.GridControl_Docs, "GridControl_Docs") Me.GridControl_Docs.ContextMenuStrip = Me.ContextMenuGrid + resources.ApplyResources(Me.GridControl_Docs, "GridControl_Docs") Me.GridControl_Docs.MainView = Me.GridView_Docs Me.GridControl_Docs.Name = "GridControl_Docs" Me.GridControl_Docs.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView_Docs}) @@ -503,7 +429,9 @@ Partial Class frmMain Me.GridView_Docs.Appearance.EvenRow.Options.UseBackColor = True Me.GridView_Docs.GridControl = Me.GridControl_Docs Me.GridView_Docs.Name = "GridView_Docs" - Me.GridView_Docs.OptionsBehavior.AllowAddRows = DevExpress.Utils.DefaultBoolean.[True] + Me.GridView_Docs.OptionsBehavior.AllowAddRows = DevExpress.Utils.DefaultBoolean.[False] + Me.GridView_Docs.OptionsBehavior.AllowDeleteRows = DevExpress.Utils.DefaultBoolean.[False] + Me.GridView_Docs.OptionsBehavior.AllowFixedGroups = DevExpress.Utils.DefaultBoolean.[True] Me.GridView_Docs.OptionsBehavior.Editable = False Me.GridView_Docs.OptionsSelection.MultiSelect = True Me.GridView_Docs.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.CheckBoxRowSelect @@ -511,18 +439,83 @@ Partial Class frmMain Me.GridView_Docs.OptionsView.EnableAppearanceEvenRow = True Me.GridView_Docs.OptionsView.ShowAutoFilterRow = True ' - 'lblViewType + 'BindingNavigator1 ' - resources.ApplyResources(Me.lblViewType, "lblViewType") - Me.lblViewType.BackColor = System.Drawing.SystemColors.Control - Me.lblViewType.Name = "lblViewType" + Me.BindingNavigator1.AddNewItem = Nothing + Me.BindingNavigator1.BindingSource = Me.bindsourcegrid + Me.BindingNavigator1.CountItem = Me.BindingNavigatorCountItem + Me.BindingNavigator1.CountItemFormat = "von {0} Dateien" + Me.BindingNavigator1.DeleteItem = Nothing + Me.BindingNavigator1.ImageScalingSize = New System.Drawing.Size(20, 20) + Me.BindingNavigator1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripLabelViewTape, Me.BindingNavigatorSeparator2, Me.BindingNavigatorMoveFirstItem, Me.BindingNavigatorMovePreviousItem, Me.BindingNavigatorSeparator, Me.BindingNavigatorPositionItem, Me.BindingNavigatorCountItem, Me.BindingNavigatorSeparator1, Me.BindingNavigatorMoveNextItem, Me.BindingNavigatorMoveLastItem}) + resources.ApplyResources(Me.BindingNavigator1, "BindingNavigator1") + Me.BindingNavigator1.MoveFirstItem = Me.BindingNavigatorMoveFirstItem + Me.BindingNavigator1.MoveLastItem = Me.BindingNavigatorMoveLastItem + Me.BindingNavigator1.MoveNextItem = Me.BindingNavigatorMoveNextItem + Me.BindingNavigator1.MovePreviousItem = Me.BindingNavigatorMovePreviousItem + Me.BindingNavigator1.Name = "BindingNavigator1" + Me.BindingNavigator1.PositionItem = Me.BindingNavigatorPositionItem + ' + 'BindingNavigatorCountItem + ' + Me.BindingNavigatorCountItem.Name = "BindingNavigatorCountItem" + resources.ApplyResources(Me.BindingNavigatorCountItem, "BindingNavigatorCountItem") + ' + 'ToolStripLabelViewTape + ' + resources.ApplyResources(Me.ToolStripLabelViewTape, "ToolStripLabelViewTape") + Me.ToolStripLabelViewTape.Name = "ToolStripLabelViewTape" + ' + 'BindingNavigatorSeparator2 + ' + Me.BindingNavigatorSeparator2.Name = "BindingNavigatorSeparator2" + resources.ApplyResources(Me.BindingNavigatorSeparator2, "BindingNavigatorSeparator2") + ' + 'BindingNavigatorMoveFirstItem + ' + Me.BindingNavigatorMoveFirstItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image + resources.ApplyResources(Me.BindingNavigatorMoveFirstItem, "BindingNavigatorMoveFirstItem") + Me.BindingNavigatorMoveFirstItem.Name = "BindingNavigatorMoveFirstItem" + ' + 'BindingNavigatorMovePreviousItem + ' + Me.BindingNavigatorMovePreviousItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image + resources.ApplyResources(Me.BindingNavigatorMovePreviousItem, "BindingNavigatorMovePreviousItem") + Me.BindingNavigatorMovePreviousItem.Name = "BindingNavigatorMovePreviousItem" + ' + 'BindingNavigatorSeparator + ' + Me.BindingNavigatorSeparator.Name = "BindingNavigatorSeparator" + resources.ApplyResources(Me.BindingNavigatorSeparator, "BindingNavigatorSeparator") + ' + 'BindingNavigatorPositionItem + ' + resources.ApplyResources(Me.BindingNavigatorPositionItem, "BindingNavigatorPositionItem") + Me.BindingNavigatorPositionItem.Name = "BindingNavigatorPositionItem" + ' + 'BindingNavigatorSeparator1 + ' + Me.BindingNavigatorSeparator1.Name = "BindingNavigatorSeparator1" + resources.ApplyResources(Me.BindingNavigatorSeparator1, "BindingNavigatorSeparator1") + ' + 'BindingNavigatorMoveNextItem + ' + Me.BindingNavigatorMoveNextItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image + resources.ApplyResources(Me.BindingNavigatorMoveNextItem, "BindingNavigatorMoveNextItem") + Me.BindingNavigatorMoveNextItem.Name = "BindingNavigatorMoveNextItem" + ' + 'BindingNavigatorMoveLastItem + ' + Me.BindingNavigatorMoveLastItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image + resources.ApplyResources(Me.BindingNavigatorMoveLastItem, "BindingNavigatorMoveLastItem") + Me.BindingNavigatorMoveLastItem.Name = "BindingNavigatorMoveLastItem" ' 'NavBarControl1 ' Me.NavBarControl1.ActiveGroup = Me.NavBarGroupProfiles Me.NavBarControl1.ContextMenuStrip = Me.cmsNavPane resources.ApplyResources(Me.NavBarControl1, "NavBarControl1") - Me.NavBarControl1.Groups.AddRange(New DevExpress.XtraNavBar.NavBarGroup() {Me.NavBarGroupProfiles, Me.NavBarGroupMore}) + Me.NavBarControl1.Groups.AddRange(New DevExpress.XtraNavBar.NavBarGroup() {Me.NavBarGroupMore, Me.NavBarGroupProfiles}) Me.NavBarControl1.Items.AddRange(New DevExpress.XtraNavBar.NavBarItem() {Me.NavBarItemOverview, Me.NavBarItemDashboard}) Me.NavBarControl1.Name = "NavBarControl1" Me.NavBarControl1.OptionsNavPane.ExpandedWidth = CType(resources.GetObject("resource.ExpandedWidth"), Integer) @@ -617,7 +610,6 @@ Partial Class frmMain resources.ApplyResources(Me, "$this") Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.Controls.Add(Me.Panel1) - Me.Controls.Add(Me.StatusStrip1) Me.KeyPreview = True Me.Name = "frmMain" Me.SplitContainerDashboard.Panel1.ResumeLayout(False) @@ -648,22 +640,19 @@ Partial Class frmMain Me.StatusStrip1.PerformLayout() Me.Panel1.ResumeLayout(False) Me.Panel1.PerformLayout() - Me.pnlNavigator.ResumeLayout(False) - Me.pnlNavigator.PerformLayout() + CType(Me.GridControl_Docs, System.ComponentModel.ISupportInitialize).EndInit() + Me.ContextMenuGrid.ResumeLayout(False) + CType(Me.GridView_Docs, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.BindingNavigator1, System.ComponentModel.ISupportInitialize).EndInit() Me.BindingNavigator1.ResumeLayout(False) Me.BindingNavigator1.PerformLayout() CType(Me.bindsourcegrid, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.GridControl_Docs, System.ComponentModel.ISupportInitialize).EndInit() - Me.ContextMenuGrid.ResumeLayout(False) - CType(Me.GridView_Docs, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.NavBarControl1, System.ComponentModel.ISupportInitialize).EndInit() Me.cmsNavPane.ResumeLayout(False) CType(Me.TBPM_USERBindingSource, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.TBPM_KONFIGURATIONBindingSource, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.TBPM_PROFILE_FILESBindingSource, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) - Me.PerformLayout() End Sub Friend WithEvents DD_DMSLiteDataSet As DD_PM_WINDREAM.DD_DMSLiteDataSet @@ -701,7 +690,6 @@ Partial Class frmMain Friend WithEvents NavBarGroupMore As DevExpress.XtraNavBar.NavBarGroup Friend WithEvents NavBarItemOverview As DevExpress.XtraNavBar.NavBarItem Friend WithEvents NavBarItemDashboard As DevExpress.XtraNavBar.NavBarItem - Friend WithEvents lblViewType As Label Friend WithEvents tsslblLastSysnc As ToolStripStatusLabel Friend WithEvents cmsNavPane As ContextMenuStrip Friend WithEvents tsmiValidationProfil As ToolStripMenuItem @@ -722,7 +710,6 @@ Partial Class frmMain Friend WithEvents tsmiMarkedFilesFinish As ToolStripMenuItem Friend WithEvents GridControl_Docs As DevExpress.XtraGrid.GridControl Friend WithEvents GridView_Docs As DevExpress.XtraGrid.Views.Grid.GridView - Friend WithEvents pnlNavigator As Panel Friend WithEvents BindingNavigator1 As BindingNavigator Friend WithEvents BindingNavigatorCountItem As ToolStripLabel Friend WithEvents BindingNavigatorMoveFirstItem As ToolStripButton @@ -735,4 +722,5 @@ Partial Class frmMain Friend WithEvents BindingNavigatorSeparator2 As ToolStripSeparator Friend WithEvents bindsourcegrid As BindingSource Friend WithEvents GroupToolStripMenuItem As ToolStripMenuItem + Friend WithEvents ToolStripLabelViewTape As ToolStripLabel End Class diff --git a/app/DD_PM_WINDREAM/frmMain.resx b/app/DD_PM_WINDREAM/frmMain.resx index 9c5466d..b5087dc 100644 --- a/app/DD_PM_WINDREAM/frmMain.resx +++ b/app/DD_PM_WINDREAM/frmMain.resx @@ -123,7 +123,7 @@ - 242, 61 + 325, 118 Horizontal @@ -141,7 +141,7 @@ 0, 25 - 256, 234 + 228, 199 @@ -166,7 +166,7 @@ 0, 0 - 256, 25 + 228, 25 1 @@ -205,7 +205,7 @@ 0, 25 - 518, 234 + 463, 199 1 @@ -229,7 +229,7 @@ 0, 0 - 518, 25 + 463, 25 0 @@ -262,10 +262,10 @@ 1 - 778, 259 + 695, 224 - 256 + 228 0 @@ -307,7 +307,7 @@ 0, 25 - 256, 146 + 228, 124 1 @@ -331,7 +331,7 @@ 0, 0 - 256, 25 + 228, 25 0 @@ -370,7 +370,7 @@ 0, 25 - 518, 146 + 463, 124 1 @@ -394,7 +394,7 @@ 0, 0 - 518, 25 + 463, 25 0 @@ -427,10 +427,10 @@ 1 - 778, 171 + 695, 149 - 256 + 228 0 @@ -460,10 +460,10 @@ 1 - 778, 434 + 695, 377 - 259 + 224 7 @@ -488,7 +488,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADw - CAAAAk1TRnQBSQFMAgEBAgEAAcwBAwHMAQMBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + CAAAAk1TRnQBSQFMAgEBAgEAAfwBAwH8AQMBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA @@ -547,6 +547,30 @@ Tahoma, 9pt + + 0, 0 + + + 1023, 27 + + + 2 + + + ToolStrip1 + + + ToolStrip1 + + + System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Panel1 + + + 3 + Segoe UI, 9pt, style=Bold, Italic @@ -604,36 +628,36 @@ Aktualisieren - - 0, 0 - - - 1023, 27 - - - 2 - - - ToolStrip1 - - - ToolStrip1 - - - System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Panel1 - - - 4 - 1015, 17 Tahoma, 9pt + + 0, 498 + + + 1023, 29 + + + 3 + + + StatusStrip1 + + + StatusStrip1 + + + System.Windows.Forms.StatusStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Panel1 + + + 4 + 150, 24 @@ -679,32 +703,41 @@ 0, 24 - - 0, 498 + + 152, 95 + + + 270, 134 - - 1023, 29 + + ContextMenuGrid - - 3 + + System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - StatusStrip1 + + 242, 87 - - StatusStrip1 + + LightBlue - - System.Windows.Forms.StatusStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 631, 380 - - $this + + 8 - - 3 + + GridControl_Docs - - Top, Left, Right + + DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + Panel1 + + + 0 1047, 95 @@ -713,7 +746,7 @@ 1201, 95 - 87, 22 + 87, 24 von {0} Dateien @@ -721,8 +754,17 @@ Die Gesamtanzahl der Elemente. - - Fill + + Segoe UI, 9pt, style=Bold + + + 61, 24 + + + ViewType + + + 6, 27 @@ -739,7 +781,7 @@ True - 24, 22 + 24, 24 Erste verschieben @@ -757,13 +799,13 @@ True - 24, 22 + 24, 24 Vorherige verschieben - 6, 25 + 6, 27 Position @@ -781,7 +823,7 @@ Aktuelle Position - 6, 25 + 6, 27 @@ -796,7 +838,7 @@ True - 24, 22 + 24, 24 Nächste verschieben @@ -816,19 +858,16 @@ True - 24, 22 + 24, 24 Letzte verschieben - - 6, 25 - - 0, 0 + 233, 27 - 778, 25 + 790, 27 9 @@ -843,140 +882,11 @@ System.Windows.Forms.BindingNavigator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - pnlNavigator + Panel1 - 0 - - - 242, 45 - - - 778, 25 - - - 10 - - - pnlNavigator - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Panel1 - - - 0 - - - Top, Bottom, Left, Right - - - 152, 95 - - - 269, 26 - - - Validierung für Gruppe/Profil starten - - - 269, 26 - - - Validierung für Datei starten - - - 269, 26 - - - Tabellenlayout zurücksetzen - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wwAADsMBx2+oZAAAAM5JREFUOE9jwAa+fv3a8O3bt/9I+D0QCECl8QOQQpAG+fTl/xmC5/yvXnryP8hA - qDRhALJx1s4rYM38sYv+P3/zAcUlX758MYAqhQAkSbACEI1se2Rk5H8nJycwTklJ+f/8+XNUQ0CakDUg - 2754xVq4ZpyGgPyHrAnZsI8fPv3/8P4jHOfl5mEagh5oyLYja0Y2AGYISB+GK2C2g/yObgAMwwwBhRfY - AJgrQAIgvHnzZrACbJpBGMMAZAAShCnAphmER5IBhDDtDCAef/sPAEGjQ6y45GCmAAAAAElFTkSuQmCC - - - - 269, 26 - - - Massenabschluss markierte Dateien - - - 269, 26 - - - Group - - - 270, 134 - - - ContextMenuGrid - - - System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 242, 73 - - - Aqua - - - 777, 439 - - - 8 - - - GridControl_Docs - - - DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - - Panel1 - - 1 - - True - - - Tahoma, 9.75pt - - - 239, 25 - - - 75, 16 - - - 6 - - - Ansicht-Typ - - - lblViewType - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Panel1 - - - 2 - Profilübersicht @@ -1032,12 +942,6 @@ 301, 95 - - 219, 26 - - - Starte Validierung für Profil - 220, 30 @@ -1051,7 +955,7 @@ Left - Weitere Ansichten + Hauptansicht @@ -1233,7 +1137,7 @@ Panel1 - 3 + 2 Fill @@ -1245,7 +1149,7 @@ 0, 0 - 1023, 498 + 1023, 527 4 @@ -1262,6 +1166,51 @@ 2 + + 269, 26 + + + Validierung für Gruppe/Profil starten + + + 269, 26 + + + Validierung für Datei starten + + + 269, 26 + + + Tabellenlayout zurücksetzen + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAAM5JREFUOE9jwAa+fv3a8O3bt/9I+D0QCECl8QOQQpAG+fTl/xmC5/yvXnryP8hA + qDRhALJx1s4rYM38sYv+P3/zAcUlX758MYAqhQAkSbACEI1se2Rk5H8nJycwTklJ+f/8+XNUQ0CakDUg + 2754xVq4ZpyGgPyHrAnZsI8fPv3/8P4jHOfl5mEagh5oyLYja0Y2AGYISB+GK2C2g/yObgAMwwwBhRfY + AJgrQAIgvHnzZrACbJpBGMMAZAAShCnAphmER5IBhDDtDCAef/sPAEGjQ6y45GCmAAAAAElFTkSuQmCC + + + + 269, 26 + + + Massenabschluss markierte Dateien + + + 269, 26 + + + Group + + + 219, 26 + + + Starte Validierung für Profil + 1132, 17 @@ -1465,7 +1414,7 @@ True - 208 + 141 9, 19 @@ -1756,6 +1705,42 @@ System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + CMGroupStart + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + CMFileStart + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + TabellenlayoutZurücksetzenToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tsmiMarkedFilesFinish + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GroupToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GridView_Docs + + + DevExpress.XtraGrid.Views.Grid.GridView, DevExpress.XtraGrid.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + bindsourcegrid @@ -1768,6 +1753,18 @@ System.Windows.Forms.ToolStripLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ToolStripLabelViewTape + + + System.Windows.Forms.ToolStripLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + BindingNavigatorSeparator2 + + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + BindingNavigatorMoveFirstItem @@ -1810,48 +1807,6 @@ System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - BindingNavigatorSeparator2 - - - System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - CMGroupStart - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - CMFileStart - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabellenlayoutZurücksetzenToolStripMenuItem - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tsmiMarkedFilesFinish - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GroupToolStripMenuItem - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GridView_Docs - - - DevExpress.XtraGrid.Views.Grid.GridView, DevExpress.XtraGrid.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - NavBarGroupProfiles diff --git a/app/DD_PM_WINDREAM/frmMain.vb b/app/DD_PM_WINDREAM/frmMain.vb index 90057f5..acc145b 100644 --- a/app/DD_PM_WINDREAM/frmMain.vb +++ b/app/DD_PM_WINDREAM/frmMain.vb @@ -23,6 +23,7 @@ Public Class frmMain Private GRID_LOAD_TYPE As String = "OVERVIEW" Private GRID_INV_COL_REMOVED As Boolean = False Private NO_WORKFLOWITEMS As Boolean = False + Dim DT_CHARTS As DataTable 'Private _windream As New ClassWindream_allgemein Private Sub frmMain_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing @@ -144,7 +145,18 @@ Public Class frmMain End Try Load_Profile_items() + Try + Dim sql = "SELECT * FROM TBPM_CHART" + DT_CHARTS = ClassDatabase.Return_Datatable(sql) + If DT_CHARTS.Rows.Count = 0 Then + NavBarItemDashboard.Visible = False + Else + NavBarItemDashboard.Visible = True + End If + Catch ex As Exception + LOGGER.Warn($"Could not load Charts: {ex.Message}") + End Try Check_Timer_Notification() Restore_Form_Position() Try @@ -266,8 +278,13 @@ Public Class frmMain GridView_Docs.Columns.Item("ICON").Fixed = FixedStyle.Left GridView_Docs.Columns("Last edited").DisplayFormat.FormatType = FormatType.DateTime GridView_Docs.Columns("Last edited").DisplayFormat.FormatString = "dd.MM.yyyy HH:MM:ss" - GridView_Docs.Columns.Item("PROFILE_GROUP_TEXT").Visible = False - GridView_Docs.Columns.Item("PROFILE_GROUP_COLOR").Visible = False + Try + GridView_Docs.Columns.Item("PROFILE_GROUP_TEXT").Visible = False + GridView_Docs.Columns.Item("PROFILE_GROUP_COLOR").Visible = False + Catch ex As Exception + GridView_Docs.Columns.Item("GROUP_TEXT").Visible = False + GridView_Docs.Columns.Item("GROUP_COLOR").Visible = False + End Try End If Catch ex As Exception @@ -281,7 +298,7 @@ Public Class frmMain Dim profileGroupOpen As Boolean = False Try - Dim CurrGroup As NavBarGroup = NavBarControl1.Groups(0) + Dim CurrGroup As NavBarGroup = NavBarControl1.Groups(1) profileGroupOpen = CurrGroup.Expanded Try @@ -298,21 +315,25 @@ Public Class frmMain Exit Sub End If - For Each profile As DataRow In CURR_DT_VWPM_PROFILE_ACTIVE.Rows - Dim item1 As NavBarItem = NavBarControl1.Items.Add() - item1.Caption = profile.Item("TITLE") - item1.Hint = profile.Item("TITLE") - item1.Appearance.TextOptions.WordWrap = WordWrap.Wrap - item1.Tag = "itmProfile#" & profile.Item("GUID").ToString + For Each oProfileRow As DataRow In CURR_DT_VWPM_PROFILE_ACTIVE.Rows + If CInt(oProfileRow.Item("FILE_COUNT")) > 0 Then + Dim item1 As NavBarItem = NavBarControl1.Items.Add() + item1.Caption = oProfileRow.Item("TITLE") + item1.Hint = oProfileRow.Item("TITLE") + item1.Appearance.TextOptions.WordWrap = WordWrap.Wrap + item1.Tag = "itmProfile#" & oProfileRow.Item("GUID").ToString - Dim _image As Image = Nothing - _image = DevExpress.Images.ImageResourceCache.Default.GetImage("images/business%20objects/bofileattachment_16x16.png") - item1.LargeImage = _image - item1.SmallImage = _image + Dim _image As Image = Nothing + _image = DevExpress.Images.ImageResourceCache.Default.GetImage("images/business%20objects/bofileattachment_16x16.png") + item1.LargeImage = _image + item1.SmallImage = _image + + NavBarControl1.Groups(1).ItemLinks.Add(item1) + + AddHandler NavBarControl1.LinkClicked, AddressOf navBar_LinkClicked + End If - NavBarControl1.Groups(0).ItemLinks.Add(item1) - AddHandler NavBarControl1.LinkClicked, AddressOf navBar_LinkClicked Next CurrGroup.Expanded = profileGroupOpen @@ -349,7 +370,7 @@ Public Class frmMain End Sub Function Load_Profiles_for_User() As Boolean Try - Dim sql = String.Format("SELECT T.* FROM VWPM_PROFILE_ACTIVE T WHERE T.GUID IN (SELECT PROFILE_ID FROM [dbo].[FNPM_GET_ACTIVE_PROFILES_USER] ({0}))", USER_ID) + Dim sql = String.Format("SELECT T.* FROM VWPM_PROFILE_ACTIVE T WHERE T.FILE_COUNT > 0 AND T.GUID IN (SELECT PROFILE_ID FROM [dbo].[FNPM_GET_ACTIVE_PROFILES_USER] ({0}))", USER_ID) CURR_DT_VWPM_PROFILE_ACTIVE = ClassDatabase.Return_Datatable(sql) If IsNothing(CURR_DT_VWPM_PROFILE_ACTIVE) Then @@ -365,23 +386,27 @@ Public Class frmMain End Function Sub Layout_Single_Profile() If GridControl_Docs.Visible = False Then + BindingNavigator1.Visible = True + BindingNavigator1.Dock = DockStyle.Top GridControl_Docs.Visible = True - pnlNavigator.Visible = True + GridControl_Docs.Dock = DockStyle.Fill SplitContainerDashboard.Visible = False + SplitContainerDashboard.Dock = DockStyle.None + End If End Sub Sub Layout_Dashboard() Try If GridControl_Docs.Visible = True Then + BindingNavigator1.Visible = False + BindingNavigator1.Dock = DockStyle.None GridControl_Docs.Visible = False - pnlNavigator.Visible = False + GridControl_Docs.Dock = DockStyle.None + Dim groupCount As Integer Dim charts As List(Of ChartControl) SplitContainerDashboard.Visible = True - Dim DT_CHARTS As DataTable - Dim sql = "SELECT * FROM TBPM_CHART" - DT_CHARTS = ClassDatabase.Return_Datatable(sql, True) Dim Groups As DataRowCollection = DT_CHARTS.Rows groupCount = Groups.Count Configure_Split_Containers(groupCount) @@ -536,6 +561,7 @@ Public Class frmMain ' Show SplitContainerBottom SplitContainerDashboard.Panel2Collapsed = False End Select + SplitContainerDashboard.Dock = DockStyle.Fill End Sub Sub Load_single_Profile() @@ -553,7 +579,7 @@ Public Class frmMain Next If result = 1 Then - lblViewType.Text = "Detailansicht Profil: " & CURRENT_CLICKED_PROFILE_TITLE + ToolStripLabelViewTape.Text = "Detailansicht Profil: " & CURRENT_CLICKED_PROFILE_TITLE Dim sql = foundRows(0)("SQL_VIEW") sql = sql.Replace("@USER_ID", USER_ID) @@ -571,7 +597,7 @@ Public Class frmMain Dim Columns_Removed = GridView_CheckInvalidColumns() RestoreLayout() - lblViewType.Text = "Detailansicht Profil: " & CURRENT_CLICKED_PROFILE_TITLE + ToolStripLabelViewTape.Text = "Detailansicht Profil: " & CURRENT_CLICKED_PROFILE_TITLE End If Catch ex As Exception @@ -633,8 +659,14 @@ Public Class frmMain GridView_Docs.Columns.Item("ICON").Fixed = FixedStyle.Left GridView_Docs.Columns("Last edited").DisplayFormat.FormatType = FormatType.DateTime GridView_Docs.Columns("Last edited").DisplayFormat.FormatString = "dd.MM.yyyy HH:MM:ss" - GridView_Docs.Columns.Item("PROFILE_GROUP_TEXT").Visible = False - GridView_Docs.Columns.Item("PROFILE_GROUP_COLOR").Visible = False + Try + GridView_Docs.Columns.Item("PROFILE_GROUP_TEXT").Visible = False + GridView_Docs.Columns.Item("PROFILE_GROUP_COLOR").Visible = False + Catch ex As Exception + GridView_Docs.Columns.Item("GROUP_TEXT").Visible = False + GridView_Docs.Columns.Item("GROUP_COLOR").Visible = False + End Try + End Sub Private Function GridView_CheckInvalidColumns() As Boolean @@ -704,9 +736,16 @@ Public Class frmMain Create_Basic_View() Try - GridView_Docs.Columns.Item("PROFILE_GROUP_TEXT").GroupIndex = 0 - GridView_Docs.Columns.Item("PROFILE_GROUP_TEXT").Visible = False - GridView_Docs.Columns.Item("PROFILE_GROUP_COLOR").Visible = False + Try + GridView_Docs.Columns.Item("PROFILE_GROUP_TEXT").GroupIndex = 0 + GridView_Docs.Columns.Item("PROFILE_GROUP_TEXT").Visible = False + GridView_Docs.Columns.Item("PROFILE_GROUP_COLOR").Visible = False + Catch ex As Exception + GridView_Docs.Columns.Item("GROUP_TEXT").GroupIndex = 0 + GridView_Docs.Columns.Item("GROUP_TEXT").Visible = False + GridView_Docs.Columns.Item("GROUP_COLOR").Visible = False + End Try + For I = 0 To GridView_Docs.GroupCount - 1 Dim v = GridView_Docs.GroupedColumns(I).ToString Dim ii = Nothing @@ -850,8 +889,8 @@ Public Class frmMain End Sub Sub Load_Profil_from_Grid(ID As Integer) - 'Try - Me.Visible = False + Try + Me.Visible = False CURRENT_ProfilGUID = ID CURRENT_ProfilName = ClassDatabase.Execute_Scalar("SELECT NAME FROM TBPM_PROFILE WHERE GUID = " & CURRENT_ProfilGUID, CONNECTION_STRING) CURRENT_DT_PROFILE = ClassDatabase.Return_Datatable(String.Format("select * from TBPM_PROFILE where GUID = {0}", CURRENT_ProfilGUID)) @@ -864,10 +903,10 @@ Public Class frmMain End If frmValidator.ShowDialog() - 'Catch ex As Exception - ' LOGGER.Error(ex) - ' MsgBox(ex.Message, MsgBoxStyle.Critical, "Unexpected error in Load_Profil_from_Grid: ") - 'End Try + Catch ex As Exception + LOGGER.Error(ex) + MsgBox(ex.Message, MsgBoxStyle.Critical, "Unexpected error in Load_Profil_from_Grid: ") + End Try Me.Visible = True Decide_Load() @@ -900,8 +939,8 @@ Public Class frmMain Item_Scope() End Sub Private Sub Item_Scope() - 'Try - CURRENT_JUMP_DOC_GUID = 0 + Try + CURRENT_JUMP_DOC_GUID = 0 Dim hitInfo As GridHitInfo = GridView_Docs.CalcHitInfo(GridCursorLocation) Dim groupRowText Dim PROFIL_ID @@ -923,7 +962,12 @@ Public Class frmMain End If Dim PROFIL_TITLE If GRID_LOAD_TYPE = "OVERVIEW" Then - groupRowText = LTrim(RTrim(groupRowText.ToString.Replace("PROFILE_GROUP_TEXT: ", ""))) + Try + groupRowText = LTrim(RTrim(groupRowText.ToString.Replace("PROFILE_GROUP_TEXT: ", ""))) + Catch ex As Exception + groupRowText = LTrim(RTrim(groupRowText.ToString.Replace("GROUP_TEXT: ", ""))) + End Try + Dim _SPLIT As String() _SPLIT = groupRowText.Split("|") PROFIL_TITLE = LTrim(RTrim(_SPLIT(0).ToString)) @@ -971,13 +1015,14 @@ Public Class frmMain End If End If - + Else + MsgBox("Could not get the ProfileID of file! - Check Your configuration of MainView!", MsgBoxStyle.Critical) End If - 'Catch ex As Exception - ' LOGGER.Error(ex) - ' MsgBox("Unexpected error in Item_Scope: " & ex.Message, MsgBoxStyle.Critical) - 'End Try + Catch ex As Exception + LOGGER.Error(ex) + MsgBox("Unexpected error in Item_Scope: " & ex.Message, MsgBoxStyle.Critical) + End Try End Sub Private Function Init_windream() Try @@ -1016,8 +1061,12 @@ Public Class frmMain Exit Sub End If - oProfileId = GridView_Docs.GetRowCellValue(oSelectedRows.First(), "PROFILE_ID") + oProfileId = GridView_Docs.GetRowCellValue(oSelectedRows.Last(), GridView_Docs.Columns("PROFILE_ID")) + If oProfileId = 0 Then + MsgBox("Could not select a profile!", MsgBoxStyle.Exclamation, "Mass Validation") + Exit Sub + End If If Init_windream() Then CURRENT_ProfilGUID = oProfileId @@ -1050,7 +1099,7 @@ Public Class frmMain CURRENT_DT_MASS_CHANGE_DOCS = Nothing CURRENT_DT_MASS_CHANGE_DOCS = dt - frmMassValidator.ShowDialog() + frmMassValidator.Show() Load_Profile_items() Decide_Load() @@ -1081,7 +1130,7 @@ Public Class frmMain Layout_Single_Profile() GRID_LOAD_TYPE = "OVERVIEW" CURRENT_CLICKED_PROFILE_ID = 0 - lblViewType.Text = "Gesamtübersicht" + ToolStripLabelViewTape.Text = "Gesamtübersicht" Cursor = Cursors.WaitCursor Try Dim sel = String.Format("SELECT * FROM VWPM_PROFILE_USER WHERE USER_ID ={0}", USER_ID) @@ -1127,13 +1176,14 @@ Public Class frmMain If Not IsNothing(CURR_DT_PROFILEGRID) Then NO_WORKFLOWITEMS = False If CURR_DT_PROFILEGRID.Rows.Count = 0 Then - lblViewType.Text = "Aktuell keine Workflowdaten vorhanden!" + ToolStripLabelViewTape.Text = "Aktuell keine Workflowdaten vorhanden!" NO_WORKFLOWITEMS = True 'MsgBox("Aktuell keine Workflowdaten vorhanden!", MsgBoxStyle.Information) GridControl_Docs.Visible = False - pnlNavigator.Visible = False + BindingNavigator1.Visible = False + BindingNavigator1.Dock = DockStyle.None GridControl_Docs.DataSource = Nothing Try GridView_Docs.Columns.Clear() @@ -1144,8 +1194,12 @@ Public Class frmMain Cursor = Cursors.Default Exit Sub End If + BindingNavigator1.Visible = True + BindingNavigator1.Dock = DockStyle.Top + GridControl_Docs.Visible = True - pnlNavigator.Visible = True + GridControl_Docs.Dock = DockStyle.Fill + ' Spalte für Status Icon erstellen Dim columnStateIcon As New DataColumn() columnStateIcon.DataType = GetType(Image) @@ -1174,7 +1228,7 @@ Public Class frmMain bindsourcegrid.DataSource = CURR_DT_PROFILEGRID GridControl_Docs.DataSource = bindsourcegrid - lblViewType.Text = "Gesamtübersicht" + ToolStripLabelViewTape.Text = "Gesamtübersicht" 'GridControlDocRow.ForceInitialize() ' GridControl1.DataSource = CURR_DT_PROFILEGRID @@ -1193,13 +1247,23 @@ Public Class frmMain oindex += 1 Next Else - GridView_Docs.Columns.Item("PROFILE_GROUP_TEXT").GroupIndex = oindex + Try + GridView_Docs.Columns.Item("PROFILE_GROUP_TEXT").GroupIndex = oindex + Catch ex As Exception + GridView_Docs.Columns.Item("GROUP_TEXT").GroupIndex = oindex + End Try + End If + Try + GridView_Docs.Columns.Item("PROFILE_GROUP_TEXT").Visible = False + GridView_Docs.Columns.Item("PROFILE_GROUP_COLOR").Visible = False + Catch ex As Exception + GridView_Docs.Columns.Item("GROUP_TEXT").Visible = False + GridView_Docs.Columns.Item("GROUP_COLOR").Visible = False + End Try - GridView_Docs.Columns.Item("PROFILE_GROUP_TEXT").Visible = False - GridView_Docs.Columns.Item("PROFILE_GROUP_COLOR").Visible = False For index = 0 To GridView_Docs.GroupCount - 1 Dim v = GridView_Docs.GroupedColumns(index).ToString LOGGER.Debug($"Addig tag [{GridView_Docs.Columns.Item("PROFILE_ID")}] for group...", False) @@ -1267,8 +1331,10 @@ Public Class frmMain Else NO_WORKFLOWITEMS = True GridControl_Docs.Visible = False - pnlNavigator.Visible = False + BindingNavigator1.Visible = False + BindingNavigator1.Dock = DockStyle.None GridControl_Docs.DataSource = Nothing + GridControl_Docs.Dock = DockStyle.None Try GridView_Docs.Columns.Clear() Catch ex As Exception @@ -1327,7 +1393,7 @@ Public Class frmMain Dim item As GridGroupSummaryItem = CType(view.GroupSummary(Tag), GridGroupSummaryItem) ' Dim value As Object = view.GetGroupSummaryValue(e.RowHandle, item) - If info.Column.FieldName = "PROFILE_GROUP_TEXT" Then + If info.Column.FieldName = "PROFILE_GROUP_TEXT" Or info.Column.FieldName = "GROUP_TEXT" Then info.GroupText = info.GroupValueText Dim _color As String = "Grey" @@ -1335,6 +1401,9 @@ Public Class frmMain For Each row As DataRow In CURR_DT_VWPM_PROFILE_ACTIVE.Rows If row.Item("PROFILE_GROUP_TEXT") = info.GroupValueText Then _color = row.Item("PROFILE_GROUP_COLOR") + ElseIf row.Item("GROUP_TEXT") = info.GroupValueText Then + _color = row.Item("GROUP_COLOR") + End If Next @@ -1425,4 +1494,16 @@ Public Class frmMain GridView_Docs.OptionsView.ShowGroupedColumns = True End If End Sub + + Private Sub GridView_Docs_MouseUp(sender As Object, e As MouseEventArgs) Handles GridView_Docs.MouseUp + + End Sub + + Private Sub GridControl_Docs_DoubleClick(sender As Object, e As EventArgs) Handles GridControl_Docs.DoubleClick + + End Sub + + Private Sub GridView_Docs_ValidateRow(sender As Object, e As Views.Base.ValidateRowEventArgs) Handles GridView_Docs.ValidateRow + + End Sub End Class \ No newline at end of file diff --git a/app/DD_PM_WINDREAM/frmMassValidator.vb b/app/DD_PM_WINDREAM/frmMassValidator.vb index a04851d..f14c4d6 100644 --- a/app/DD_PM_WINDREAM/frmMassValidator.vb +++ b/app/DD_PM_WINDREAM/frmMassValidator.vb @@ -2,6 +2,7 @@ Imports Oracle.ManagedDataAccess.Client Imports System.ComponentModel Imports DD_LIB_Standards +Imports DigitalData.Controls.LookupGrid Public Class frmMassValidator Dim DT_PROFILE_CONTROLS As DataTable @@ -307,6 +308,8 @@ Public Class frmMassValidator LOGGER.Debug("Versuch Linie zu laden") ctrl = ClassControlCreator.CreateExistingLine(dr, False) + Case "LOOKUP" + ctrl = ClassControlCreator.CreateExistingLookupControl(dr, False) End Select If TypeOf ctrl IsNot Label Then @@ -318,12 +321,15 @@ Public Class frmMassValidator pnldesigner.Controls.Add(ctrl) - LoadSimpleData(ctrl, dr.Item("GUID")) + Next LOGGER.Debug("Controls geladen") LOGGER.Info("") CTRLS_Loaded = True FillIndexValues() + For Each oControl As Control In pnldesigner.Controls + LoadSimpleData(oControl, oControl.Tag) + Next 'Catch ex As Exception ' If LogErrorsOnly = False Then MsgBox("Error Load_Controls: " & ex.Message, MsgBoxStyle.Critical, "Attention error:") ' ' allgFunk.Insert_LogEntry(CURRENT_ProfilGUID, "Error Load_Controls: " & ex.Message, Environment.UserName) @@ -568,6 +574,42 @@ Public Class frmMassValidator MsgBox("Achtung fehlerhafte Konfiguration:" & vbNewLine & "Für das Control " & inctrl.Name & " wurde KEIN INDEX hinterlegt!" & vbNewLine & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical) Exit For End If + Case "DigitalData.Controls.LookupGrid.LookupControl2" + Try + Dim oLookup As LookupControl2 = inctrl + Dim oWindreamValue = GetWM_Value_Multiple_Docs(idxname) + + If Not IsNothing(oWindreamValue) Then + If oWindreamValue.GetType.ToString.Contains("System.Object") Then + Dim oArrlist As New List(Of String) + For Each oVectorRow As Object In oWindreamValue + + oArrlist.Add(oVectorRow.ToString) + Next + oLookup.SelectedValues = oArrlist + + + Else + Dim oArrlist As New List(Of String) + oArrlist.Add(oWindreamValue.ToString) + oLookup.SelectedValues = oArrlist + '_CURRENT_INDEX_ARRAY(oCount, 1) = oWindreamValue.ToString + End If + Else + If Not IsNothing(oLookup.SelectedValues) Then + If oLookup.SelectedValues.Count = 0 And defaultValue <> String.Empty Then + Dim oValues As List(Of String) = defaultValue.Split(",").ToList() + oLookup.SelectedValues = oValues + End If + End If + End If + + + Catch ex As Exception + LOGGER.Error(ex) + LOGGER.Info(" - Unvorhergesehener Unexpected error in AddLookupGrid - Indexname: " & idxname & " - Fehler: " & vbNewLine & ex.Message) + MsgBox(ex.Message, MsgBoxStyle.Critical, "Unvorhergesehener Unexpected error in Add LookupControl2:") + End Try End Select Next Catch ex As Exception @@ -710,21 +752,21 @@ Public Class frmMassValidator End If For Each ROW As DataRow In CURR_DT_DEPENDING_CONTROLS.Rows - 'Try - Dim displayboxname = ROW.Item(Name).ToString - If Not IsDBNull(ROW.Item(1)) And Not IsDBNull(ROW.Item(2)) Then - Dim sql_Statement = ROW.Item(2) - sql_Statement = clsPatterns.ReplaceAllValues(sql_Statement, pnldesigner, WMObject, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_EMAIL) + Try + Dim displayboxname = ROW.Item(Name).ToString + If Not IsDBNull(ROW.Item(1)) And Not IsDBNull(ROW.Item(2)) Then + Dim sql_Statement = ROW.Item(2) + sql_Statement = clsPatterns.ReplaceAllValues(sql_Statement, pnldesigner, WMObject, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_EMAIL) - _dependingControl_in_action = True - Depending_Control_Set_Result(displayboxname, sql_Statement, ROW.Item(1)) - _dependingControl_in_action = False - End If - 'Catch ex As Exception - ' LOGGER.Info("Unexpected Error in displaying SQL-result for control: " & ROW.Item(0).ToString & " - ERROR: " & ex.Message) - 'End Try + _dependingControl_in_action = True + Depending_Control_Set_Result(displayboxname, sql_Statement, ROW.Item(1)) + _dependingControl_in_action = False + End If + Catch ex As Exception + LOGGER.Info("Unexpected Error in displaying SQL-result for control: " & ROW.Item(0).ToString & " - ERROR: " & ex.Message) + End Try - Next + Next Catch ex As Exception LOGGER.Error(ex) @@ -736,36 +778,36 @@ Public Class frmMassValidator End Sub Private Sub Depending_Control_Set_Result(displayboxname As String, sqlCommand As String, sqlConnection As String) - 'Try - Dim resultDT As DataTable = ClassDatabase.Return_Datatable_CS(sqlCommand, sqlConnection) - If Not IsNothing(resultDT) Then - 'Ist das Control ein Control was mehrfachwerte enthalten kann - If displayboxname.StartsWith(ClassControlCreator.PREFIX_COMBOBOX) Or displayboxname.StartsWith(ClassControlCreator.PREFIX_DATAGRIDVIEW) Or displayboxname.StartsWith(ClassControlCreator.PREFIX_TABLE) Then - If displayboxname.StartsWith(ClassControlCreator.PREFIX_COMBOBOX) Then - Dim cmbpanel As ComboBox = pnldesigner.Controls(displayboxname) - If IsNothing(cmbpanel) Then - Exit Sub + Try + Dim resultDT As DataTable = ClassDatabase.Return_Datatable_CS(sqlCommand, sqlConnection) + If Not IsNothing(resultDT) Then + 'Ist das Control ein Control was mehrfachwerte enthalten kann + If displayboxname.StartsWith(ClassControlCreator.PREFIX_COMBOBOX) Or displayboxname.StartsWith(ClassControlCreator.PREFIX_DATAGRIDVIEW) Or displayboxname.StartsWith(ClassControlCreator.PREFIX_TABLE) Then + If displayboxname.StartsWith(ClassControlCreator.PREFIX_COMBOBOX) Then + Dim cmbpanel As ComboBox = pnldesigner.Controls(displayboxname) + If IsNothing(cmbpanel) Then + Exit Sub + End If + cmbpanel.DataSource = Nothing + cmbpanel.DataSource = resultDT + cmbpanel.DisplayMember = resultDT.Columns(0).ColumnName + cmbpanel.ValueMember = resultDT.Columns(0).ColumnName + ElseIf displayboxname.StartsWith(ClassControlCreator.PREFIX_DATAGRIDVIEW) Or displayboxname.StartsWith(ClassControlCreator.PREFIX_TABLE) Then + 'not implemented End If - cmbpanel.DataSource = Nothing - cmbpanel.DataSource = resultDT - cmbpanel.DisplayMember = resultDT.Columns(0).ColumnName - cmbpanel.ValueMember = resultDT.Columns(0).ColumnName - ElseIf displayboxname.StartsWith(ClassControlCreator.PREFIX_DATAGRIDVIEW) Or displayboxname.StartsWith(ClassControlCreator.PREFIX_TABLE) Then - 'not implemented - End If - Else - If resultDT.Rows.Count = 1 Then - pnldesigner.Controls(displayboxname).Text = resultDT.Rows(0).Item(0).ToString Else - pnldesigner.Controls(displayboxname).Text = "RESULT = resultDT.Rows.Count <> 1" - LOGGER.Info(">> Datatable-SQL: " & sqlCommand) + If resultDT.Rows.Count = 1 Then + pnldesigner.Controls(displayboxname).Text = resultDT.Rows(0).Item(0).ToString + Else + pnldesigner.Controls(displayboxname).Text = "RESULT = resultDT.Rows.Count <> 1" + LOGGER.Info(">> Datatable-SQL: " & sqlCommand) + End If End If End If - End If - 'Catch ex As Exception - ' LOGGER.Info("Unexpected Ersror in Depending_Control_Set_Result - ERROR: " & ex.Message) - ' MsgBox("Unexpected error in Depending_Control_Set_Result: " & ex.Message, MsgBoxStyle.Critical) - 'End Try + Catch ex As Exception + LOGGER.Info("Unexpected Ersror in Depending_Control_Set_Result - ERROR: " & ex.Message) + MsgBox("Unexpected error in Depending_Control_Set_Result: " & ex.Message, MsgBoxStyle.Critical) + End Try End Sub Public Sub OnCmbselectedIndex(sender As System.Object, e As System.EventArgs) Dim cmb As ComboBox = sender @@ -785,22 +827,22 @@ Public Class frmMassValidator End If For Each ROW As DataRow In CURR_DT_DEPENDING_CONTROLS.Rows - 'Try - Dim displayboxname = ROW.Item("NAME").ToString - If Not IsDBNull(ROW.Item("CONNECTION_ID")) And Not IsDBNull(ROW.Item("SQL_UEBERPRUEFUNG")) Then - Dim sql_Statement = ROW.Item("SQL_UEBERPRUEFUNG") + Try + Dim displayboxname = ROW.Item("NAME").ToString + If Not IsDBNull(ROW.Item("CONNECTION_ID")) And Not IsDBNull(ROW.Item("SQL_UEBERPRUEFUNG")) Then + Dim sql_Statement = ROW.Item("SQL_UEBERPRUEFUNG") - sql_Statement = clsPatterns.ReplaceAllValues(sql_Statement, pnldesigner, WMObject, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_EMAIL) + sql_Statement = clsPatterns.ReplaceAllValues(sql_Statement, pnldesigner, WMObject, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_EMAIL) - _dependingControl_in_action = True - Depending_Control_Set_Result(displayboxname, sql_Statement, ROW.Item(1)) - _dependingControl_in_action = False + _dependingControl_in_action = True + Depending_Control_Set_Result(displayboxname, sql_Statement, ROW.Item(1)) + _dependingControl_in_action = False - End If - 'Catch ex As Exception - ' LOGGER.Info("Unexpected Error in displaying SQL-result for control: " & ROW.Item(0).ToString & " - ERROR: " & ex.Message) - 'End Try + End If + Catch ex As Exception + LOGGER.Info("Unexpected Error in displaying SQL-result for control: " & ROW.Item(0).ToString & " - ERROR: " & ex.Message) + End Try Next 'Catch ex As Exception @@ -888,32 +930,83 @@ Public Class frmMassValidator Dim sqlStatement As String = row.Item("SQL_UEBERPRUEFUNG") Dim connectionId As Integer = row.Item("CONNECTION_ID") - sql = clsPatterns.ReplaceInternalValues(sqlStatement) + If clsPatterns.HasComplexPatterns(sqlStatement) Then + Continue For + End If + + sql = clsPatterns.ReplaceUserValues(sqlStatement, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_EMAIL) + sql = clsPatterns.ReplaceInternalValues(sql) + LOGGER.Debug(">>> sql after ReplaceInternalValues: " & sql) + 'sql = ClassPatterns.ReplaceInternalValues(sqlStatement) dt = ClassDatabase.Return_Datatable(sql) If IsNothing(dt) Then MsgBox($"SQL-Query for control {control.Name} is invalid.") Exit Sub End If + Dim oValue If TypeOf control Is TextBox Then - Dim firstRow As DataRow = dt.Rows(0) - Dim value = firstRow.Item(0) + Try + Dim firstRow As DataRow = dt.Rows(0) + Dim value = firstRow.Item(0) - control.Text = value + control.Text = value + oValue = value + Catch ex As Exception + LOGGER.Error(ex) + clsLogger.Add("Error in LoadSimpleData for TextBox: " & ex.Message) + End Try ElseIf TypeOf control Is ComboBox Then - Dim comboxBox As ComboBox = control - Dim list As New List(Of String) + Try + Dim comboxBox As ComboBox = control + Dim list As New List(Of String) - For Each _row As DataRow In dt.Rows - list.Add(_row.Item(0)) - Next + For Each _row As DataRow In dt.Rows + list.Add(_row.Item(0)) + Next - comboxBox.DataSource = list - ElseIf TypeOf control Is DataGridView Then - Dim dataGridView As DataGridView = control + comboxBox.DataSource = list + Catch ex As Exception + LOGGER.Error(ex) + clsLogger.Add("Error in LoadSimpleData for Combobox: " & ex.Message) + End Try + ElseIf TypeOf control Is LookupControl2 Then + Try + Dim lookup As LookupControl2 = control - dataGridView.DataSource = dt + lookup.DataSource = dt + Catch ex As Exception + LOGGER.Error(ex) + clsLogger.Add("Error in LoadSimpleData for LookupControl2: " & ex.Message) + End Try + 'ElseIf TypeOf control Is GridControl Then + ' Try + ' Dim dataGridView As GridControl = control + ' Dim oDataSource As DataTable = dataGridView.DataSource + + ' If oDataSource Is Nothing OrElse oDataSource.Rows.Count = 0 Then + ' 'dataGridView.DataSource = dt + + ' Dim oDatatable As DataTable = dt.Clone() + + ' For Each oColumn As DataColumn In oDatatable.Columns + ' If oDataSource.Columns(oColumn.ColumnName) Is Nothing Then + ' 'oDataSource.Columns.Add(oColumn) + ' oDataSource.Columns.Add(oColumn.ColumnName, oColumn.DataType) + ' End If + ' Next + + ' For Each oRow As DataRow In dt.Rows + ' oDataSource.ImportRow(oRow) + ' Next + + ' dataGridView.DataSource = oDataSource + ' End If + ' Catch ex As Exception + ' LOGGER.Error(ex) + ' clsLogger.Add("Error in LoadSimpleData for DataGridView: " & ex.Message) + ' End Try End If Next End Sub @@ -1583,6 +1676,7 @@ Public Class frmMassValidator Private Sub frmMassValidator_Shown(sender As Object, e As EventArgs) Handles Me.Shown FORM_Shown = True + Me.BringToFront() End Sub Private Sub frmMassValidator_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing diff --git a/app/DD_PM_WINDREAM/frmValidator.resx b/app/DD_PM_WINDREAM/frmValidator.resx index c5098c5..4b36418 100644 --- a/app/DD_PM_WINDREAM/frmValidator.resx +++ b/app/DD_PM_WINDREAM/frmValidator.resx @@ -1368,6 +1368,12 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ToolStripSeparator1 + + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + RefreshAdditionalSearchToolStripMenuItem @@ -1848,12 +1854,6 @@ DD_PM_WINDREAM.FinalIndexDataSetTableAdapters.TBPM_PROFILE_FINAL_INDEXINGTableAdapter, FinalIndexDataSet.Designer.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - - ToolStripSeparator1 - - - System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - frmValidator diff --git a/app/DD_PM_WINDREAM/frmValidator.vb b/app/DD_PM_WINDREAM/frmValidator.vb index 2b0c8ec..eb36ec8 100644 --- a/app/DD_PM_WINDREAM/frmValidator.vb +++ b/app/DD_PM_WINDREAM/frmValidator.vb @@ -30,7 +30,7 @@ Public Class frmValidator Private navStep As String = Nothing Public Shared myWMDocumentPath As String - Public Shared Filesystem_Document_Path As String + Public PathToWM_File As String Dim OLD_Document_Path As String = "" Dim ValueDTP As Date @@ -57,6 +57,7 @@ Public Class frmValidator Private _frmValidatorSearch As frmValidatorSearch 'You need a reference to Form1 Private _dependingControl_in_action As Boolean = False + Private DTCONTROLS As DataTable Public Shared Function SetForegroundWindow(ByVal hwnd As IntPtr) As Boolean @@ -316,128 +317,127 @@ Public Class frmValidator Size = My.Settings.frmValidatorSize End If Dim _step = 0 - 'Try - _step = 1 - TBPM_FILES_USER_NOT_INDEXEDTableAdapter.Connection.ConnectionString = CONNECTION_STRING - TBPM_PROFILE_CONTROLSTableAdapter.Connection.ConnectionString = CONNECTION_STRING - TBDD_CONNECTIONTableAdapter.Connection.ConnectionString = CONNECTION_STRING - TBPM_PROFILE_FILESTableAdapter.Connection.ConnectionString = CONNECTION_STRING - TBPM_PROFILE_FINAL_INDEXINGTableAdapter.Connection.ConnectionString = CONNECTION_STRING - TBPM_PROFILETableAdapter.Connection.ConnectionString = CONNECTION_STRING - TBPM_KONFIGURATIONTableAdapter.Connection.ConnectionString = CONNECTION_STRING - VWPM_CONTROL_INDEXTableAdapter.Connection.ConnectionString = CONNECTION_STRING - TBPM_CONTROL_TABLETableAdapter.Connection.ConnectionString = CONNECTION_STRING - _step = 2 - VWPM_CONTROL_INDEXTableAdapter.Fill(DD_DMSLiteDataSet.VWPM_CONTROL_INDEX, CURRENT_ProfilName) - _step = 3 - TBDD_CONNECTIONTableAdapter.Fill(DD_DMSLiteDataSet.TBDD_CONNECTION) - _step = 4 - TBPM_CONTROL_TABLETableAdapter.FillAll(DD_DMSLiteDataSet.TBPM_CONTROL_TABLE) + Try + _step = 1 + TBPM_FILES_USER_NOT_INDEXEDTableAdapter.Connection.ConnectionString = CONNECTION_STRING + TBPM_PROFILE_CONTROLSTableAdapter.Connection.ConnectionString = CONNECTION_STRING + TBDD_CONNECTIONTableAdapter.Connection.ConnectionString = CONNECTION_STRING + TBPM_PROFILE_FILESTableAdapter.Connection.ConnectionString = CONNECTION_STRING + TBPM_PROFILE_FINAL_INDEXINGTableAdapter.Connection.ConnectionString = CONNECTION_STRING + TBPM_PROFILETableAdapter.Connection.ConnectionString = CONNECTION_STRING + TBPM_KONFIGURATIONTableAdapter.Connection.ConnectionString = CONNECTION_STRING + VWPM_CONTROL_INDEXTableAdapter.Connection.ConnectionString = CONNECTION_STRING + TBPM_CONTROL_TABLETableAdapter.Connection.ConnectionString = CONNECTION_STRING + _step = 2 + VWPM_CONTROL_INDEXTableAdapter.Fill(DD_DMSLiteDataSet.VWPM_CONTROL_INDEX, CURRENT_ProfilName) + _step = 3 + TBDD_CONNECTIONTableAdapter.Fill(DD_DMSLiteDataSet.TBDD_CONNECTION) + _step = 4 + TBPM_CONTROL_TABLETableAdapter.FillAll(DD_DMSLiteDataSet.TBPM_CONTROL_TABLE) - LOGGER.Debug("Profile Data geladen") - 'Catch ex As Exception - ' LOGGER.Error(ex) - ' MsgBox("Error LOADING profile-data(" & _step.ToString & "):" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:") - ' allgFunk.Insert_LogEntry(CURRENT_ProfilGUID, "Error LOADING profile-data: " & ex.Message, Environment.UserName) - ' LOGGER.Info(">> Fehler in LOADING profile-data: " & ex.Message, True) - ' Me.Close() - 'End Try - - 'Try - Delimiter = TBPM_KONFIGURATIONTableAdapter.cmdGetDelimiter - - - If CURRENT_DT_PROFILE.Rows.Count = 0 Then - LOGGER.Info(">> Profildaten konnten nicht geladen werden - Übergebenes Profil: : " & CURRENT_ProfilName, True) - MsgBox("Achtung: Profildaten konnten nicht übergeben oder geladen werden.", MsgBoxStyle.Critical, "Achtung:") + LOGGER.Debug("Profile Data geladen") + Catch ex As Exception + LOGGER.Error(ex) + MsgBox("Error LOADING profile-data(" & _step.ToString & "):" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:") + allgFunk.Insert_LogEntry(CURRENT_ProfilGUID, "Error LOADING profile-data: " & ex.Message, Environment.UserName) + LOGGER.Info(">> Fehler in LOADING profile-data: " & ex.Message, True) Me.Close() - End If - If CURRENT_DT_PROFILE.Rows.Count > 1 Then - MsgBox("Es wurde mehr als 1 Profil (" & CURRENT_DT_PROFILE.Rows.Count & ") zurückgegeben!!", MsgBoxStyle.Critical, "Achtung:") - Else - If CURRENT_DT_PROFILE.Rows.Count = 1 Then - For Each dr As DataRow In CURRENT_DT_PROFILE.Rows - PROFIL_VEKTORINDEX = dr.Item("PM_VEKTOR_INDEX") - PROFIL_LOGINDEX = dr.Item("LOG_INDEX") - Me.Text = "Process Manager - " & dr.Item("TITLE") + End Try - TITLELabel1.Text = dr.Item("TITLE") - DESCRIPTIONLabel.Text = IIf(IsDBNull(dr.Item("DESCRIPTION")), "", dr.Item("DESCRIPTION")) - If PROFIL_VEKTORINDEX.GetType.ToString.ToLower = "system.dbnull" Then - PROFIL_VEKTORINDEX = "" - End If - If PROFIL_LOGINDEX.GetType.ToString.ToLower = "system.dbnull" Then - PROFIL_LOGINDEX = "" - End If + Try + Delimiter = TBPM_KONFIGURATIONTableAdapter.cmdGetDelimiter - WD_Search = dr.Item("WD_SEARCH") - finalProfile = dr.Item("FINAL_PROFILE") - Move2Folder = IIf(IsDBNull(dr.Item("MOVE2Folder")), "", dr.Item("MOVE2Folder")) - Try - If finalProfile = True Then - Dim text As String = IIf(IsDBNull(dr.Item("FINAL_TEXT")), "", dr.Item("FINAL_TEXT")) - If text <> "" Then - btnSave.Text = text & " (F1)" + If CURRENT_DT_PROFILE.Rows.Count = 0 Then + LOGGER.Info(">> Profildaten konnten nicht geladen werden - Übergebenes Profil: : " & CURRENT_ProfilName, True) + MsgBox("Achtung: Profildaten konnten nicht übergeben oder geladen werden.", MsgBoxStyle.Critical, "Achtung:") + Me.Close() + End If + If CURRENT_DT_PROFILE.Rows.Count > 1 Then + MsgBox("Es wurde mehr als 1 Profil (" & CURRENT_DT_PROFILE.Rows.Count & ") zurückgegeben!!", MsgBoxStyle.Critical, "Achtung:") + Else + If CURRENT_DT_PROFILE.Rows.Count = 1 Then + For Each dr As DataRow In CURRENT_DT_PROFILE.Rows + PROFIL_VEKTORINDEX = dr.Item("PM_VEKTOR_INDEX") + PROFIL_LOGINDEX = dr.Item("LOG_INDEX") + Me.Text = "Process Manager - " & dr.Item("TITLE") + + TITLELabel1.Text = dr.Item("TITLE") + DESCRIPTIONLabel.Text = IIf(IsDBNull(dr.Item("DESCRIPTION")), "", dr.Item("DESCRIPTION")) + If PROFIL_VEKTORINDEX.GetType.ToString.ToLower = "system.dbnull" Then + PROFIL_VEKTORINDEX = "" + End If + If PROFIL_LOGINDEX.GetType.ToString.ToLower = "system.dbnull" Then + PROFIL_LOGINDEX = "" + End If + + WD_Search = dr.Item("WD_SEARCH") + finalProfile = dr.Item("FINAL_PROFILE") + Move2Folder = IIf(IsDBNull(dr.Item("MOVE2Folder")), "", dr.Item("MOVE2Folder")) + Try + If finalProfile = True Then + + Dim text As String = IIf(IsDBNull(dr.Item("FINAL_TEXT")), "", dr.Item("FINAL_TEXT")) + If text <> "" Then + btnSave.Text = text & " (F1)" + Else + btnSave.Text = "Validierung speichern - Nächstes Dokument" & " (F1)" + End If Else btnSave.Text = "Validierung speichern - Nächstes Dokument" & " (F1)" End If + LOGGER.Debug("Final profile Text geladen") + Catch ex As Exception + LOGGER.Error(ex) + MsgBox("Error loading final profile text:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:") + allgFunk.Insert_LogEntry(CURRENT_ProfilGUID, "Error loading final profile text: " & ex.Message, Environment.UserName) + LOGGER.Info(">> Fehler in loading final profile text: " & ex.Message, True) + End Try + ToolStripButtonJumpFile.Enabled = True + If CURRENT_JUMP_DOC_GUID <> 0 Then + ToolStripButtonJumpFile.Enabled = False + Anzahl_ValDoks = 1 Else - btnSave.Text = "Validierung speichern - Nächstes Dokument" & " (F1)" - End If - LOGGER.Debug("Final profile Text geladen") - Catch ex As Exception - LOGGER.Error(ex) - MsgBox("Error loading final profile text:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:") - allgFunk.Insert_LogEntry(CURRENT_ProfilGUID, "Error loading final profile text: " & ex.Message, Environment.UserName) - LOGGER.Info(">> Fehler in loading final profile text: " & ex.Message, True) - End Try - ToolStripButtonJumpFile.Enabled = True - If CURRENT_JUMP_DOC_GUID <> 0 Then - ToolStripButtonJumpFile.Enabled = False - Anzahl_ValDoks = 1 - Else - Anzahl_ValDoks = TBPM_PROFILE_FILESTableAdapter.cmdGet_Anzahl(CURRENT_ProfilGUID) + Anzahl_ValDoks = TBPM_PROFILE_FILESTableAdapter.cmdGet_Anzahl(CURRENT_ProfilGUID) + End If + + Next + If LOG_ERRORS_ONLY = False Then + LOGGER.Info(" >> Profildaten gespeichert") + LOGGER.Info(" >> WD_Search: " & WD_Search) + LOGGER.Info(" >> finalProfile: " & finalProfile) + LOGGER.Info(" >> Move2Folder: " & Move2Folder) + LOGGER.Info(" >> Right_Delete: " & USER_RIGHT_FILE_DELETE) End If - Next - If LOG_ERRORS_ONLY = False Then - LOGGER.Info(" >> Profildaten gespeichert") - LOGGER.Info(" >> WD_Search: " & WD_Search) - LOGGER.Info(" >> finalProfile: " & finalProfile) - LOGGER.Info(" >> Move2Folder: " & Move2Folder) - LOGGER.Info(" >> Right_Delete: " & USER_RIGHT_FILE_DELETE) + PROFIL_sortbynewest = CURRENT_DT_PROFILE.Rows(0).Item("SORT_BY_LATEST") + LOGGER.Debug("PROFIL_sortbynewest: " & PROFIL_sortbynewest.ToString) + 'Delete Button anzeigen ja/nein + If USER_RIGHT_FILE_DELETE = True Then + ToolStripButtonDeleteFile.Enabled = True + Else + ToolStripButtonDeleteFile.Enabled = False + End If + + LOGGER.Debug("Right_Delete: " & USER_RIGHT_FILE_DELETE.ToString) + Load_Controls() + + End If - - PROFIL_sortbynewest = CURRENT_DT_PROFILE.Rows(0).Item("SORT_BY_LATEST") - LOGGER.Debug("PROFIL_sortbynewest: " & PROFIL_sortbynewest.ToString) - 'Delete Button anzeigen ja/nein - If USER_RIGHT_FILE_DELETE = True Then - ToolStripButtonDeleteFile.Enabled = True - Else - ToolStripButtonDeleteFile.Enabled = False - End If - - LOGGER.Debug("Right_Delete: " & USER_RIGHT_FILE_DELETE.ToString) - Load_Controls() - - End If - End If - 'Catch ex As Exception - ' LOGGER.Error(ex) - ' MsgBox("Error LOADING Profile-Data1:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:") - ' allgFunk.Insert_LogEntry(CURRENT_ProfilGUID, "Error LOADING(2) Profile-Data: " & ex.Message, Environment.UserName) - ' LOGGER.Info(">> Fehler in LOADING(2) Profile-Data: " & ex.Message, True) - 'End Try - 'Me.lblerror.Visible = False + Catch ex As Exception + LOGGER.Error(ex) + MsgBox("Error LOADING Profile-Data1:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:") + allgFunk.Insert_LogEntry(CURRENT_ProfilGUID, "Error LOADING(2) Profile-Data: " & ex.Message, Environment.UserName) + LOGGER.Info(">> Fehler in LOADING(2) Profile-Data: " & ex.Message, True) + End Try End Sub Public Sub Load_Additional_Searches() @@ -481,121 +481,121 @@ Public Class frmValidator End If End Sub Sub LoadSimpleData(control As Control, controlId As Integer) - 'Try - If TypeOf control Is Label Then Exit Sub + Try + If TypeOf control Is Label Then Exit Sub - Dim sql As String = $"SELECT NAME, CONNECTION_ID, SQL_UEBERPRUEFUNG FROM TBPM_PROFILE_CONTROLS WHERE GUID = {controlId} AND PROFIL_ID = {CURRENT_ProfilGUID} AND LEN(ISNULL(SQL_UEBERPRUEFUNG,'')) > 0 AND SQL_UEBERPRUEFUNG NOT LIKE '%#WMI#%' AND SQL_UEBERPRUEFUNG NOT LIKE '%#CTRL#%'" - Dim dt As DataTable = ClassDatabase.Return_Datatable(sql) + Dim sql As String = $"SELECT NAME, CONNECTION_ID, SQL_UEBERPRUEFUNG FROM TBPM_PROFILE_CONTROLS WHERE GUID = {controlId} AND PROFIL_ID = {CURRENT_ProfilGUID} AND LEN(ISNULL(SQL_UEBERPRUEFUNG,'')) > 0 AND SQL_UEBERPRUEFUNG NOT LIKE '%#WMI#%' AND SQL_UEBERPRUEFUNG NOT LIKE '%#CTRL#%'" + Dim dt As DataTable = ClassDatabase.Return_Datatable(sql) - If IsNothing(dt) Then Exit Sub - If dt.Rows.Count = 0 Then Exit Sub + If IsNothing(dt) Then Exit Sub + If dt.Rows.Count = 0 Then Exit Sub - For Each row As DataRow In dt.Rows - Dim name As String = row.Item("NAME") + For Each row As DataRow In dt.Rows + Dim name As String = row.Item("NAME") - If IsDBNull(row.Item("CONNECTION_ID")) Then Continue For - If IsDBNull(row.Item("SQL_UEBERPRUEFUNG")) Then Continue For + If IsDBNull(row.Item("CONNECTION_ID")) Then Continue For + If IsDBNull(row.Item("SQL_UEBERPRUEFUNG")) Then Continue For - Dim sqlStatement As String = row.Item("SQL_UEBERPRUEFUNG") - Dim connectionId As Integer = row.Item("CONNECTION_ID") + Dim sqlStatement As String = row.Item("SQL_UEBERPRUEFUNG") + Dim connectionId As Integer = row.Item("CONNECTION_ID") - If clsPatterns.HasComplexPatterns(sqlStatement) Then - Continue For - End If + If clsPatterns.HasComplexPatterns(sqlStatement) Then + Continue For + End If - sql = clsPatterns.ReplaceUserValues(sqlStatement, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_EMAIL) - sql = clsPatterns.ReplaceInternalValues(sql) - LOGGER.Debug(">>> sql after ReplaceInternalValues: " & sql) - 'sql = ClassPatterns.ReplaceInternalValues(sqlStatement) - dt = ClassDatabase.Return_Datatable(sql) + sql = clsPatterns.ReplaceUserValues(sqlStatement, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_EMAIL) + sql = clsPatterns.ReplaceInternalValues(sql) + LOGGER.Debug(">>> sql after ReplaceInternalValues: " & sql) + 'sql = ClassPatterns.ReplaceInternalValues(sqlStatement) + dt = ClassDatabase.Return_Datatable(sql) - If IsNothing(dt) Then - MsgBox($"SQL-Query for control {control.Name} is invalid.") - Exit Sub - End If - Dim oValue + If IsNothing(dt) Then + MsgBox($"SQL-Query for control {control.Name} is invalid.") + Exit Sub + End If + Dim oValue - If TypeOf control Is TextBox Then - Try - Dim firstRow As DataRow = dt.Rows(0) - Dim value = firstRow.Item(0) + If TypeOf control Is TextBox Then + Try + Dim firstRow As DataRow = dt.Rows(0) + Dim value = firstRow.Item(0) - control.Text = value - oValue = value - Catch ex As Exception - LOGGER.Error(ex) - clsLogger.Add("Error in LoadSimpleData for TextBox: " & ex.Message) - End Try - ElseIf TypeOf control Is ComboBox Then - Try - Dim comboxBox As ComboBox = control - Dim list As New List(Of String) + control.Text = value + oValue = value + Catch ex As Exception + LOGGER.Error(ex) + clsLogger.Add("Error in LoadSimpleData for TextBox: " & ex.Message) + End Try + ElseIf TypeOf control Is ComboBox Then + Try + Dim comboxBox As ComboBox = control + Dim list As New List(Of String) - For Each _row As DataRow In dt.Rows - list.Add(_row.Item(0)) - Next - - comboxBox.DataSource = list - Catch ex As Exception - LOGGER.Error(ex) - clsLogger.Add("Error in LoadSimpleData for Combobox: " & ex.Message) - End Try - ElseIf TypeOf control Is LookupControl2 Then - Try - Dim lookup As LookupControl2 = control - - lookup.DataSource = dt - Catch ex As Exception - LOGGER.Error(ex) - clsLogger.Add("Error in LoadSimpleData for LookupControl2: " & ex.Message) - End Try - ElseIf TypeOf control Is GridControl Then - Try - Dim dataGridView As GridControl = control - Dim oDataSource As DataTable = dataGridView.DataSource - - If oDataSource Is Nothing OrElse oDataSource.Rows.Count = 0 Then - 'dataGridView.DataSource = dt - - Dim oDatatable As DataTable = dt.Clone() - - For Each oColumn As DataColumn In oDatatable.Columns - If oDataSource.Columns(oColumn.ColumnName) Is Nothing Then - 'oDataSource.Columns.Add(oColumn) - oDataSource.Columns.Add(oColumn.ColumnName, oColumn.DataType) - End If + For Each _row As DataRow In dt.Rows + list.Add(_row.Item(0)) Next - For Each oRow As DataRow In dt.Rows - oDataSource.ImportRow(oRow) - Next + comboxBox.DataSource = list + Catch ex As Exception + LOGGER.Error(ex) + clsLogger.Add("Error in LoadSimpleData for Combobox: " & ex.Message) + End Try + ElseIf TypeOf control Is LookupControl2 Then + Try + Dim lookup As LookupControl2 = control - dataGridView.DataSource = oDataSource - End If - Catch ex As Exception - LOGGER.Error(ex) - clsLogger.Add("Error in LoadSimpleData for DataGridView: " & ex.Message) - End Try - End If - Next - 'Catch ex As Exception - ' LOGGER.Error(ex) - ' MsgBox("Error in LoadSimpleData: " & ex.Message, MsgBoxStyle.Critical) - ' clsLogger.Add("Error in LoadSimpleData: " & ex.Message) - 'End Try + lookup.DataSource = dt + Catch ex As Exception + LOGGER.Error(ex) + clsLogger.Add("Error in LoadSimpleData for LookupControl2: " & ex.Message) + End Try + ElseIf TypeOf control Is GridControl Then + Try + Dim dataGridView As GridControl = control + Dim oDataSource As DataTable = dataGridView.DataSource + + If oDataSource Is Nothing OrElse oDataSource.Rows.Count = 0 Then + 'dataGridView.DataSource = dt + + Dim oDatatable As DataTable = dt.Clone() + + For Each oColumn As DataColumn In oDatatable.Columns + If oDataSource.Columns(oColumn.ColumnName) Is Nothing Then + 'oDataSource.Columns.Add(oColumn) + oDataSource.Columns.Add(oColumn.ColumnName, oColumn.DataType) + End If + Next + + For Each oRow As DataRow In dt.Rows + oDataSource.ImportRow(oRow) + Next + + dataGridView.DataSource = oDataSource + End If + Catch ex As Exception + LOGGER.Error(ex) + clsLogger.Add("Error in LoadSimpleData for DataGridView: " & ex.Message) + End Try + End If + Next + Catch ex As Exception + LOGGER.Error(ex) + MsgBox("Error in LoadSimpleData: " & ex.Message, MsgBoxStyle.Critical) + clsLogger.Add("Error in LoadSimpleData: " & ex.Message) + End Try End Sub - - Sub Load_Controls() Try pnldesigner.Controls.Clear() 'Dim dt As DataTable = DD_DMSLiteDataSet.VWPM_CONTROL_INDEX + Dim oSQL = $"SELECT * FROM TBPM_PROFILE_CONTROLS WHERE PROFIL_ID = {CURRENT_ProfilGUID}" + DTCONTROLS = ClassDatabase.Return_Datatable(oSQL) + - TBPM_PROFILE_CONTROLSTableAdapter.FillByProfil(DD_DMSLiteDataSet.TBPM_PROFILE_CONTROLS, CURRENT_ProfilGUID) Dim oCount As Integer = 0 - Dim oDTProfileControl As DataTable = DD_DMSLiteDataSet.TBPM_PROFILE_CONTROLS - For Each oControlRow As DataRow In oDTProfileControl.Rows + + For Each oControlRow As DataRow In DTCONTROLS.Rows Dim ctrl As Control Select Case oControlRow.Item("CTRL_TYPE").ToString.ToUpper @@ -773,6 +773,18 @@ Public Class frmValidator End If ctrl = lookup + 'Wenn Multiselect false dann prüfen ob abhängiges Control + If CBool(oControlRow.Item("MULTISELECT")) = False Then + Dim filteredData As DataTable = DTCONTROLS.Clone() + Dim oExpression = $"SQL_UEBERPRUEFUNG like '%#CTRL#{ctrl.Name}%'" + DTCONTROLS.Select(oExpression).CopyToDataTable(filteredData, LoadOption.PreserveChanges) + If filteredData.Rows.Count = 1 Then + AddHandler lookup.EditValueChanged, AddressOf onLookUp1 + End If + End If + + 'Return filteredData + 'AddHandler lookup.Leave, AddressOf onLookUp0 'add_DGV(dr.Item("GUID"), dr.Item("CTRL_NAME"), dr.Item("HEIGHT"), dr.Item("WIDTH"), CInt(dr.Item("X_LOC")), CInt(dr.Item("Y_LOC")), dr.Item("READ_ONLY"), dr.Item("LOAD_IDX_VALUE")) 'dr.Item("INDEX_NAME"), Case "CHK" @@ -978,6 +990,68 @@ Public Class frmValidator End Try End Sub + Public Sub onLookUp0(sender As Object, e As System.EventArgs) + Dim oLookup As LookupControl2 = sender + Try + If Not IsNothing(oLookup.SelectedValues) Then + For Each ocont In oLookup.SelectedValues + Dim o = ocont + Next + End If + Catch ex As Exception + + End Try + End Sub + Public Sub onLookUp1(sender As Object, e As System.EventArgs) + Dim oLookup As LookupControl2 = sender + Try + If Not IsNothing(oLookup.SelectedValues) Then + If oLookup.SelectedValues.Count = 1 Then + Dim oLOOKUPValue = oLookup.SelectedValues.Item(0) + Dim oLOOKUPName = oLookup.Name + + Dim oControlID = oLookup.Tag + Dim filteredData As DataTable = DTCONTROLS.Clone() + Dim oExpression = $"SQL_UEBERPRUEFUNG like '%#CTRL#{oLOOKUPName}%'" + DTCONTROLS.Select(oExpression).CopyToDataTable(filteredData, LoadOption.PreserveChanges) + If filteredData.Rows.Count = 1 Then + Dim oDEPENDING_GUID = filteredData.Rows(0).Item("GUID") + Dim oDEPENDING_CtrlName = filteredData.Rows(0).Item("NAME") + If _dependingControl_in_action = True Then + Exit Sub + End If + If Not IsDBNull(filteredData.Rows(0).Item("CONNECTION_ID")) And Not IsDBNull(filteredData.Rows(0).Item("SQL_UEBERPRUEFUNG")) Then + Dim oSqlCommand = IIf(IsDBNull(filteredData.Rows(0).Item("SQL_UEBERPRUEFUNG")), "", filteredData.Rows(0).Item("SQL_UEBERPRUEFUNG")) + oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, pnldesigner, CURRENT_WMFILE, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_EMAIL) + LOGGER.Debug(">>> sql after ReplaceAllValues: " & oSqlCommand) + _dependingControl_in_action = True + Dim oDTDEPENDING_RESULT As DataTable = ClassDatabase.Return_Datatable(oSqlCommand) + Try + 'Dim oDependingLookup As LookupControl2 = pnldesigner.Controls.Find(oDEPENDING_CtrlName, False).FirstOrDefault() + For Each oControl As Control In pnldesigner.Controls + If oControl.Tag = oDEPENDING_GUID Then + Dim oDependingLookup As LookupControl2 = oControl + oDependingLookup.DataSource = oDTDEPENDING_RESULT + _dependingControl_in_action = False + Exit For + End If + + Next + + + Catch ex As Exception + LOGGER.Warn($"Could not get the lookupconbtrol for name {oDEPENDING_CtrlName}") + _dependingControl_in_action = False + End Try + SendKeys.Send("{TAB}") + End If + End If + End If + End If + Catch ex As Exception + LOGGER.Error(ex) + End Try + End Sub Public Sub OnCmbselectedIndex(sender As System.Object, e As System.EventArgs) Dim cmb As ComboBox = sender If cmb.SelectedIndex <> -1 And _Indexe_Loaded = True Then @@ -1208,7 +1282,7 @@ Public Class frmValidator Sub Open_PDF_withStandard() If myWMDocumentPath.ToLower.EndsWith(".pdf") = True Then Dim Proc As New System.Diagnostics.Process - Dim psi As New ProcessStartInfo(Filesystem_Document_Path) + Dim psi As New ProcessStartInfo(PathToWM_File) psi.WindowStyle = ProcessWindowStyle.Minimized Proc.EnableRaisingEvents = True Proc.StartInfo = psi @@ -1262,8 +1336,8 @@ Public Class frmValidator myWMDocumentPath = myWMDocumentPath.Replace("W:", "\\windream\objects") myWMDocumentPath = myWMDocumentPath.Replace("K:", "\\windream\objects") - Filesystem_Document_Path = GetFilesystemDocumentPath(myWMDocumentPath) - LOGGER.Debug("Filesystem_Document_Path: " & Filesystem_Document_Path) + PathToWM_File = GetFilesystemDocPath() + LOGGER.Debug("Filesystem_Document_Path: " & PathToWM_File) CURRENT_DOC_PATH = myWMDocumentPath LOGGER.Debug("CURRENT_DOC_PATH: " & CURRENT_DOC_PATH) @@ -1356,20 +1430,22 @@ Public Class frmValidator pnlpdf.Visible = visible End Sub - - Function GetFilesystemDocumentPath() + Private Function GetFilesystemDocPath() As String LOGGER.Debug($"in GetFilesystemDocumentPath...'") - If IsDBNull(CURRENT_DT_CONFIG.Rows.Item(0).Item("WM_REL_PATH")) Then + Dim oWMRELPATH = CURRENT_DT_CONFIG.Rows.Item(0).Item("WM_REL_PATH") + If IsDBNull(oWMRELPATH) Then LOGGER.Debug($"WM_REL_PATH is null'") CURRENT_DT_CONFIG.Rows.Item(0).Item("WM_REL_PATH") = "\\windream\objects" CURRENT_DT_CONFIG.AcceptChanges() End If - If myWMDocumentPath.StartsWith(CURRENT_DT_CONFIG.Rows.Item(0).Item("WM_REL_PATH")) Then - Return myWMDocumentPath + Dim oResult As String + If myWMDocumentPath.StartsWith(oWMRELPATH) Then + oResult = myWMDocumentPath Else - Return Path.Combine(CURRENT_DT_CONFIG.Rows.Item(0).Item("WM_REL_PATH"), myWMDocumentPath) - End If + oResult = Path.Combine(oWMRELPATH, myWMDocumentPath) + End If + Return oResult End Function Sub Load_Next_Document(first As Boolean) @@ -1379,186 +1455,186 @@ Public Class frmValidator activate_controls(False) oErrorMessage = "" myWMDocumentPath = "" - Filesystem_Document_Path = "" + PathToWM_File = "" CURRENT_HTML_DOC = "" 'Me.lblerror.Visible = False _Indexe_Loaded = False LOGGER.Debug("In Load_Next_Document") - 'Try - If first = True Then - LOGGER.Debug("First Document") - CURRENT_WMFILE = Nothing - Else - LOGGER.Debug("Following Document ") - docCounter += 1 - End If + Try + If first = True Then + LOGGER.Debug("First Document") + CURRENT_WMFILE = Nothing + Else + LOGGER.Debug("Following Document ") + docCounter += 1 + End If - ' Controls nicht beim ersten Laden leeren - If first = False Then - Clear_all_Input() - End If + ' Controls nicht beim ersten Laden leeren + If first = False Then + Clear_all_Input() + End If - 'Select Case navtype - ' Case "next" - ' Case "previous" - ' Case "first" - ' Case "last" - 'End Select - LOGGER.Debug($"CURRENT_JUMP_DOC_GUID: {CURRENT_JUMP_DOC_GUID}'") - If CURRENT_JUMP_DOC_GUID = 0 Then - CURRENT_DOC_GUID = Get_Next_GUID() - Else - LOGGER.Debug($"CURRENT_DOC_PATH: {CURRENT_DOC_PATH}' later: myWMDocumentPath") - myWMDocumentPath = CURRENT_DOC_PATH - Filesystem_Document_Path = GetFilesystemDocumentPath() - End If + 'Select Case navtype + ' Case "next" + ' Case "previous" + ' Case "first" + ' Case "last" + 'End Select + LOGGER.Debug($"CURRENT_JUMP_DOC_GUID: {CURRENT_JUMP_DOC_GUID}'") + If CURRENT_JUMP_DOC_GUID = 0 Then + CURRENT_DOC_GUID = Get_Next_GUID() + Else + LOGGER.Debug($"CURRENT_DOC_PATH: {CURRENT_DOC_PATH}' later: myWMDocumentPath") + myWMDocumentPath = CURRENT_DOC_PATH + PathToWM_File = GetFilesystemDocPath() + End If - LOGGER.Debug("Dokument-GUID: '" & CURRENT_DOC_GUID.ToString & "'") - If CURRENT_DOC_GUID > 0 Then - 'Beschriftung des Navigators - 'lblNavigator_anzDok.Text = position & " of " & Anzahl_ValDoks & " files" - If myWMDocumentPath <> String.Empty Then - ' >> >> >> >> >> >>##### Das Dokument in Bearbeitung nehmen ########################### - TBPM_PROFILE_FILESTableAdapter.CmdSETWORK(True, Environment.UserName, CURRENT_DOC_GUID) - ' ############ Infos eintragen ################# - tsslblDocID.Text = "Document-ID: " & CURRENT_DOC_ID & " - DocGUID: " & CURRENT_DOC_GUID - ' txtDateipfad.Text = Document_Path - tstrlbl_Info.Text = "Datei " & docCounter.ToString & " von " & Anzahl_ValDoks.ToString - LOGGER.Info(">> Validierung für Dokument '" & myWMDocumentPath & "' gestartet") + LOGGER.Debug("Dokument-GUID: '" & CURRENT_DOC_GUID.ToString & "'") + If CURRENT_DOC_GUID > 0 Then + 'Beschriftung des Navigators + 'lblNavigator_anzDok.Text = position & " of " & Anzahl_ValDoks & " files" + If myWMDocumentPath <> String.Empty Then + ' >> >> >> >> >> >>##### Das Dokument in Bearbeitung nehmen ########################### + TBPM_PROFILE_FILESTableAdapter.CmdSETWORK(True, Environment.UserName, CURRENT_DOC_GUID) + ' ############ Infos eintragen ################# + tsslblDocID.Text = "Document-ID: " & CURRENT_DOC_ID & " - DocGUID: " & CURRENT_DOC_GUID + ' txtDateipfad.Text = Document_Path + tstrlbl_Info.Text = "Datei " & docCounter.ToString & " von " & Anzahl_ValDoks.ToString + LOGGER.Info(">> Validierung für Dokument '" & myWMDocumentPath & "' gestartet") - Try - CURRENT_WMFILE = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, WINDREAM.NormalizePath(myWMDocumentPath)) + Try + CURRENT_WMFILE = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, WINDREAM.NormalizePath(myWMDocumentPath)) - Catch ex As Exception - LOGGER.Error(ex) - allgFunk.Insert_LogEntry(CURRENT_ProfilGUID, "Fehler bei Erzeugen windream-Objekt - DocGUID: " & CURRENT_DOC_GUID & " - ERROR: " & ex.Message, Environment.UserName) - LOGGER.Info("Fehler bei Erzeugen windream-Objekt in (LoadNextDokument): " & ex.Message) - LOGGER.Info("Error Number: " & Err.Number.ToString) - Dim _err1 As Boolean = False - 'Nochmaliger Versuch windream zu initialiseren - If Init_windream() = True Then - Try - CURRENT_WMFILE = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, myWMDocumentPath) - Catch ex1 As Exception - LOGGER.Info("Fehler bei 2. Versuch windream-Objekt: " & ex1.Message) - oErrorMessage = "1-Es besteht ein Problem beim Anmelden an windream - Bitte wenden Sie sich an Digital Data!" + Catch ex As Exception + LOGGER.Error(ex) + allgFunk.Insert_LogEntry(CURRENT_ProfilGUID, "Fehler bei Erzeugen windream-Objekt - DocGUID: " & CURRENT_DOC_GUID & " - ERROR: " & ex.Message, Environment.UserName) + LOGGER.Info("Fehler bei Erzeugen windream-Objekt in (LoadNextDokument): " & ex.Message) + LOGGER.Info("Error Number: " & Err.Number.ToString) + Dim _err1 As Boolean = False + 'Nochmaliger Versuch windream zu initialiseren + If Init_windream() = True Then + Try + CURRENT_WMFILE = WINDREAM.oSession.GetWMObjectByPath(WMEntity.WMEntityDocument, myWMDocumentPath) + Catch ex1 As Exception + LOGGER.Info("Fehler bei 2. Versuch windream-Objekt: " & ex1.Message) + oErrorMessage = "1-Es besteht ein Problem beim Anmelden an windream - Bitte wenden Sie sich an Digital Data!" + _err1 = True + End Try + Else + oErrorMessage = "2-Es besteht ein Problem beim Anmelden an windream - Bitte wenden Sie sich an Digital Data!" _err1 = True - End Try + End If + If _err1 = True Then + errormessage = oErrorMessage + frmError.ShowDialog() + Exit Sub + End If + + End Try + + LOGGER.Debug("Windream-Dokument geladen und gelockt") + oErrorMessage = Windream_get_Doc_info() + + LOGGER.Debug("Windream-Dok Info geholt") + If oErrorMessage = "" Then + Me.grpbxMailBody.Visible = False + Me.grpBetreff.Visible = False + + load_viewer() + + If myWMDocumentPath.ToLower.EndsWith(".pdf") Then + ToolStripButtonAnnotation.Visible = True + Else + ToolStripButtonAnnotation.Visible = False + End If + + LOGGER.Debug("Viewer geladen") + + + + FillIndexValues(first) + + For Each oControl As Control In pnldesigner.Controls + LoadSimpleData(oControl, oControl.Tag) + Next + + LOGGER.Debug("Indexmaske geladen") + LOGGER.Debug("") + + 'Nun im Vektoprindex loggen das das Profil geladen wurde + 'If PROFIL_VEKTORINDEX <> "" Then + ' Dim Profilstring = "DD-PM" & Delimiter & "Profil: '" & PROFIL_NAME & "'" & Delimiter & Environment.UserName & Delimiter & Now.ToString + ' If Indexiere_VektorfeldPM(Profilstring, PROFIL_VEKTORINDEX) = False Then + ' If LogErrorsOnly = False Then LOGGER.Info(" >> Profilname erfolgreich in Vektorfeld PM geschrieben") + ' 'Else + ' ' errormessage = "Fehler beim finalen Indexieren:" & vbNewLine & idxerr_message + ' ' My.Settings.Save() + ' ' frmError.ShowDialog() + ' ' _error = True + ' End If + 'End If + 'Nun loggen das das Profil geladen wurde + If PROFIL_LOGINDEX <> "" Then + Dim Profilstring = "DD-PMlog" & Delimiter & "In Profil: '" & CURRENT_ProfilName & "' geladen" & Delimiter & Environment.UserName & Delimiter & Now.ToString + If Indexiere_VektorfeldPM(Profilstring, PROFIL_LOGINDEX) = False Then + LOGGER.Debug("Profilname erfolgreich in Vektorfeld LOG geschrieben") + 'Else + ' errormessage = "Fehler beim finalen Indexieren:" & vbNewLine & idxerr_message + ' My.Settings.Save() + ' frmError.ShowDialog() + ' _error = True + End If + End If + activate_controls(True) Else - oErrorMessage = "2-Es besteht ein Problem beim Anmelden an windream - Bitte wenden Sie sich an Digital Data!" - _err1 = True - End If - If _err1 = True Then errormessage = oErrorMessage frmError.ShowDialog() - Exit Sub End If - - End Try - - LOGGER.Debug("Windream-Dokument geladen und gelockt") - oErrorMessage = Windream_get_Doc_info() - - LOGGER.Debug("Windream-Dok Info geholt") - If oErrorMessage = "" Then - Me.grpbxMailBody.Visible = False - Me.grpBetreff.Visible = False - - load_viewer() - - If myWMDocumentPath.ToLower.EndsWith(".pdf") Then - ToolStripButtonAnnotation.Visible = True - Else - ToolStripButtonAnnotation.Visible = False - End If - - LOGGER.Debug("Viewer geladen") - - - - FillIndexValues(first) - - For Each oControl As Control In pnldesigner.Controls - LoadSimpleData(oControl, oControl.Tag) - Next - - LOGGER.Debug("Indexmaske geladen") - LOGGER.Debug("") - - 'Nun im Vektoprindex loggen das das Profil geladen wurde - 'If PROFIL_VEKTORINDEX <> "" Then - ' Dim Profilstring = "DD-PM" & Delimiter & "Profil: '" & PROFIL_NAME & "'" & Delimiter & Environment.UserName & Delimiter & Now.ToString - ' If Indexiere_VektorfeldPM(Profilstring, PROFIL_VEKTORINDEX) = False Then - ' If LogErrorsOnly = False Then LOGGER.Info(" >> Profilname erfolgreich in Vektorfeld PM geschrieben") - ' 'Else - ' ' errormessage = "Fehler beim finalen Indexieren:" & vbNewLine & idxerr_message - ' ' My.Settings.Save() - ' ' frmError.ShowDialog() - ' ' _error = True - ' End If - 'End If - 'Nun loggen das das Profil geladen wurde - If PROFIL_LOGINDEX <> "" Then - Dim Profilstring = "DD-PMlog" & Delimiter & "In Profil: '" & CURRENT_ProfilName & "' geladen" & Delimiter & Environment.UserName & Delimiter & Now.ToString - If Indexiere_VektorfeldPM(Profilstring, PROFIL_LOGINDEX) = False Then - LOGGER.Debug("Profilname erfolgreich in Vektorfeld LOG geschrieben") - 'Else - ' errormessage = "Fehler beim finalen Indexieren:" & vbNewLine & idxerr_message - ' My.Settings.Save() - ' frmError.ShowDialog() - ' _error = True - End If - End If - activate_controls(True) Else errormessage = oErrorMessage frmError.ShowDialog() End If Else - errormessage = oErrorMessage - frmError.ShowDialog() + If oErrorMessage <> "" Then + errormessage = oErrorMessage + frmError.ShowDialog() + Else + LOGGER.Info(" >> Ende des Profils - Kein weiteres Dokument!") + LOGGER.Info("") + MsgBox("Kein weiteres Dokument gefunden - Ende des Profils!" & vbNewLine & "Das Formular wird nun geschlossen.", MsgBoxStyle.Information, "Hinweis:") + activate_controls(True) + Me.Close() + End If End If - Else - If oErrorMessage <> "" Then - errormessage = oErrorMessage - frmError.ShowDialog() - Else - LOGGER.Info(" >> Ende des Profils - Kein weiteres Dokument!") - LOGGER.Info("") - MsgBox("Kein weiteres Dokument gefunden - Ende des Profils!" & vbNewLine & "Das Formular wird nun geschlossen.", MsgBoxStyle.Information, "Hinweis:") - activate_controls(True) - Me.Close() - End If - End If - 'Catch ex As Exception - ' LOGGER.Error(ex) - ' allgFunk.Insert_LogEntry(CURRENT_ProfilGUID, "Unvorhergesehener Fehler bei Load_Next_Document - DocGUID: " & CURRENT_DOC_GUID & " - ERROR: " & ex.Message, Environment.UserName) - ' errormessage = "Unvorhergesehener Fehler bei Load_Next_Document:" & ex.Message - ' My.Settings.Save() - ' LOGGER.Info("Unvorhergesehener Fehler in Load_Next_Document: " & ex.Message) - ' frmError.ShowDialog() - 'End Try + Catch ex As Exception + LOGGER.Error(ex) + allgFunk.Insert_LogEntry(CURRENT_ProfilGUID, "Unvorhergesehener Fehler bei Load_Next_Document - DocGUID: " & CURRENT_DOC_GUID & " - ERROR: " & ex.Message, Environment.UserName) + errormessage = "Unvorhergesehener Fehler bei Load_Next_Document:" & ex.Message + My.Settings.Save() + LOGGER.Info("Unvorhergesehener Fehler in Load_Next_Document: " & ex.Message) + frmError.ShowDialog() + End Try End Sub Sub load_viewer() If VIEWER_ALL = "uviewer" Then pdfxchange = False sumatra = False - If Filesystem_Document_Path.ToLower.EndsWith(".msg") Then + If PathToWM_File.ToLower.EndsWith(".msg") Then Show_Email() Else - ShowFile_UniversalViewer(Filesystem_Document_Path) + ShowFile_UniversalViewer(PathToWM_File) End If ElseIf VIEWER_ALL = "docview" Then PdfControls_visible(False) - If Filesystem_Document_Path.ToLower.EndsWith(".pdf") And VIEWER_PDF <> "none" Then + If PathToWM_File.ToLower.EndsWith(".pdf") And VIEWER_PDF <> "none" Then Select Case VIEWER_PDF Case "internal" SplitContainer1.Panel2Collapsed = False - PdfViewer1.LoadDocument(Filesystem_Document_Path) - LOGGER.Debug("Internal Viewer Path: " & Filesystem_Document_Path) + PdfViewer1.LoadDocument(PathToWM_File) + LOGGER.Debug("Internal Viewer Path: " & PathToWM_File) PdfControls_visible(True) Me.Size = My.Settings.frmValidation_Size_PDFViewer 'PdfViewer1.ZoomFactor = PDFViewer_ZoomMode @@ -1567,14 +1643,14 @@ Public Class frmValidator sumatra = False Case "pdfxchange" SplitContainer1.Panel2Collapsed = True - Open_PDFXCHANGE(Filesystem_Document_Path) + Open_PDFXCHANGE(PathToWM_File) pdfxchange = True sumatra = False System.Threading.Thread.Sleep(1000) Me.Size = My.Settings.frmValidatorSize Case "sumatra" SplitContainer1.Panel2Collapsed = True - Open_Sumatra(Filesystem_Document_Path) + Open_Sumatra(PathToWM_File) sumatra = True pdfxchange = False System.Threading.Thread.Sleep(1000) @@ -1587,7 +1663,7 @@ Public Class frmValidator System.Threading.Thread.Sleep(1000) Me.Size = My.Settings.frmValidatorSize End Select - ElseIf Filesystem_Document_Path.ToLower.EndsWith(".msg") Then + ElseIf PathToWM_File.ToLower.EndsWith(".msg") Then Show_Email() Else SplitContainer1.Panel2Collapsed = True @@ -1614,8 +1690,8 @@ Public Class frmValidator End If End Sub Sub Show_Email() - Try - Me.grpBetreff.Dock = DockStyle.Top + + Me.grpBetreff.Dock = DockStyle.Top Me.grpbxMailBody.Dock = DockStyle.Fill Dim msg_email As New Msg.Message(myWMDocumentPath) 'Eine tempfile generieren @@ -1628,32 +1704,32 @@ Public Class frmValidator End If Me.txtBetreff.Text = msg_email.Subject - 'Try - Dim wFile As System.IO.FileStream - Dim byteData() As Byte - byteData = msg_email.BodyHtml + Try + Dim wFile As System.IO.FileStream + Dim byteData() As Byte + byteData = msg_email.BodyHtml - ' MsgBox(msg_email.InternetCodePage) - ' wFile = New FileStream(tempFilename, FileMode.Append) - ' wFile.Write(byteData, 0, byteData.Length) - ' wFile.Close() - 'Catch ex As IOException - ' MsgBox(ex.ToString) - 'End Try + ' MsgBox(msg_email.InternetCodePage) + ' wFile = New FileStream(tempFilename, FileMode.Append) + ' wFile.Write(byteData, 0, byteData.Length) + ' wFile.Close() + 'Catch ex As IOException + ' MsgBox(ex.ToString) + 'End Try - Dim vIn() As Byte = msg_email.BodyHtml - Dim vOut As String = System.Text.Encoding.UTF8.GetString(vIn) - File.WriteAllText(tempFilename, vOut, System.Text.Encoding.UTF8) + Dim vIn() As Byte = msg_email.BodyHtml + Dim vOut As String = System.Text.Encoding.UTF8.GetString(vIn) + File.WriteAllText(tempFilename, vOut, System.Text.Encoding.UTF8) - CURRENT_HTML_DOC = tempFilename - Me.tslblWebbrowser.Text = CURRENT_HTML_DOC - WebBrowser.Navigate("file:///" & CURRENT_HTML_DOC) - SplitContainer1.Panel2Collapsed = False - Me.Size = My.Settings.frmValidation_Size_Email - Me.grpbxMailBody.Visible = True - Me.grpBetreff.Visible = True - Catch ex As Exception - LOGGER.Error(ex) + CURRENT_HTML_DOC = tempFilename + Me.tslblWebbrowser.Text = CURRENT_HTML_DOC + WebBrowser.Navigate("file:///" & CURRENT_HTML_DOC) + SplitContainer1.Panel2Collapsed = False + Me.Size = My.Settings.frmValidation_Size_Email + Me.grpbxMailBody.Visible = True + Me.grpBetreff.Visible = True + Catch ex As Exception + LOGGER.Error(ex) errormessage = "Unvorhergesehener Fehler bei Show_Email:" & ex.Message LOGGER.Info("Unvorhergesehener Fehler in Show_Email: " & ex.Message) My.Settings.Save() @@ -1947,100 +2023,355 @@ Public Class frmValidator Sub FillIndexValues(first As Boolean) Dim oControlType As String Dim oIndexName As String - 'Try - If DD_DMSLiteDataSet.VWPM_CONTROL_INDEX.Rows.Count > 0 Then - Dim oCount As Integer = 0 - For Each oControl As Control In Me.pnldesigner.Controls - Dim oControlId = oControl.Tag - Dim oControlRow = (From form In DD_DMSLiteDataSet.VWPM_CONTROL_INDEX.AsEnumerable() - Select form - Where form.Item("GUID") = oControlId).Single() + Try + If DD_DMSLiteDataSet.VWPM_CONTROL_INDEX.Rows.Count > 0 Then + Dim oCount As Integer = 0 + For Each oControl As Control In Me.pnldesigner.Controls + Dim oControlId = oControl.Tag + Dim oControlRow = (From form In DD_DMSLiteDataSet.VWPM_CONTROL_INDEX.AsEnumerable() + Select form + Where form.Item("GUID") = oControlId).Single() - Dim oType As String = oControl.GetType.ToString - Dim oTyp As String = oControlRow.Item("CTRL_TYPE") - Dim oWMIndexName As String = oControlRow.Item("INDEX_NAME") - ' Wenn kein defaultValue existiert, leeren String setzen - Dim oDefaultValue As String = NotNull(oControlRow.Item("DEFAULT_VALUE"), String.Empty) - oIndexName = oWMIndexName + Dim oType As String = oControl.GetType.ToString + Dim oTyp As String = oControlRow.Item("CTRL_TYPE") + Dim oWMIndexName As String = oControlRow.Item("INDEX_NAME") + ' Wenn kein defaultValue existiert, leeren String setzen + Dim oDefaultValue As String = NotNull(oControlRow.Item("DEFAULT_VALUE"), String.Empty) + oIndexName = oWMIndexName - Dim oLoadIndex As Boolean = oControlRow.Item("LOAD_IDX_VALUE") - LOGGER.Debug("INDEX: " & oWMIndexName & " - CONTROLNAME: " & oControl.Name & " - LOAD IDXVALUES: " & oLoadIndex.ToString) + Dim oLoadIndex As Boolean = oControlRow.Item("LOAD_IDX_VALUE") + LOGGER.Debug("INDEX: " & oWMIndexName & " - CONTROLNAME: " & oControl.Name & " - LOAD IDXVALUES: " & oLoadIndex.ToString) - _CURRENT_INDEX_ARRAY(oCount, 0) = oWMIndexName - Select Case oType - Case "System.Windows.Forms.TextBox" - Try - oControlType = "Textbox" + _CURRENT_INDEX_ARRAY(oCount, 0) = oWMIndexName + Select Case oType + Case "System.Windows.Forms.TextBox" + Try + oControlType = "Textbox" + If oWMIndexName = "" Then + MsgBox("Achtung fehlerhafte Konfiguration:" & vbNewLine & "Für das Control " & oControl.Name & " wurde KEIN INDEX hinterlegt!" & vbNewLine & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical) + Exit For + End If + If oWMIndexName Is Nothing = False Then + If oLoadIndex = False Or oWMIndexName = "DD PM-ONLY FOR DISPLAY" Then + ' Wenn kein Index exisitiert, defaultValue laden + oControl.Text = oDefaultValue + _CURRENT_INDEX_ARRAY(oCount, 1) = oDefaultValue + LOGGER.Debug("Indexwert soll nicht geladen werden.") + Exit Select + End If + Dim wertWD + + If oWMIndexName.StartsWith("[%VKT") And PROFIL_VEKTORINDEX <> "" Then + wertWD = ReturnVektor_IndexValue(oWMIndexName) + Else + wertWD = CURRENT_WMFILE.GetVariableValue(oWMIndexName) + If wertWD Is Nothing Then + wertWD = "" + Else + If wertWD.ToString = "System.Object[]" Then + LOGGER.Debug("TextBox with VektorField: " & oWMIndexName) + If wertWD.length = 1 Then + wertWD = wertWD(0) + _CURRENT_INDEX_ARRAY(oCount, 1) = wertWD(0) + Else ' + LOGGER.Info(" >> Vectorfield " & oWMIndexName & "' contains more then one value - First value will be used") + wertWD = wertWD(0) + _CURRENT_INDEX_ARRAY(oCount, 1) = wertWD(0) + End If + End If + End If + + End If + + oControl.Text = NotNull(wertWD, oDefaultValue) + _CURRENT_INDEX_ARRAY(oCount, 1) = NotNull(wertWD, oDefaultValue) + + End If + Catch ex As Exception + LOGGER.Error(ex) + errormessage = "Unvorhergesehener Fehler bei FillIndexValues TextBox:" & vbNewLine & ex.Message & vbNewLine & "Check Logfile" + My.Settings.Save() + frmError.ShowDialog() + LOGGER.Info(">> Unvorhergesehener Fehler bei FillIndexValuesTextBox: " & ex.Message, True) + LOGGER.Info(">> Controltype: " & oControlType) + LOGGER.Info(">> Indexname windream: " & oIndexName) + Exit Sub + End Try + + Case "System.Windows.Forms.ComboBox" + oControlType = "ComboBox" + Dim cmb As ComboBox = oControl + Try + If oWMIndexName = "" Then + MsgBox("Achtung fehlerhafte Konfiguration:" & vbNewLine & "Für das Control " & oControl.Name & " wurde KEIN INDEX hinterlegt!" & vbNewLine & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical) + Exit For + End If + If oWMIndexName Is Nothing = False Then + If oLoadIndex = False Or oWMIndexName = "DD PM-ONLY FOR DISPLAY" Then + If oDefaultValue = String.Empty Then + cmb.SelectedIndex = -1 + Else + cmb.Text = oDefaultValue + _CURRENT_INDEX_ARRAY(oCount, 1) = oDefaultValue + End If + LOGGER.Debug("Indexwert soll nicht geladen werden.") + Exit Select + End If + Dim wertWD + If oWMIndexName.StartsWith("[%VKT") And PROFIL_VEKTORINDEX <> "" Then + wertWD = ReturnVektor_IndexValue(oWMIndexName) + Else + wertWD = CURRENT_WMFILE.GetVariableValue(oWMIndexName) + End If + + If wertWD Is Nothing Then + LOGGER.Debug($"Indexwert aus index {oWMIndexName}: Nothing") + If oDefaultValue = String.Empty Then + LOGGER.Debug($"Indexwert-defaultValue wurde nicht gefunden") + cmb.SelectedIndex = -1 + Else + LOGGER.Debug($"Indexwert-defaultValue wird geladen") + cmb.Text = oDefaultValue + _CURRENT_INDEX_ARRAY(oCount, 1) = oDefaultValue + 'cmb.SelectedIndex = cmb.FindStringExact(defaultValue) + End If + Else + LOGGER.Debug($"Indexwert aus index {oWMIndexName}: {wertWD}") + LOGGER.Debug($"Items in Combobox: {cmb.Items.Count}") + + + LOGGER.Debug($"Index Wert wurde gesetzt") + cmb.Text = wertWD + _CURRENT_INDEX_ARRAY(oCount, 1) = wertWD + 'If cmb.Items.Count = 0 Then + ' If LogErrorsOnly = False Then LOGGER.Info($"Index Wert wurde gesetzt") + ' cmb.Text = wertWD + 'Else + ' If LogErrorsOnly = False Then LOGGER.Info($"Index Wert wurde ausgewählt") + ' cmb.SelectedIndex = cmb.FindStringExact(wertWD) + 'End If + End If + End If + Catch ex As Exception + LOGGER.Error(ex) + LOGGER.Info(">> Unvorhergesehener Fehler bei FillIndexValues(Combobox: " & cmb.Name & "): " & ex.Message, True) + LOGGER.Info(">> Controltype: " & oControlType) + LOGGER.Info(">> Indexname windream: " & oIndexName) + errormessage = "Unvorhergesehener Fehler bei FillIndexValues(Combobox: " & cmb.Name & "): " & vbNewLine & ex.Message & vbNewLine & "Check Logfile" + My.Settings.Save() + frmError.ShowDialog() + + End Try + + Case "System.Windows.Forms.DataGridView" + oControlType = "DataGridView" + Dim dgv As DataGridView = oControl If oWMIndexName = "" Then MsgBox("Achtung fehlerhafte Konfiguration:" & vbNewLine & "Für das Control " & oControl.Name & " wurde KEIN INDEX hinterlegt!" & vbNewLine & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical) Exit For End If If oWMIndexName Is Nothing = False Then - If oLoadIndex = False Or oWMIndexName = "DD PM-ONLY FOR DISPLAY" Then - ' Wenn kein Index exisitiert, defaultValue laden - oControl.Text = oDefaultValue - _CURRENT_INDEX_ARRAY(oCount, 1) = oDefaultValue + If oLoadIndex = False Then LOGGER.Debug("Indexwert soll nicht geladen werden.") Exit Select End If - Dim wertWD + LOGGER.Debug($"getting wmValue for Index {oWMIndexName}...") + Dim wertWD = CURRENT_WMFILE.GetVariableValue(oWMIndexName) + + If wertWD Is Nothing = False Then + 'Es wird gegen ein Vektorfeld nachindexiert + If wertWD.GetType.ToString.Contains("System.Object") Then + Select Case oTyp + 'Tabellendarstellung + Case "TABLE" + + Dim dt As DataTable = ClassDatabase.Return_Datatable("SELECT * FROM TBPM_CONTROL_TABLE WHERE CONTROL_ID = " & oControlId) + Dim SpaltenWerte As String() + LOGGER.Debug($"{dt.Rows.Count} Columns configured for control {oControlId}.") + If dt.Rows.Count > 1 Then + For Each Zeile As Object In wertWD + LOGGER.Debug($"vektorrow Value {Zeile.ToString}...") + SpaltenWerte = Split(Zeile, Delimiter) + Select Case dt.Rows.Count + Case 1 + dgv.Rows.Add(New String() {Zeile.ToString}) + Case 2 + If SpaltenWerte.Length = 2 Then + dgv.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1)}) + Else + dgv.Rows.Add(New String() {SpaltenWerte(0), ""}) + End If + Case 3 + If SpaltenWerte.Length = 3 Then + dgv.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1), SpaltenWerte(2)}) + ElseIf SpaltenWerte.Length = 2 Then + dgv.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1), ""}) + Else + dgv.Rows.Add(New String() {SpaltenWerte(0), "", ""}) + End If + Case 4 + If SpaltenWerte.Length = 4 Then + dgv.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1), SpaltenWerte(2), SpaltenWerte(3)}) + ElseIf SpaltenWerte.Length = 3 Then + dgv.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1), SpaltenWerte(2), ""}) + ElseIf SpaltenWerte.Length = 2 Then + dgv.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1), "", ""}) + Else + dgv.Rows.Add(New String() {SpaltenWerte(0), "", "", ""}) + End If + + End Select + Next + End If + + Case Else + 'es handelt sich um ein einfaches Vektorfeld mit einem Wert + For Each obj As Object In wertWD + If obj Is Nothing = False Then + dgv.Rows.Add(New String() {obj.ToString}) + + End If + + Next + End Select + + + End If + End If + End If + Case "DevExpress.XtraGrid.GridControl" + oControlType = "DataGridView" + Dim dgv As GridControl = oControl + If oWMIndexName = "" Then + MsgBox("Achtung fehlerhafte Konfiguration:" & vbNewLine & "Für das Control " & oControl.Name & " wurde KEIN INDEX hinterlegt!" & vbNewLine & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical) + Exit For + End If + If oWMIndexName Is Nothing = False Then + If oLoadIndex = False Then + LOGGER.Debug("Indexwert soll nicht geladen werden.") + Exit Select + End If + LOGGER.Debug($"getting wmValue for Index {oWMIndexName}...") + Dim wertWD = CURRENT_WMFILE.GetVariableValue(oWMIndexName) + + If wertWD Is Nothing = False Then + 'Es wird gegen ein Vektorfeld nachindexiert + If wertWD.GetType.ToString.Contains("System.Object") Then + Select Case oTyp + 'Tabellendarstellung + Case "TABLE" + Dim dt As DataTable = ClassDatabase.Return_Datatable("SELECT * FROM TBPM_CONTROL_TABLE WHERE CONTROL_ID = " & oControlId) + + Dim SpaltenWerte As String() + LOGGER.Debug($"{dt.Rows.Count} Columns configured for control {oControlId}.") + If dt.Rows.Count > 1 Then + Dim oDataSource As DataTable = dgv.DataSource + oDataSource.Rows.Clear() + + For Each Zeile As Object In wertWD + LOGGER.Debug($"vektorrow Value {Zeile.ToString}...") + SpaltenWerte = Split(Zeile, Delimiter) + + + + Select Case dt.Rows.Count + Case 1 + oDataSource.Rows.Add(New String() {Zeile.ToString}) + 'dgv.Rows.Add(New String() {Zeile.ToString}) + Case 2 + If SpaltenWerte.Length = 2 Then + oDataSource.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1)}) + 'dgv.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1)}) + Else + oDataSource.Rows.Add(New String() {SpaltenWerte(0), ""}) + 'dgv.Rows.Add(New String() {SpaltenWerte(0), ""}) + End If + Case 3 + If SpaltenWerte.Length = 3 Then + oDataSource.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1), SpaltenWerte(2)}) + 'dgv.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1), SpaltenWerte(2)}) + ElseIf SpaltenWerte.Length = 2 Then + oDataSource.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1), ""}) + 'dgv.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1), ""}) + Else + oDataSource.Rows.Add(New String() {SpaltenWerte(0), "", ""}) + 'dgv.Rows.Add(New String() {SpaltenWerte(0), "", ""}) + End If + Case 4 + If SpaltenWerte.Length = 4 Then + oDataSource.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1), SpaltenWerte(2), SpaltenWerte(3)}) + 'dgv.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1), SpaltenWerte(2), SpaltenWerte(3)}) + ElseIf SpaltenWerte.Length = 3 Then + oDataSource.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1), SpaltenWerte(2), ""}) + 'dgv.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1), SpaltenWerte(2), ""}) + ElseIf SpaltenWerte.Length = 2 Then + oDataSource.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1), "", ""}) + 'dgv.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1), "", ""}) + Else + oDataSource.Rows.Add(New String() {SpaltenWerte(0), "", "", ""}) + 'dgv.Rows.Add(New String() {SpaltenWerte(0), "", "", ""}) + End If + + End Select + Next + End If + + Case Else + 'es handelt sich um ein einfaches Vektorfeld mit einem Wert + Dim oDataSource As DataTable = dgv.DataSource + For Each obj As Object In wertWD + If obj Is Nothing = False Then + oDataSource.Rows.Add(New String() {obj.ToString}) + 'dgv.Rows.Add(New String() {obj.ToString}) + + End If + + Next + End Select + + + End If - If oWMIndexName.StartsWith("[%VKT") And PROFIL_VEKTORINDEX <> "" Then - wertWD = ReturnVektor_IndexValue(oWMIndexName) Else - wertWD = CURRENT_WMFILE.GetVariableValue(oWMIndexName) - If wertWD Is Nothing Then - wertWD = "" - Else - If wertWD.ToString = "System.Object[]" Then - LOGGER.Debug("TextBox with VektorField: " & oWMIndexName) - If wertWD.length = 1 Then - wertWD = wertWD(0) - _CURRENT_INDEX_ARRAY(oCount, 1) = wertWD(0) - Else ' - LOGGER.Info(" >> Vectorfield " & oWMIndexName & "' contains more then one value - First value will be used") - wertWD = wertWD(0) - _CURRENT_INDEX_ARRAY(oCount, 1) = wertWD(0) - End If + If first = False Then + Dim oDataSource As DataTable = dgv.DataSource + + If oDataSource.Rows.Count > 0 Then + oDataSource.Rows.Clear() + End If + + End If + End If + End If + Case "System.Windows.Forms.CheckBox" + LOGGER.Debug("Loading checkbox.") + oControlType = "CheckBox" + If oWMIndexName = "" Then + MsgBox("Achtung fehlerhafte Konfiguration:" & vbNewLine & "Für das Control " & oControl.Name & " wurde KEIN INDEX hinterlegt!" & vbNewLine & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical) + Exit For + End If + If oWMIndexName Is Nothing = False Then + + Dim chk As CheckBox = oControl + + If oLoadIndex = False Or oWMIndexName = "DD PM-ONLY FOR DISPLAY" Then + LOGGER.Debug("Indexwert soll nicht geladen werden.") + Else + + If oDefaultValue <> String.Empty Then + Dim result = False + _CURRENT_INDEX_ARRAY(oCount, 1) = oDefaultValue + If Boolean.TryParse(oDefaultValue, result) Then + chk.Checked = result + End If End If - End If - - oControl.Text = NotNull(wertWD, oDefaultValue) - _CURRENT_INDEX_ARRAY(oCount, 1) = NotNull(wertWD, oDefaultValue) - - End If - Catch ex As Exception - LOGGER.Error(ex) - errormessage = "Unvorhergesehener Fehler bei FillIndexValues TextBox:" & vbNewLine & ex.Message & vbNewLine & "Check Logfile" - My.Settings.Save() - frmError.ShowDialog() - LOGGER.Info(">> Unvorhergesehener Fehler bei FillIndexValuesTextBox: " & ex.Message, True) - LOGGER.Info(">> Controltype: " & oControlType) - LOGGER.Info(">> Indexname windream: " & oIndexName) - Exit Sub - End Try - - Case "System.Windows.Forms.ComboBox" - oControlType = "ComboBox" - Dim cmb As ComboBox = oControl - Try - If oWMIndexName = "" Then - MsgBox("Achtung fehlerhafte Konfiguration:" & vbNewLine & "Für das Control " & oControl.Name & " wurde KEIN INDEX hinterlegt!" & vbNewLine & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical) - Exit For - End If - If oWMIndexName Is Nothing = False Then - If oLoadIndex = False Or oWMIndexName = "DD PM-ONLY FOR DISPLAY" Then - If oDefaultValue = String.Empty Then - cmb.SelectedIndex = -1 - Else - cmb.Text = oDefaultValue - _CURRENT_INDEX_ARRAY(oCount, 1) = oDefaultValue - End If - LOGGER.Debug("Indexwert soll nicht geladen werden.") Exit Select End If + + + LOGGER.Debug("Loading Index value from Windream.") Dim wertWD If oWMIndexName.StartsWith("[%VKT") And PROFIL_VEKTORINDEX <> "" Then wertWD = ReturnVektor_IndexValue(oWMIndexName) @@ -2048,426 +2379,181 @@ Public Class frmValidator wertWD = CURRENT_WMFILE.GetVariableValue(oWMIndexName) End If + If wertWD Is Nothing Then - LOGGER.Debug($"Indexwert aus index {oWMIndexName}: Nothing") - If oDefaultValue = String.Empty Then - LOGGER.Debug($"Indexwert-defaultValue wurde nicht gefunden") - cmb.SelectedIndex = -1 - Else - LOGGER.Debug($"Indexwert-defaultValue wird geladen") - cmb.Text = oDefaultValue - _CURRENT_INDEX_ARRAY(oCount, 1) = oDefaultValue - 'cmb.SelectedIndex = cmb.FindStringExact(defaultValue) - End If + LOGGER.Info(">> Zurückgegebener Wert des Wertes für Checkbox mit Indexname '" & oIndexName & "' ist nothing. Check defaultvalue") + chk.Checked = False Else - LOGGER.Debug($"Indexwert aus index {oWMIndexName}: {wertWD}") - LOGGER.Debug($"Items in Combobox: {cmb.Items.Count}") - - - LOGGER.Debug($"Index Wert wurde gesetzt") - cmb.Text = wertWD - _CURRENT_INDEX_ARRAY(oCount, 1) = wertWD - 'If cmb.Items.Count = 0 Then - ' If LogErrorsOnly = False Then LOGGER.Info($"Index Wert wurde gesetzt") - ' cmb.Text = wertWD - 'Else - ' If LogErrorsOnly = False Then LOGGER.Info($"Index Wert wurde ausgewählt") - ' cmb.SelectedIndex = cmb.FindStringExact(wertWD) - 'End If - End If - End If - Catch ex As Exception - LOGGER.Error(ex) - LOGGER.Info(">> Unvorhergesehener Fehler bei FillIndexValues(Combobox: " & cmb.Name & "): " & ex.Message, True) - LOGGER.Info(">> Controltype: " & oControlType) - LOGGER.Info(">> Indexname windream: " & oIndexName) - errormessage = "Unvorhergesehener Fehler bei FillIndexValues(Combobox: " & cmb.Name & "): " & vbNewLine & ex.Message & vbNewLine & "Check Logfile" - My.Settings.Save() - frmError.ShowDialog() - - End Try - - Case "System.Windows.Forms.DataGridView" - oControlType = "DataGridView" - Dim dgv As DataGridView = oControl - If oWMIndexName = "" Then - MsgBox("Achtung fehlerhafte Konfiguration:" & vbNewLine & "Für das Control " & oControl.Name & " wurde KEIN INDEX hinterlegt!" & vbNewLine & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical) - Exit For - End If - If oWMIndexName Is Nothing = False Then - If oLoadIndex = False Then - LOGGER.Debug("Indexwert soll nicht geladen werden.") - Exit Select - End If - LOGGER.Debug($"getting wmValue for Index {oWMIndexName}...") - Dim wertWD = CURRENT_WMFILE.GetVariableValue(oWMIndexName) - - If wertWD Is Nothing = False Then - 'Es wird gegen ein Vektorfeld nachindexiert - If wertWD.GetType.ToString.Contains("System.Object") Then - Select Case oTyp - 'Tabellendarstellung - Case "TABLE" - - Dim dt As DataTable = ClassDatabase.Return_Datatable("SELECT * FROM TBPM_CONTROL_TABLE WHERE CONTROL_ID = " & oControlId) - Dim SpaltenWerte As String() - LOGGER.Debug($"{dt.Rows.Count} Columns configured for control {oControlId}.") - If dt.Rows.Count > 1 Then - For Each Zeile As Object In wertWD - LOGGER.Debug($"vektorrow Value {Zeile.ToString}...") - SpaltenWerte = Split(Zeile, Delimiter) - Select Case dt.Rows.Count - Case 1 - dgv.Rows.Add(New String() {Zeile.ToString}) - Case 2 - If SpaltenWerte.Length = 2 Then - dgv.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1)}) - Else - dgv.Rows.Add(New String() {SpaltenWerte(0), ""}) - End If - Case 3 - If SpaltenWerte.Length = 3 Then - dgv.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1), SpaltenWerte(2)}) - ElseIf SpaltenWerte.Length = 2 Then - dgv.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1), ""}) - Else - dgv.Rows.Add(New String() {SpaltenWerte(0), "", ""}) - End If - Case 4 - If SpaltenWerte.Length = 4 Then - dgv.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1), SpaltenWerte(2), SpaltenWerte(3)}) - ElseIf SpaltenWerte.Length = 3 Then - dgv.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1), SpaltenWerte(2), ""}) - ElseIf SpaltenWerte.Length = 2 Then - dgv.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1), "", ""}) - Else - dgv.Rows.Add(New String() {SpaltenWerte(0), "", "", ""}) - End If - - End Select - Next + LOGGER.Debug("Index value loaded: " & wertWD.ToString) + _CURRENT_INDEX_ARRAY(oCount, 1) = wertWD.ToString + If wertWD.ToString = "" Then + LOGGER.Info(">> Versuch, default Value zu laden") + If oDefaultValue <> String.Empty Then + Dim result = False + If Boolean.TryParse(oDefaultValue, result) Then + LOGGER.Info(">> defaultValue wurde geladen") + chk.Checked = result + Else + chk.Checked = False End If - - Case Else - 'es handelt sich um ein einfaches Vektorfeld mit einem Wert - For Each obj As Object In wertWD - If obj Is Nothing = False Then - dgv.Rows.Add(New String() {obj.ToString}) - - End If - - Next - End Select - - - End If - End If - End If - Case "DevExpress.XtraGrid.GridControl" - oControlType = "DataGridView" - Dim dgv As GridControl = oControl - If oWMIndexName = "" Then - MsgBox("Achtung fehlerhafte Konfiguration:" & vbNewLine & "Für das Control " & oControl.Name & " wurde KEIN INDEX hinterlegt!" & vbNewLine & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical) - Exit For - End If - If oWMIndexName Is Nothing = False Then - If oLoadIndex = False Then - LOGGER.Debug("Indexwert soll nicht geladen werden.") - Exit Select - End If - LOGGER.Debug($"getting wmValue for Index {oWMIndexName}...") - Dim wertWD = CURRENT_WMFILE.GetVariableValue(oWMIndexName) - - If wertWD Is Nothing = False Then - 'Es wird gegen ein Vektorfeld nachindexiert - If wertWD.GetType.ToString.Contains("System.Object") Then - Select Case oTyp - 'Tabellendarstellung - Case "TABLE" - Dim dt As DataTable = ClassDatabase.Return_Datatable("SELECT * FROM TBPM_CONTROL_TABLE WHERE CONTROL_ID = " & oControlId) - - Dim SpaltenWerte As String() - LOGGER.Debug($"{dt.Rows.Count} Columns configured for control {oControlId}.") - If dt.Rows.Count > 1 Then - Dim oDataSource As DataTable = dgv.DataSource - oDataSource.Rows.Clear() - - For Each Zeile As Object In wertWD - LOGGER.Debug($"vektorrow Value {Zeile.ToString}...") - SpaltenWerte = Split(Zeile, Delimiter) - - - - Select Case dt.Rows.Count - Case 1 - oDataSource.Rows.Add(New String() {Zeile.ToString}) - 'dgv.Rows.Add(New String() {Zeile.ToString}) - Case 2 - If SpaltenWerte.Length = 2 Then - oDataSource.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1)}) - 'dgv.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1)}) - Else - oDataSource.Rows.Add(New String() {SpaltenWerte(0), ""}) - 'dgv.Rows.Add(New String() {SpaltenWerte(0), ""}) - End If - Case 3 - If SpaltenWerte.Length = 3 Then - oDataSource.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1), SpaltenWerte(2)}) - 'dgv.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1), SpaltenWerte(2)}) - ElseIf SpaltenWerte.Length = 2 Then - oDataSource.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1), ""}) - 'dgv.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1), ""}) - Else - oDataSource.Rows.Add(New String() {SpaltenWerte(0), "", ""}) - 'dgv.Rows.Add(New String() {SpaltenWerte(0), "", ""}) - End If - Case 4 - If SpaltenWerte.Length = 4 Then - oDataSource.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1), SpaltenWerte(2), SpaltenWerte(3)}) - 'dgv.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1), SpaltenWerte(2), SpaltenWerte(3)}) - ElseIf SpaltenWerte.Length = 3 Then - oDataSource.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1), SpaltenWerte(2), ""}) - 'dgv.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1), SpaltenWerte(2), ""}) - ElseIf SpaltenWerte.Length = 2 Then - oDataSource.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1), "", ""}) - 'dgv.Rows.Add(New String() {SpaltenWerte(0), SpaltenWerte(1), "", ""}) - Else - oDataSource.Rows.Add(New String() {SpaltenWerte(0), "", "", ""}) - 'dgv.Rows.Add(New String() {SpaltenWerte(0), "", "", ""}) - End If - - End Select - Next - End If - - Case Else - 'es handelt sich um ein einfaches Vektorfeld mit einem Wert - Dim oDataSource As DataTable = dgv.DataSource - For Each obj As Object In wertWD - If obj Is Nothing = False Then - oDataSource.Rows.Add(New String() {obj.ToString}) - 'dgv.Rows.Add(New String() {obj.ToString}) - - End If - - Next - End Select - - - End If - - Else - If first = False Then - Dim oDataSource As DataTable = dgv.DataSource - - If oDataSource.Rows.Count > 0 Then - oDataSource.Rows.Clear() - End If - - End If - End If - End If - Case "System.Windows.Forms.CheckBox" - LOGGER.Debug("Loading checkbox.") - oControlType = "CheckBox" - If oWMIndexName = "" Then - MsgBox("Achtung fehlerhafte Konfiguration:" & vbNewLine & "Für das Control " & oControl.Name & " wurde KEIN INDEX hinterlegt!" & vbNewLine & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical) - Exit For - End If - If oWMIndexName Is Nothing = False Then - - Dim chk As CheckBox = oControl - - If oLoadIndex = False Or oWMIndexName = "DD PM-ONLY FOR DISPLAY" Then - LOGGER.Debug("Indexwert soll nicht geladen werden.") - - If oDefaultValue <> String.Empty Then - Dim result = False - _CURRENT_INDEX_ARRAY(oCount, 1) = "False" - If Boolean.TryParse(oDefaultValue, result) Then - chk.Checked = result - - End If - End If - - Exit Select - End If - - - LOGGER.Debug("Loading Index value from Windream.") - Dim wertWD - If oWMIndexName.StartsWith("[%VKT") And PROFIL_VEKTORINDEX <> "" Then - wertWD = ReturnVektor_IndexValue(oWMIndexName) - Else - wertWD = CURRENT_WMFILE.GetVariableValue(oWMIndexName) - End If - - - If wertWD Is Nothing Then - LOGGER.Info(">> Zurückgegebener Wert des Wertes für Checkbox mit Indexname '" & oIndexName & "' ist nothing. Check defaultvalue") - chk.Checked = False - Else - LOGGER.Debug("Index value loaded: " & wertWD.ToString) - _CURRENT_INDEX_ARRAY(oCount, 1) = wertWD.ToString - If wertWD.ToString = "" Then - LOGGER.Info(">> Versuch, default Value zu laden") - If oDefaultValue <> String.Empty Then - Dim result = False - If Boolean.TryParse(oDefaultValue, result) Then - LOGGER.Info(">> defaultValue wurde geladen") - chk.Checked = result Else + LOGGER.Info(">> defaultValue war leer") chk.Checked = False End If Else - LOGGER.Info(">> defaultValue war leer") - chk.Checked = False - End If - Else - Dim _value - If wertWD.ToString = "System.Object[]" Then - LOGGER.Debug("CheckBoxValue with VektorField: " & oWMIndexName) - If wertWD.length = 1 Then - _value = wertWD(0) - Else ' - LOGGER.Info(" >> Vectorfield " & oWMIndexName & "' contains more then one value - First value will be used") - _value = wertWD(0) + Dim _value + If wertWD.ToString = "System.Object[]" Then + LOGGER.Debug("CheckBoxValue with VektorField: " & oWMIndexName) + If wertWD.length = 1 Then + _value = wertWD(0) + Else ' + LOGGER.Info(" >> Vectorfield " & oWMIndexName & "' contains more then one value - First value will be used") + _value = wertWD(0) + End If + Else + _value = wertWD End If - Else - _value = wertWD + Try + Select Case CBool(_value) + Case True + LOGGER.Info(">> CBool(_value) = True") + chk.Checked = True + Case Else + LOGGER.Info(">> CBool(_value) = False") + chk.Checked = False + End Select + Catch ex As Exception + LOGGER.Error(ex) + LOGGER.Info(">> Unvorhergesehener Fehler bei CBool(wertWD) - CheckBox: " & ex.Message & vbNewLine & "Wert WD: " & wertWD.ToString, True) + chk.Checked = False + End Try End If - Try - Select Case CBool(_value) - Case True - LOGGER.Info(">> CBool(_value) = True") - chk.Checked = True - Case Else - LOGGER.Info(">> CBool(_value) = False") - chk.Checked = False - End Select - Catch ex As Exception - LOGGER.Error(ex) - LOGGER.Info(">> Unvorhergesehener Fehler bei CBool(wertWD) - CheckBox: " & ex.Message & vbNewLine & "Wert WD: " & wertWD.ToString, True) - chk.Checked = False - End Try End If + End If - - End If - Case "DigitalData.Controls.LookupGrid.LookupControl2" - Try - Dim oLookup As LookupControl2 = oControl - Dim oWindreamValue = CURRENT_WMFILE.GetVariableValue(oWMIndexName) - - If IsNothing(oWindreamValue) Then - oLookup.SelectedValues = New List(Of String) - _CURRENT_INDEX_ARRAY(oCount, 1) = String.Empty - ElseIf oWindreamValue.GetType.ToString.Contains("System.Object") Then - Dim oArrlist As New List(Of String) - For Each oVectorRow As Object In oWindreamValue - - oArrlist.Add(oVectorRow.ToString) - Next - oLookup.SelectedValues = oArrlist - _CURRENT_INDEX_ARRAY(oCount, 1) = oWindreamValue.ToString - End If - - If oLookup.SelectedValues.Count = 0 And oDefaultValue <> String.Empty Then - Dim oValues As List(Of String) = oDefaultValue.Split(",").ToList() - - oLookup.SelectedValues = oValues - End If - - Catch ex As Exception - LOGGER.Error(ex) - LOGGER.Info(" - Unvorhergesehener Unexpected error in AddVorschlag_ComboBox - Indexname: " & oIndexName & " - Fehler: " & vbNewLine & ex.Message) - MsgBox(ex.Message, MsgBoxStyle.Critical, "Unvorhergesehener Unexpected error in Add LookupControl2:") - End Try - - Case "System.Windows.Forms.DateTimePicker" - oControlType = "DateTimePicker" - Dim DTP As DateTimePicker = oControl - If oWMIndexName = "" Then - MsgBox("Achtung fehlerhafte Konfiguration:" & vbNewLine & "Für das Control " & oControl.Name & " wurde KEIN INDEX hinterlegt!" & vbNewLine & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical) - Exit For - End If - If oWMIndexName Is Nothing = False Then - Dim wertWD + Case "DigitalData.Controls.LookupGrid.LookupControl2" Try - If oWMIndexName.StartsWith("[%VKT") And PROFIL_VEKTORINDEX <> "" Then - LOGGER.Debug("DATE über PM-Vektor holen") - wertWD = ReturnVektor_IndexValue(oWMIndexName) - LOGGER.Info(">> DTP is """) - Else - wertWD = CURRENT_WMFILE.GetVariableValue(oWMIndexName) - End If + Dim oLookup As LookupControl2 = oControl + Dim oWindreamValue = CURRENT_WMFILE.GetVariableValue(oWMIndexName) + Try + oLookup.SelectedValues = New List(Of String) + Catch ex As Exception - If wertWD Is Nothing Then wertWD = "" - Dim tempdate As Date = CDate("01.01.0001 00:00:00") - If wertWD.ToString.Length > 0 Then - Try - tempdate = CDate(wertWD) - LOGGER.Debug("DATE konnte umgewandelt werden") - Catch ex As Exception - LOGGER.Error(ex) - ValueDTP = tempdate - LOGGER.Debug("DATE wurde auf heute gesetzt") - End Try - DTP.Text = tempdate + End Try + If Not IsNothing(oWindreamValue) Then + If oWindreamValue.GetType.ToString.Contains("System.Object") Then + Dim oArrlist As New List(Of String) + For Each oVectorRow As Object In oWindreamValue + oArrlist.Add(oVectorRow.ToString) + Next + oLookup.SelectedValues = oArrlist + _CURRENT_INDEX_ARRAY(oCount, 1) = oWindreamValue.ToString + Else + Dim oArrlist As New List(Of String) + oArrlist.Add(oWindreamValue.ToString) + oLookup.SelectedValues = oArrlist + _CURRENT_INDEX_ARRAY(oCount, 1) = oWindreamValue.ToString + End If Else - LOGGER.Debug("DATE ist leer") - ValueDTP = tempdate - DTP.Text = tempdate + If Not IsNothing(oLookup.SelectedValues) Then + If oLookup.SelectedValues.Count = 0 And oDefaultValue <> String.Empty Then + Dim oValues As List(Of String) = oDefaultValue.Split(",").ToList() + oLookup.SelectedValues = oValues + End If + End If End If - _CURRENT_INDEX_ARRAY(oCount, 1) = wertWD.ToString - Catch ex As Exception LOGGER.Error(ex) - errormessage = "Unvorhergesehener Fehler bei DTP: " & vbNewLine & ex.Message - - LOGGER.Info(">> Unvorhergesehener Fehler bei FillIndex DTP: " & ex.Message & vbNewLine & "Wert WD: " & wertWD.ToString & vbNewLine & "Indexname: " & oWMIndexName, True) - frmError.ShowDialog() - LOGGER.Info(">> Unvorhergesehener Fehler bei FillIndex DTP: " & ex.Message, True) + LOGGER.Info(" - Unvorhergesehener Unexpected error in AddVorschlag_ComboBox - Indexname: " & oIndexName & " - Fehler: " & vbNewLine & ex.Message) + MsgBox(ex.Message, MsgBoxStyle.Critical, "Unvorhergesehener Unexpected error in Add LookupControl2:") End Try + Case "System.Windows.Forms.DateTimePicker" + oControlType = "DateTimePicker" + Dim DTP As DateTimePicker = oControl + If oWMIndexName = "" Then + MsgBox("Achtung fehlerhafte Konfiguration:" & vbNewLine & "Für das Control " & oControl.Name & " wurde KEIN INDEX hinterlegt!" & vbNewLine & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical) + Exit For + End If + If oWMIndexName Is Nothing = False Then + Dim wertWD + Try + If oWMIndexName.StartsWith("[%VKT") And PROFIL_VEKTORINDEX <> "" Then + LOGGER.Debug("DATE über PM-Vektor holen") + wertWD = ReturnVektor_IndexValue(oWMIndexName) + LOGGER.Info(">> DTP is """) + Else + wertWD = CURRENT_WMFILE.GetVariableValue(oWMIndexName) + End If + + If wertWD Is Nothing Then wertWD = "" + Dim tempdate As Date = CDate("01.01.0001 00:00:00") + If wertWD.ToString.Length > 0 Then + Try + tempdate = CDate(wertWD) + LOGGER.Debug("DATE konnte umgewandelt werden") + Catch ex As Exception + LOGGER.Error(ex) + ValueDTP = tempdate + LOGGER.Debug("DATE wurde auf heute gesetzt") + End Try + DTP.Text = tempdate + Else + LOGGER.Debug("DATE ist leer") + ValueDTP = tempdate + DTP.Text = tempdate + End If + _CURRENT_INDEX_ARRAY(oCount, 1) = wertWD.ToString + + + Catch ex As Exception + LOGGER.Error(ex) + errormessage = "Unvorhergesehener Fehler bei DTP: " & vbNewLine & ex.Message + + LOGGER.Info(">> Unvorhergesehener Fehler bei FillIndex DTP: " & ex.Message & vbNewLine & "Wert WD: " & wertWD.ToString & vbNewLine & "Indexname: " & oWMIndexName, True) + frmError.ShowDialog() + LOGGER.Info(">> Unvorhergesehener Fehler bei FillIndex DTP: " & ex.Message, True) + End Try - End If - 'Case Else - ' MsgBox(Type) - End Select - oCount += 1 - Next - set_foreground() - If first_control Is Nothing = False Then first_control.Focus() - 'Flag setzen das Indexe geladen sind - _Indexe_Loaded = True - Load_Additional_Searches() - Else - MsgBox("Für dieses Profil wurde noch keine Eingabemaske definiert!" & vbNewLine & "Informieren Sie Ihren PM-Administrator!" & vbNewLine & "Das Fenster wird geschlossen!", MsgBoxStyle.Exclamation, "Achtung:") - Me.Close() - End If - 'Catch ex As Exception - ' LOGGER.Error(ex) - ' errormessage = "Unvorhergesehener Fehler bei FillIndexValues:" & vbNewLine & ex.Message & vbNewLine & "Check Logfile" - ' My.Settings.Save() - ' frmError.ShowDialog() - ' LOGGER.Info(">> Unvorhergesehener Fehler bei FillIndexValues: " & ex.Message, True) - ' LOGGER.Info(">> Controltype: " & oControlType) - ' LOGGER.Info(">> Indexname windream: " & oIndexName) - ' LOGGER.Info(">> Stacktrace: " & ex.StackTrace) + End If + 'Case Else + ' MsgBox(Type) + End Select + oCount += 1 + Next + set_foreground() + If first_control Is Nothing = False Then first_control.Focus() + 'Flag setzen das Indexe geladen sind + _Indexe_Loaded = True + Load_Additional_Searches() + Else + MsgBox("Für dieses Profil wurde noch keine Eingabemaske definiert!" & vbNewLine & "Informieren Sie Ihren PM-Administrator!" & vbNewLine & "Das Fenster wird geschlossen!", MsgBoxStyle.Exclamation, "Achtung:") + Me.Close() + End If + + Catch ex As Exception + LOGGER.Error(ex) + errormessage = "Unvorhergesehener Fehler bei FillIndexValues:" & vbNewLine & ex.Message & vbNewLine & "Check Logfile" + My.Settings.Save() + frmError.ShowDialog() + LOGGER.Info(">> Unvorhergesehener Fehler bei FillIndexValues: " & ex.Message, True) + LOGGER.Info(">> Controltype: " & oControlType) + LOGGER.Info(">> Indexname windream: " & oIndexName) + LOGGER.Info(">> Stacktrace: " & ex.StackTrace) - 'End Try + End Try End Sub Private Sub frmValidation_Shown(sender As Object, e As System.EventArgs) Handles Me.Shown Refresh_FileList() Load_Next_Document(True) + _dependingControl_in_action = False End Sub Private Sub btnSave_Click(sender As System.Object, e As System.EventArgs) Handles btnSave.Click btnSave.Enabled = False @@ -3518,7 +3604,7 @@ Public Class frmValidator Private Sub DateiÖffnenToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles DateiÖffnenToolStripMenuItem.Click Try Dim Proc As New System.Diagnostics.Process - Dim psi As New ProcessStartInfo(Filesystem_Document_Path) + Dim psi As New ProcessStartInfo(PathToWM_File) Proc.EnableRaisingEvents = True Proc.StartInfo = psi Proc.Start() @@ -3560,7 +3646,7 @@ Public Class frmValidator Close_document_viewer() 'Aus der Tabelle löschen TBPM_PROFILE_FILESTableAdapter.CmdDelete(CURRENT_DOC_GUID) - Dim resul = allgFunk.Delete_xffres(Filesystem_Document_Path, _windream) + Dim resul = allgFunk.Delete_xffres(PathToWM_File, _windream) If resul = Nothing Or resul = True Then If Delete_File() = True Then 'MsgBox("Die Datei wurde erfolgreich aus windream gelöscht!" & vbNewLine & "Es wird nun die nächste Datei angezeigt!", MsgBoxStyle.Information, "Erfolgsmeldung:") @@ -3641,7 +3727,7 @@ Public Class frmValidator Dim oShellExecuteInfo As New SHELLEXECUTEINFO oShellExecuteInfo.cbSize = Marshal.SizeOf(oShellExecuteInfo) oShellExecuteInfo.lpVerb = "properties" - oShellExecuteInfo.lpFile = Filesystem_Document_Path + oShellExecuteInfo.lpFile = PathToWM_File oShellExecuteInfo.nShow = SW_SHOW oShellExecuteInfo.fMask = SEE_MASK_INVOKEIDLIST If Not ShellExecuteEx(oShellExecuteInfo) Then diff --git a/app/DD_PM_WINDREAM/frmValidatorSearch.vb b/app/DD_PM_WINDREAM/frmValidatorSearch.vb index a7f7a59..52ffd81 100644 --- a/app/DD_PM_WINDREAM/frmValidatorSearch.vb +++ b/app/DD_PM_WINDREAM/frmValidatorSearch.vb @@ -104,264 +104,267 @@ Public Class frmValidatorSearch End If End Sub Sub Refresh_Load_GridSQL(ConID As Integer, SQLCommand As String, TabIndex As Integer, TabCaption As String) - 'Try - Dim myGridControl As DevExpress.XtraGrid.GridControl - Dim myGridview As DevExpress.XtraGrid.Views.Grid.GridView - Select Case TabIndex - Case 0 - GridControlSearch1.DataSource = Nothing - GridViewSearch1.Columns.Clear() - myGridview = GridViewSearch1 - myGridControl = GridControlSearch1 - Case 1 - GridControlSearch2.DataSource = Nothing - GridViewSearch2.Columns.Clear() - myGridview = GridViewSearch2 - myGridControl = GridControlSearch2 - Case 2 - GridControlSearch3.DataSource = Nothing - GridViewSearch3.Columns.Clear() - myGridview = GridViewSearch3 - myGridControl = GridControlSearch3 - Case 3 - GridControlSearch4.DataSource = Nothing - GridViewSearch4.Columns.Clear() - myGridview = GridViewSearch4 - myGridControl = GridControlSearch4 - Case 4 - GridControlSearch5.DataSource = Nothing - GridViewSearch5.Columns.Clear() - myGridview = GridViewSearch5 - myGridControl = GridControlSearch5 - End Select - myGridControl.ContextMenuStrip = ContextMenuStripSQL - Dim oDatatable As DataTable = ClassDatabase.Return_Datatable_CS(SQLCommand, ConID) - If Not IsNothing(oDatatable) Then - XtraTabControlSQL.TabPages(TabIndex).Text = $"{TabCaption} ({oDatatable.Rows.Count})" + Try + Dim myGridControl As DevExpress.XtraGrid.GridControl + Dim myGridview As DevExpress.XtraGrid.Views.Grid.GridView Select Case TabIndex Case 0 - GridControlSearch1.DataSource = oDatatable - GridViewSearch1.BestFitColumns(True) + GridControlSearch1.DataSource = Nothing + GridViewSearch1.Columns.Clear() + myGridview = GridViewSearch1 + myGridControl = GridControlSearch1 Case 1 - GridControlSearch2.DataSource = oDatatable - GridViewSearch2.BestFitColumns(True) + GridControlSearch2.DataSource = Nothing + GridViewSearch2.Columns.Clear() + myGridview = GridViewSearch2 + myGridControl = GridControlSearch2 Case 2 - GridControlSearch3.DataSource = oDatatable - GridViewSearch3.BestFitColumns(True) + GridControlSearch3.DataSource = Nothing + GridViewSearch3.Columns.Clear() + myGridview = GridViewSearch3 + myGridControl = GridControlSearch3 Case 3 - GridControlSearch4.DataSource = oDatatable - GridViewSearch4.BestFitColumns(True) + GridControlSearch4.DataSource = Nothing + GridViewSearch4.Columns.Clear() + myGridview = GridViewSearch4 + myGridControl = GridControlSearch4 Case 4 - GridControlSearch5.DataSource = oDatatable - GridViewSearch5.BestFitColumns(True) - + GridControlSearch5.DataSource = Nothing + GridViewSearch5.Columns.Clear() + myGridview = GridViewSearch5 + myGridControl = GridControlSearch5 End Select - tsslblSQL.Text = $"Tab {TabCaption} refreshed - {Now}" - End If - ' Catch ex As Exception + myGridControl.ContextMenuStrip = ContextMenuStripSQL + Dim oDatatable As DataTable = ClassDatabase.Return_Datatable_CS(SQLCommand, ConID) + If Not IsNothing(oDatatable) Then + XtraTabControlSQL.TabPages(TabIndex).Text = $"{TabCaption} ({oDatatable.Rows.Count})" + Select Case TabIndex + Case 0 + GridControlSearch1.DataSource = oDatatable + GridViewSearch1.BestFitColumns(True) + Case 1 + GridControlSearch2.DataSource = oDatatable + GridViewSearch2.BestFitColumns(True) + Case 2 + GridControlSearch3.DataSource = oDatatable + GridViewSearch3.BestFitColumns(True) + Case 3 + GridControlSearch4.DataSource = oDatatable + GridViewSearch4.BestFitColumns(True) + Case 4 + GridControlSearch5.DataSource = oDatatable + GridViewSearch5.BestFitColumns(True) - 'End Try + End Select + tsslblSQL.Text = $"Tab {TabCaption} refreshed - {Now}" + End If + Catch ex As Exception + LOGGER.Error(ex) + End Try End Sub Sub Refresh_Load_GridDoc(ConID As Integer, SQLCommand As String, TabIndex As Integer, TabCaption As String) - 'Try - Dim myGridControl As DevExpress.XtraGrid.GridControl - Dim myGridview As DevExpress.XtraGrid.Views.Grid.GridView - Select Case TabIndex - Case 0 - GridControlDocSearch1.DataSource = Nothing - GridViewDocSearch1.Columns.Clear() - myGridview = GridViewDocSearch1 - myGridControl = GridControlDocSearch1 - Case 1 - GridControlDocSearch2.DataSource = Nothing - GridViewDocSearch2.Columns.Clear() - myGridview = GridViewDocSearch2 - myGridControl = GridControlDocSearch2 - Case 2 - GridControlDocSearch3.DataSource = Nothing - GridViewDocSearch3.Columns.Clear() - myGridview = GridViewDocSearch3 - myGridControl = GridControlDocSearch3 - Case 3 - GridControlDocSearch4.DataSource = Nothing - GridViewDocSearch4.Columns.Clear() - myGridControl = GridControlDocSearch4 - myGridview = GridViewDocSearch4 - Case 4 - GridControlDocSearch5.DataSource = Nothing - GridViewDocSearch5.Columns.Clear() - myGridControl = GridControlDocSearch5 - myGridview = GridViewDocSearch5 - End Select - myGridControl.ContextMenuStrip = ContextMenuStripWMFile - Dim oDatatable As DataTable = ClassDatabase.Return_Datatable_CS(SQLCommand, ConID) - If Not IsNothing(oDatatable) Then - XtraTabControlDocs.TabPages(TabIndex).Text = $"{TabCaption} ({oDatatable.Rows.Count})" - clsWMDocGrid.DTDocuments = oDatatable - 'Select Case TabIndex - ' Case 0 - ' GridControlDocSearch1.DataSource = oDatatable - ' Case 1 - ' GridControlDocSearch2.DataSource = oDatatable - ' Case 2 - ' GridControlDocSearch3.DataSource = oDatatable - ' Case 3 - ' GridControlDocSearch4.DataSource = oDatatable - ' Case 4 - ' GridControlDocSearch5.DataSource = oDatatable + Try + Dim myGridControl As DevExpress.XtraGrid.GridControl + Dim myGridview As DevExpress.XtraGrid.Views.Grid.GridView + Select Case TabIndex + Case 0 + GridControlDocSearch1.DataSource = Nothing + GridViewDocSearch1.Columns.Clear() + myGridview = GridViewDocSearch1 + myGridControl = GridControlDocSearch1 + Case 1 + GridControlDocSearch2.DataSource = Nothing + GridViewDocSearch2.Columns.Clear() + myGridview = GridViewDocSearch2 + myGridControl = GridControlDocSearch2 + Case 2 + GridControlDocSearch3.DataSource = Nothing + GridViewDocSearch3.Columns.Clear() + myGridview = GridViewDocSearch3 + myGridControl = GridControlDocSearch3 + Case 3 + GridControlDocSearch4.DataSource = Nothing + GridViewDocSearch4.Columns.Clear() + myGridControl = GridControlDocSearch4 + myGridview = GridViewDocSearch4 + Case 4 + GridControlDocSearch5.DataSource = Nothing + GridViewDocSearch5.Columns.Clear() + myGridControl = GridControlDocSearch5 + myGridview = GridViewDocSearch5 + End Select + myGridControl.ContextMenuStrip = ContextMenuStripWMFile + Dim oDatatable As DataTable = ClassDatabase.Return_Datatable_CS(SQLCommand, ConID) + If Not IsNothing(oDatatable) Then + XtraTabControlDocs.TabPages(TabIndex).Text = $"{TabCaption} ({oDatatable.Rows.Count})" + clsWMDocGrid.DTDocuments = oDatatable + 'Select Case TabIndex + ' Case 0 + ' GridControlDocSearch1.DataSource = oDatatable + ' Case 1 + ' GridControlDocSearch2.DataSource = oDatatable + ' Case 2 + ' GridControlDocSearch3.DataSource = oDatatable + ' Case 3 + ' GridControlDocSearch4.DataSource = oDatatable + ' Case 4 + ' GridControlDocSearch5.DataSource = oDatatable - 'End Select - Create_GridControl(myGridview, oDatatable) - Dim oxmlPath As String = "" - oxmlPath = Get_DocGrid_Layout_Filename(XtraTabControlDocs.SelectedTabPageIndex) + 'End Select + Create_GridControl(myGridview, oDatatable) + Dim oxmlPath As String = "" + oxmlPath = Get_DocGrid_Layout_Filename(XtraTabControlDocs.SelectedTabPageIndex) - If File.Exists(oxmlPath) Then - myGridview.RestoreLayoutFromXml(oxmlPath) - myGridview.GuessAutoFilterRowValuesFromFilter() + If File.Exists(oxmlPath) Then + myGridview.RestoreLayoutFromXml(oxmlPath) + myGridview.GuessAutoFilterRowValuesFromFilter() + End If + tslblState.Text = $"Tab {TabCaption} refreshed - {Now}" + Else + clsWMDocGrid.DTDocuments = Nothing End If - tslblState.Text = $"Tab {TabCaption} refreshed - {Now}" - Else - clsWMDocGrid.DTDocuments = Nothing - End If - 'Catch ex As Exception - - 'End Try + Catch ex As Exception + LOGGER.Error(ex) + End Try End Sub Private Function Create_GridControl(MyGridView As GridView, _datatable As DataTable) As GridView Dim oMyDocDatatable As New DataTable - ' Try - 'Die Icon Colum erstellen und konfigurieren - Dim oColIcon As New System.Data.DataColumn() - oColIcon.DataType = GetType(Image) - oColIcon.ColumnName = "ICON" - oColIcon.Caption = "" - oMyDocDatatable.Columns.Add(oColIcon) + Try + 'Die Icon Colum erstellen und konfigurieren + Dim oColIcon As New System.Data.DataColumn() + oColIcon.DataType = GetType(Image) + oColIcon.ColumnName = "ICON" + oColIcon.Caption = "" + oMyDocDatatable.Columns.Add(oColIcon) - Dim oColPath As New System.Data.DataColumn() - oColPath.DataType = GetType(String) - oColPath.ColumnName = "FULL_FILENAME" - oColPath.Caption = "Fullpath" - oMyDocDatatable.Columns.Add(oColPath) - Dim oColDocID As New System.Data.DataColumn() - oColDocID.DataType = GetType(Int32) - oColDocID.ColumnName = "DocID" - oColDocID.Caption = "DocID" - oMyDocDatatable.Columns.Add(oColDocID) - Dim oRestColArray As New List(Of String) - For Each oCol As DataColumn In _datatable.Columns - Dim onewColumn As New System.Data.DataColumn() - If oCol.ColumnName <> "DocID" And oCol.ColumnName <> "FULL_FILENAME" And oCol.ColumnName <> "Filename" Then + Dim oColPath As New System.Data.DataColumn() + oColPath.DataType = GetType(String) + oColPath.ColumnName = "FULL_FILENAME" + oColPath.Caption = "Fullpath" + oMyDocDatatable.Columns.Add(oColPath) + Dim oColDocID As New System.Data.DataColumn() + oColDocID.DataType = GetType(Int32) + oColDocID.ColumnName = "DocID" + oColDocID.Caption = "DocID" + oMyDocDatatable.Columns.Add(oColDocID) + Dim oRestColArray As New List(Of String) + For Each oCol As DataColumn In _datatable.Columns + Dim onewColumn As New System.Data.DataColumn() + If oCol.ColumnName <> "DocID" And oCol.ColumnName <> "FULL_FILENAME" And oCol.ColumnName <> "Filename" Then - onewColumn.DataType = GetType(String) - onewColumn.ColumnName = oCol.ColumnName - onewColumn.Caption = oCol.Caption - oMyDocDatatable.Columns.Add(onewColumn) - oRestColArray.Add(onewColumn.ColumnName) + onewColumn.DataType = GetType(String) + onewColumn.ColumnName = oCol.ColumnName + onewColumn.Caption = oCol.Caption + oMyDocDatatable.Columns.Add(onewColumn) + oRestColArray.Add(onewColumn.ColumnName) + End If + + Next + For Each FILE_ROW As DataRow In _datatable.Rows + Dim oFullpath = FILE_ROW.Item("FULL_FILENAME") + Dim oDocID = FILE_ROW.Item("DocID") + 'Dim Folderpath = Path.GetDirectoryName(fullpath) + Dim oFilename = Path.GetFileName(oFullpath) + Dim oFileextension = Path.GetExtension(oFullpath) + Dim oNewRow As DataRow + oNewRow = oMyDocDatatable.NewRow() + 'Icon zuweisen + Select Case oFileextension.ToUpper + Case ".csv".ToUpper + oNewRow.Item(0) = My.Resources.doc_excel_csv + Case ".txt".ToUpper + oNewRow.Item(0) = My.Resources.txt + Case ".pdf".ToUpper + oNewRow.Item(0) = My.Resources.pdf + Case ".doc".ToUpper + oNewRow.Item(0) = My.Resources.doc + Case ".docx".ToUpper + oNewRow.Item(0) = My.Resources.doc + Case ".xls".ToUpper + oNewRow.Item(0) = My.Resources.xls + Case ".xlsx".ToUpper + oNewRow.Item(0) = My.Resources.xls + Case ".xlsm".ToUpper + oNewRow.Item(0) = My.Resources.xls + Case ".ppt".ToUpper + oNewRow.Item(0) = My.Resources.ppt + Case ".pptx".ToUpper + oNewRow.Item(0) = My.Resources.ppt + Case ".dwg".ToUpper + oNewRow.Item(0) = My.Resources.dwg + Case ".dxf".ToUpper + oNewRow.Item(0) = My.Resources.dxf + Case ".msg".ToUpper + oNewRow.Item(0) = My.Resources.email_go + Case ".msg".ToUpper + oNewRow.Item(0) = My.Resources.email_go + Case Else + oNewRow.Item(0) = My.Resources._blank + End Select + 'Den Filepath mitgeben + oNewRow.Item(1) = oFullpath + oNewRow.Item(2) = oDocID + + Dim i = 3 'Fängt bei 3 an, um die definierten Spalten zu überspringen + For Each Colname As String In oRestColArray + Dim oRowValue + oRowValue = FILE_ROW.Item(Colname) + oNewRow.Item(i) = oRowValue.ToString + i += 1 + Next + oMyDocDatatable.Rows.Add(oNewRow) + Next + Dim sdsd As String = "" + + + + + + + Dim oGridControl As GridControl = MyGridView.GridControl + oGridControl.DataSource = oMyDocDatatable + oGridControl.ForceInitialize() + Try + MyGridView.Columns.Item("DocID").Visible = False + Catch ex As Exception + End Try + Try + MyGridView.Columns.Item("FULL_FILENAME").Visible = False + Catch ex As Exception + End Try + + Dim created, changed As String + If USER_LANGUAGE <> "de-DE" Then + changed = "Changed" + created = "Created" + Else + changed = "Geändert" + created = "Erstellt" End If - Next - For Each FILE_ROW As DataRow In _datatable.Rows - Dim oFullpath = FILE_ROW.Item("FULL_FILENAME") - Dim oDocID = FILE_ROW.Item("DocID") - 'Dim Folderpath = Path.GetDirectoryName(fullpath) - Dim oFilename = Path.GetFileName(oFullpath) - Dim oFileextension = Path.GetExtension(oFullpath) - Dim oNewRow As DataRow - oNewRow = oMyDocDatatable.NewRow() - 'Icon zuweisen - Select Case oFileextension.ToUpper - Case ".csv".ToUpper - oNewRow.Item(0) = My.Resources.doc_excel_csv - Case ".txt".ToUpper - oNewRow.Item(0) = My.Resources.txt - Case ".pdf".ToUpper - oNewRow.Item(0) = My.Resources.pdf - Case ".doc".ToUpper - oNewRow.Item(0) = My.Resources.doc - Case ".docx".ToUpper - oNewRow.Item(0) = My.Resources.doc - Case ".xls".ToUpper - oNewRow.Item(0) = My.Resources.xls - Case ".xlsx".ToUpper - oNewRow.Item(0) = My.Resources.xls - Case ".xlsm".ToUpper - oNewRow.Item(0) = My.Resources.xls - Case ".ppt".ToUpper - oNewRow.Item(0) = My.Resources.ppt - Case ".pptx".ToUpper - oNewRow.Item(0) = My.Resources.ppt - Case ".dwg".ToUpper - oNewRow.Item(0) = My.Resources.dwg - Case ".dxf".ToUpper - oNewRow.Item(0) = My.Resources.dxf - Case ".msg".ToUpper - oNewRow.Item(0) = My.Resources.email_go - Case ".msg".ToUpper - oNewRow.Item(0) = My.Resources.email_go - Case Else - oNewRow.Item(0) = My.Resources._blank - End Select - 'Den Filepath mitgeben - oNewRow.Item(1) = oFullpath - oNewRow.Item(2) = oDocID + Dim createdColumn = MyGridView.Columns(created) + If Not IsNothing(createdColumn) Then + createdColumn.DisplayFormat.FormatType = FormatType.DateTime + createdColumn.DisplayFormat.FormatString = USER_DATE_FORMAT & " HH:MM:ss" + End If - Dim i = 3 'Fängt bei 3 an, um die definierten Spalten zu überspringen - For Each Colname As String In oRestColArray - Dim oRowValue - oRowValue = FILE_ROW.Item(Colname) - oNewRow.Item(i) = oRowValue.ToString - i += 1 + Dim changedColumn = MyGridView.Columns(changed) + If Not IsNothing(changedColumn) Then + changedColumn.DisplayFormat.FormatType = FormatType.DateTime + changedColumn.DisplayFormat.FormatString = USER_DATE_FORMAT & " HH:MM:ss" + End If + ' Alle Spalten aus ReadOnly setzen, danach werden alle passenden auf nicht ReadOnly gesetzt + For Each column As GridColumn In MyGridView.Columns + column.OptionsColumn.AllowEdit = False Next - oMyDocDatatable.Rows.Add(oNewRow) - Next - Dim sdsd As String = "" - - - - - - - Dim oGridControl As GridControl = MyGridView.GridControl - oGridControl.DataSource = oMyDocDatatable - oGridControl.ForceInitialize() - Try - MyGridView.Columns.Item("DocID").Visible = False + MyGridView.Columns.Item("ICON").MaxWidth = 24 + MyGridView.Columns.Item("ICON").MinWidth = 24 + MyGridView.OptionsView.BestFitMaxRowCount = -1 + MyGridView.BestFitColumns(True) + Return MyGridView Catch ex As Exception + LOGGER.Error(ex) End Try - Try - MyGridView.Columns.Item("FULL_FILENAME").Visible = False - Catch ex As Exception - End Try - - Dim created, changed As String - If USER_LANGUAGE <> "de-DE" Then - changed = "Changed" - created = "Created" - Else - changed = "Geändert" - created = "Erstellt" - End If - - Dim createdColumn = MyGridView.Columns(created) - If Not IsNothing(createdColumn) Then - createdColumn.DisplayFormat.FormatType = FormatType.DateTime - createdColumn.DisplayFormat.FormatString = USER_DATE_FORMAT & " HH:MM:ss" - End If - - Dim changedColumn = MyGridView.Columns(changed) - If Not IsNothing(changedColumn) Then - changedColumn.DisplayFormat.FormatType = FormatType.DateTime - changedColumn.DisplayFormat.FormatString = USER_DATE_FORMAT & " HH:MM:ss" - End If - ' Alle Spalten aus ReadOnly setzen, danach werden alle passenden auf nicht ReadOnly gesetzt - For Each column As GridColumn In MyGridView.Columns - column.OptionsColumn.AllowEdit = False - Next - MyGridView.Columns.Item("ICON").MaxWidth = 24 - MyGridView.Columns.Item("ICON").MinWidth = 24 - MyGridView.OptionsView.BestFitMaxRowCount = -1 - MyGridView.BestFitColumns(True) - Return MyGridView End Function Private Sub frmValidatorSearch_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing Try