From f150f3d8979c4c109d4c8b8bce370daa6cd796f5 Mon Sep 17 00:00:00 2001 From: Digital Data - Marlon Schreiber Date: Fri, 7 Feb 2020 14:34:18 +0100 Subject: [PATCH] MS PM mit WM --- app/DD_PM_WINDREAM/ClassInit.vb | 6 +- app/DD_PM_WINDREAM/frmAdmin2.Designer.vb | 73 ++++++------- app/DD_PM_WINDREAM/frmAdmin2.resx | 124 +++++++++++---------- app/DD_PM_WINDREAM/frmValidator.vb | 131 +++++++++++++++-------- 4 files changed, 191 insertions(+), 143 deletions(-) diff --git a/app/DD_PM_WINDREAM/ClassInit.vb b/app/DD_PM_WINDREAM/ClassInit.vb index 0857551..4a35f7f 100644 --- a/app/DD_PM_WINDREAM/ClassInit.vb +++ b/app/DD_PM_WINDREAM/ClassInit.vb @@ -130,7 +130,8 @@ Public Class ClassInit Try USER_USERNAME = Environment.UserName Try - DT_CLIENT_USER = ClassDatabase.Return_Datatable(String.Format("SELECT * FROM VWDD_USER_CLIENT WHERE UPPER(USERNAME) = UPPER('{0}')", USER_USERNAME), False) + Dim oSQL = $"SELECT * FROM VWDD_USER_CLIENT WHERE UPPER(USERNAME) = UPPER('{USER_USERNAME}')" + DT_CLIENT_USER = ClassDatabase.Return_Datatable(oSQL, False) If DT_CLIENT_USER.Rows.Count > 1 Then frmClientLogin.ShowDialog() ElseIf DT_CLIENT_USER.Rows.Count = 1 Then @@ -138,8 +139,9 @@ Public Class ClassInit Else ERROR_STATE = "NO CLIENT" Dim oDT As DataTable = ClassAllgemeineFunktionen.GUI_LANGUAGE_INFO("No Client relation") + 'Related to a client ' Throw New Exception("You are not configured in the Useradministration." & vbNewLine & "Please contact the system administrator!") - MsgBox(oDT.Rows(0).Item("STRING1") & vbNewLine & oDT.Rows(0).Item("STRING2"), MsgBoxStyle.Exclamation) + MsgBox(oDT.Rows(0).Item("STRING1") & vbNewLine & oDT.Rows(0).Item("STRING2") & vbNewLine & vbNewLine & oSQL, MsgBoxStyle.Exclamation) Exit Sub End If Catch ex As Exception diff --git a/app/DD_PM_WINDREAM/frmAdmin2.Designer.vb b/app/DD_PM_WINDREAM/frmAdmin2.Designer.vb index 3296afd..0f51981 100644 --- a/app/DD_PM_WINDREAM/frmAdmin2.Designer.vb +++ b/app/DD_PM_WINDREAM/frmAdmin2.Designer.vb @@ -92,7 +92,6 @@ Partial Class frmAdmin2 Me.TextEdit2 = New DevExpress.XtraEditors.TextEdit() Me.LANGUAGEComboBoxEdit = New DevExpress.XtraEditors.ComboBoxEdit() Me.CAPT_TYPETextEdit = New DevExpress.XtraEditors.TextEdit() - Me.STRING1TextEdit = New DevExpress.XtraEditors.TextEdit() Me.STRING2TextEdit = New DevExpress.XtraEditors.TextEdit() Me.STRING3TextEdit = New DevExpress.XtraEditors.TextEdit() Me.STRING4TextEdit = New DevExpress.XtraEditors.TextEdit() @@ -143,6 +142,7 @@ Partial Class frmAdmin2 Me.TableAdapterManager = New DD_ProcessManager.DD_DMSLiteDataSetTableAdapters.TableAdapterManager() Me.TBDD_GUI_LANGUAGE_PHRASETableAdapter = New DD_ProcessManager.DD_DMSLiteDataSetTableAdapters.TBDD_GUI_LANGUAGE_PHRASETableAdapter() Me.LayoutConverter1 = New DevExpress.XtraLayout.Converter.LayoutConverter(Me.components) + Me.STRING1TextEdit = New DevExpress.XtraEditors.MemoEdit() CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.XtraTabControl1, System.ComponentModel.ISupportInitialize).BeginInit() Me.XtraTabControl1.SuspendLayout() @@ -186,7 +186,6 @@ Partial Class frmAdmin2 CType(Me.TextEdit2.Properties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LANGUAGEComboBoxEdit.Properties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.CAPT_TYPETextEdit.Properties, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.STRING1TextEdit.Properties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.STRING2TextEdit.Properties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.STRING3TextEdit.Properties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.STRING4TextEdit.Properties, System.ComponentModel.ISupportInitialize).BeginInit() @@ -221,6 +220,7 @@ Partial Class frmAdmin2 Me.BindingNavigator2.SuspendLayout() CType(Me.GridControl2, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.GridView2, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.STRING1TextEdit.Properties, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'RibbonControl1 @@ -600,7 +600,7 @@ Partial Class frmAdmin2 Me.Root.GroupBordersVisible = False Me.Root.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlGroup1}) Me.Root.Name = "Root" - Me.Root.Size = New System.Drawing.Size(698, 476) + Me.Root.Size = New System.Drawing.Size(698, 491) Me.Root.TextVisible = False ' 'LayoutControlGroup1 @@ -610,7 +610,7 @@ Partial Class frmAdmin2 Me.LayoutControlGroup1.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.ItemForGUID, Me.ItemForTITLE, Me.ItemForEMAIL_SUBJECT, Me.ItemForEMAIL_BODY1, Me.ItemForEMAIL_BODY2, Me.ItemForEMAIL_BODY3, Me.ItemForADDED_WHO, Me.ItemForCHANGED_WHO, Me.ItemForADDED_WHEN, Me.ItemForCHANGED_WHEN}) Me.LayoutControlGroup1.Location = New System.Drawing.Point(0, 0) Me.LayoutControlGroup1.Name = "autoGeneratedGroup0" - Me.LayoutControlGroup1.Size = New System.Drawing.Size(678, 456) + Me.LayoutControlGroup1.Size = New System.Drawing.Size(678, 471) ' 'ItemForGUID ' @@ -644,23 +644,23 @@ Partial Class frmAdmin2 Me.ItemForEMAIL_BODY1.Control = Me.EMAIL_BODY1TextEdit Me.ItemForEMAIL_BODY1.Location = New System.Drawing.Point(0, 72) Me.ItemForEMAIL_BODY1.Name = "ItemForEMAIL_BODY1" - Me.ItemForEMAIL_BODY1.Size = New System.Drawing.Size(678, 137) + Me.ItemForEMAIL_BODY1.Size = New System.Drawing.Size(678, 142) resources.ApplyResources(Me.ItemForEMAIL_BODY1, "ItemForEMAIL_BODY1") Me.ItemForEMAIL_BODY1.TextSize = New System.Drawing.Size(74, 13) ' 'ItemForEMAIL_BODY2 ' Me.ItemForEMAIL_BODY2.Control = Me.EMAIL_BODY2TextEdit - Me.ItemForEMAIL_BODY2.Location = New System.Drawing.Point(0, 209) + Me.ItemForEMAIL_BODY2.Location = New System.Drawing.Point(0, 214) Me.ItemForEMAIL_BODY2.Name = "ItemForEMAIL_BODY2" - Me.ItemForEMAIL_BODY2.Size = New System.Drawing.Size(678, 175) + Me.ItemForEMAIL_BODY2.Size = New System.Drawing.Size(678, 185) resources.ApplyResources(Me.ItemForEMAIL_BODY2, "ItemForEMAIL_BODY2") Me.ItemForEMAIL_BODY2.TextSize = New System.Drawing.Size(74, 13) ' 'ItemForEMAIL_BODY3 ' Me.ItemForEMAIL_BODY3.Control = Me.EMAIL_BODY3TextEdit - Me.ItemForEMAIL_BODY3.Location = New System.Drawing.Point(0, 384) + Me.ItemForEMAIL_BODY3.Location = New System.Drawing.Point(0, 399) Me.ItemForEMAIL_BODY3.Name = "ItemForEMAIL_BODY3" Me.ItemForEMAIL_BODY3.Size = New System.Drawing.Size(678, 24) resources.ApplyResources(Me.ItemForEMAIL_BODY3, "ItemForEMAIL_BODY3") @@ -669,7 +669,7 @@ Partial Class frmAdmin2 'ItemForADDED_WHO ' Me.ItemForADDED_WHO.Control = Me.ADDED_WHOTextEdit - Me.ItemForADDED_WHO.Location = New System.Drawing.Point(0, 408) + Me.ItemForADDED_WHO.Location = New System.Drawing.Point(0, 423) Me.ItemForADDED_WHO.Name = "ItemForADDED_WHO" Me.ItemForADDED_WHO.Size = New System.Drawing.Size(339, 24) resources.ApplyResources(Me.ItemForADDED_WHO, "ItemForADDED_WHO") @@ -678,7 +678,7 @@ Partial Class frmAdmin2 'ItemForCHANGED_WHO ' Me.ItemForCHANGED_WHO.Control = Me.CHANGED_WHOTextEdit - Me.ItemForCHANGED_WHO.Location = New System.Drawing.Point(0, 432) + Me.ItemForCHANGED_WHO.Location = New System.Drawing.Point(0, 447) Me.ItemForCHANGED_WHO.Name = "ItemForCHANGED_WHO" Me.ItemForCHANGED_WHO.Size = New System.Drawing.Size(339, 24) resources.ApplyResources(Me.ItemForCHANGED_WHO, "ItemForCHANGED_WHO") @@ -687,7 +687,7 @@ Partial Class frmAdmin2 'ItemForADDED_WHEN ' Me.ItemForADDED_WHEN.Control = Me.ADDED_WHENDateEdit - Me.ItemForADDED_WHEN.Location = New System.Drawing.Point(339, 408) + Me.ItemForADDED_WHEN.Location = New System.Drawing.Point(339, 423) Me.ItemForADDED_WHEN.Name = "ItemForADDED_WHEN" Me.ItemForADDED_WHEN.Size = New System.Drawing.Size(339, 24) resources.ApplyResources(Me.ItemForADDED_WHEN, "ItemForADDED_WHEN") @@ -696,7 +696,7 @@ Partial Class frmAdmin2 'ItemForCHANGED_WHEN ' Me.ItemForCHANGED_WHEN.Control = Me.CHANGED_WHENDateEdit - Me.ItemForCHANGED_WHEN.Location = New System.Drawing.Point(339, 432) + Me.ItemForCHANGED_WHEN.Location = New System.Drawing.Point(339, 447) Me.ItemForCHANGED_WHEN.Name = "ItemForCHANGED_WHEN" Me.ItemForCHANGED_WHEN.Size = New System.Drawing.Size(339, 24) resources.ApplyResources(Me.ItemForCHANGED_WHEN, "ItemForCHANGED_WHEN") @@ -752,7 +752,6 @@ Partial Class frmAdmin2 Me.DataLayoutControl2.Controls.Add(Me.TextEdit2) Me.DataLayoutControl2.Controls.Add(Me.LANGUAGEComboBoxEdit) Me.DataLayoutControl2.Controls.Add(Me.CAPT_TYPETextEdit) - Me.DataLayoutControl2.Controls.Add(Me.STRING1TextEdit) Me.DataLayoutControl2.Controls.Add(Me.STRING2TextEdit) Me.DataLayoutControl2.Controls.Add(Me.STRING3TextEdit) Me.DataLayoutControl2.Controls.Add(Me.STRING4TextEdit) @@ -764,9 +763,11 @@ Partial Class frmAdmin2 Me.DataLayoutControl2.Controls.Add(Me.CHANGED_WHENTextEdit) Me.DataLayoutControl2.Controls.Add(Me.OBJ_NAMETextEdit) Me.DataLayoutControl2.Controls.Add(Me.INTERNALCheckEdit) + Me.DataLayoutControl2.Controls.Add(Me.STRING1TextEdit) Me.DataLayoutControl2.DataSource = Me.TBDD_GUI_LANGUAGE_PHRASEBindingSource resources.ApplyResources(Me.DataLayoutControl2, "DataLayoutControl2") Me.DataLayoutControl2.Name = "DataLayoutControl2" + Me.DataLayoutControl2.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = New System.Drawing.Rectangle(1102, 272, 650, 400) Me.DataLayoutControl2.Root = Me.LayoutControlGroup2 ' 'TextEdit1 @@ -821,14 +822,6 @@ Partial Class frmAdmin2 Me.CAPT_TYPETextEdit.Name = "CAPT_TYPETextEdit" Me.CAPT_TYPETextEdit.StyleController = Me.DataLayoutControl2 ' - 'STRING1TextEdit - ' - Me.STRING1TextEdit.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.TBDD_GUI_LANGUAGE_PHRASEBindingSource, "STRING1", True)) - resources.ApplyResources(Me.STRING1TextEdit, "STRING1TextEdit") - Me.STRING1TextEdit.MenuManager = Me.RibbonControl1 - Me.STRING1TextEdit.Name = "STRING1TextEdit" - Me.STRING1TextEdit.StyleController = Me.DataLayoutControl2 - ' 'STRING2TextEdit ' Me.STRING2TextEdit.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.TBDD_GUI_LANGUAGE_PHRASEBindingSource, "STRING2", True)) @@ -940,7 +933,7 @@ Partial Class frmAdmin2 Me.LayoutControlGroup2.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.[True] Me.LayoutControlGroup2.GroupBordersVisible = False Me.LayoutControlGroup2.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlGroup3}) - Me.LayoutControlGroup2.Name = "LayoutControlGroup2" + Me.LayoutControlGroup2.Name = "Root" Me.LayoutControlGroup2.Size = New System.Drawing.Size(544, 479) Me.LayoutControlGroup2.TextVisible = False ' @@ -967,14 +960,14 @@ Partial Class frmAdmin2 Me.ItemForSTRING1.Control = Me.STRING1TextEdit Me.ItemForSTRING1.Location = New System.Drawing.Point(0, 120) Me.ItemForSTRING1.Name = "ItemForSTRING1" - Me.ItemForSTRING1.Size = New System.Drawing.Size(524, 24) + Me.ItemForSTRING1.Size = New System.Drawing.Size(524, 171) resources.ApplyResources(Me.ItemForSTRING1, "ItemForSTRING1") Me.ItemForSTRING1.TextSize = New System.Drawing.Size(74, 13) ' 'ItemForSTRING2 ' Me.ItemForSTRING2.Control = Me.STRING2TextEdit - Me.ItemForSTRING2.Location = New System.Drawing.Point(0, 144) + Me.ItemForSTRING2.Location = New System.Drawing.Point(0, 291) Me.ItemForSTRING2.Name = "ItemForSTRING2" Me.ItemForSTRING2.Size = New System.Drawing.Size(524, 24) resources.ApplyResources(Me.ItemForSTRING2, "ItemForSTRING2") @@ -983,7 +976,7 @@ Partial Class frmAdmin2 'ItemForSTRING3 ' Me.ItemForSTRING3.Control = Me.STRING3TextEdit - Me.ItemForSTRING3.Location = New System.Drawing.Point(0, 168) + Me.ItemForSTRING3.Location = New System.Drawing.Point(0, 315) Me.ItemForSTRING3.Name = "ItemForSTRING3" Me.ItemForSTRING3.Size = New System.Drawing.Size(524, 24) resources.ApplyResources(Me.ItemForSTRING3, "ItemForSTRING3") @@ -992,7 +985,7 @@ Partial Class frmAdmin2 'ItemForSTRING4 ' Me.ItemForSTRING4.Control = Me.STRING4TextEdit - Me.ItemForSTRING4.Location = New System.Drawing.Point(0, 192) + Me.ItemForSTRING4.Location = New System.Drawing.Point(0, 339) Me.ItemForSTRING4.Name = "ItemForSTRING4" Me.ItemForSTRING4.Size = New System.Drawing.Size(524, 24) resources.ApplyResources(Me.ItemForSTRING4, "ItemForSTRING4") @@ -1001,7 +994,7 @@ Partial Class frmAdmin2 'ItemForSTRING5 ' Me.ItemForSTRING5.Control = Me.STRING5TextEdit - Me.ItemForSTRING5.Location = New System.Drawing.Point(0, 216) + Me.ItemForSTRING5.Location = New System.Drawing.Point(0, 363) Me.ItemForSTRING5.Name = "ItemForSTRING5" Me.ItemForSTRING5.Size = New System.Drawing.Size(524, 24) resources.ApplyResources(Me.ItemForSTRING5, "ItemForSTRING5") @@ -1010,7 +1003,7 @@ Partial Class frmAdmin2 'ItemForSTRING6 ' Me.ItemForSTRING6.Control = Me.STRING6TextEdit - Me.ItemForSTRING6.Location = New System.Drawing.Point(0, 240) + Me.ItemForSTRING6.Location = New System.Drawing.Point(0, 387) Me.ItemForSTRING6.Name = "ItemForSTRING6" Me.ItemForSTRING6.Size = New System.Drawing.Size(524, 24) resources.ApplyResources(Me.ItemForSTRING6, "ItemForSTRING6") @@ -1019,7 +1012,7 @@ Partial Class frmAdmin2 'LayoutControlItem3 ' Me.LayoutControlItem3.Control = Me.TextEdit3 - Me.LayoutControlItem3.Location = New System.Drawing.Point(0, 264) + Me.LayoutControlItem3.Location = New System.Drawing.Point(0, 411) Me.LayoutControlItem3.Name = "ItemForADDED_WHO" Me.LayoutControlItem3.Size = New System.Drawing.Size(262, 24) resources.ApplyResources(Me.LayoutControlItem3, "LayoutControlItem3") @@ -1028,16 +1021,16 @@ Partial Class frmAdmin2 'LayoutControlItem5 ' Me.LayoutControlItem5.Control = Me.TextEdit4 - Me.LayoutControlItem5.Location = New System.Drawing.Point(0, 288) + Me.LayoutControlItem5.Location = New System.Drawing.Point(0, 435) Me.LayoutControlItem5.Name = "ItemForCHANGED_WHO" - Me.LayoutControlItem5.Size = New System.Drawing.Size(262, 171) + Me.LayoutControlItem5.Size = New System.Drawing.Size(262, 24) resources.ApplyResources(Me.LayoutControlItem5, "LayoutControlItem5") Me.LayoutControlItem5.TextSize = New System.Drawing.Size(74, 13) ' 'LayoutControlItem4 ' Me.LayoutControlItem4.Control = Me.ADDED_WHENTextEdit - Me.LayoutControlItem4.Location = New System.Drawing.Point(262, 264) + Me.LayoutControlItem4.Location = New System.Drawing.Point(262, 411) Me.LayoutControlItem4.Name = "ItemForADDED_WHEN" Me.LayoutControlItem4.Size = New System.Drawing.Size(262, 24) resources.ApplyResources(Me.LayoutControlItem4, "LayoutControlItem4") @@ -1046,9 +1039,9 @@ Partial Class frmAdmin2 'LayoutControlItem6 ' Me.LayoutControlItem6.Control = Me.CHANGED_WHENTextEdit - Me.LayoutControlItem6.Location = New System.Drawing.Point(262, 288) + Me.LayoutControlItem6.Location = New System.Drawing.Point(262, 435) Me.LayoutControlItem6.Name = "ItemForCHANGED_WHEN" - Me.LayoutControlItem6.Size = New System.Drawing.Size(262, 171) + Me.LayoutControlItem6.Size = New System.Drawing.Size(262, 24) resources.ApplyResources(Me.LayoutControlItem6, "LayoutControlItem6") Me.LayoutControlItem6.TextSize = New System.Drawing.Size(74, 13) ' @@ -1244,6 +1237,14 @@ Partial Class frmAdmin2 ' Me.TBDD_GUI_LANGUAGE_PHRASETableAdapter.ClearBeforeFill = True ' + 'STRING1TextEdit + ' + Me.STRING1TextEdit.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.TBDD_GUI_LANGUAGE_PHRASEBindingSource, "STRING1", True)) + resources.ApplyResources(Me.STRING1TextEdit, "STRING1TextEdit") + Me.STRING1TextEdit.MenuManager = Me.RibbonControl1 + Me.STRING1TextEdit.Name = "STRING1TextEdit" + Me.STRING1TextEdit.StyleController = Me.DataLayoutControl2 + ' 'frmAdmin2 ' resources.ApplyResources(Me, "$this") @@ -1301,7 +1302,6 @@ Partial Class frmAdmin2 CType(Me.TextEdit2.Properties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LANGUAGEComboBoxEdit.Properties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.CAPT_TYPETextEdit.Properties, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.STRING1TextEdit.Properties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.STRING2TextEdit.Properties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.STRING3TextEdit.Properties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.STRING4TextEdit.Properties, System.ComponentModel.ISupportInitialize).EndInit() @@ -1337,6 +1337,7 @@ Partial Class frmAdmin2 Me.BindingNavigator2.PerformLayout() CType(Me.GridControl2, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.GridView2, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.STRING1TextEdit.Properties, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() @@ -1430,7 +1431,6 @@ Partial Class frmAdmin2 Friend WithEvents TextEdit2 As DevExpress.XtraEditors.TextEdit Friend WithEvents LANGUAGEComboBoxEdit As DevExpress.XtraEditors.ComboBoxEdit Friend WithEvents CAPT_TYPETextEdit As DevExpress.XtraEditors.TextEdit - Friend WithEvents STRING1TextEdit As DevExpress.XtraEditors.TextEdit Friend WithEvents STRING2TextEdit As DevExpress.XtraEditors.TextEdit Friend WithEvents STRING3TextEdit As DevExpress.XtraEditors.TextEdit Friend WithEvents STRING4TextEdit As DevExpress.XtraEditors.TextEdit @@ -1461,4 +1461,5 @@ Partial Class frmAdmin2 Friend WithEvents ItemForMODULE As DevExpress.XtraLayout.LayoutControlItem Friend WithEvents LayoutControlItem2 As DevExpress.XtraLayout.LayoutControlItem Friend WithEvents ItemForOBJ_NAME As DevExpress.XtraLayout.LayoutControlItem + Friend WithEvents STRING1TextEdit As DevExpress.XtraEditors.MemoEdit End Class diff --git a/app/DD_PM_WINDREAM/frmAdmin2.resx b/app/DD_PM_WINDREAM/frmAdmin2.resx index 1b73c57..3dea621 100644 --- a/app/DD_PM_WINDREAM/frmAdmin2.resx +++ b/app/DD_PM_WINDREAM/frmAdmin2.resx @@ -547,13 +547,13 @@ Aktionen - 1059, 158 + 1059, 146 - 0, 691 + 0, 694 - 1059, 24 + 1059, 21 RibbonStatusBar1 @@ -587,7 +587,7 @@ Fill - 0, 158 + 0, 146 @@ -658,6 +658,9 @@ False + + Segoe UI, 9pt + 50, 23 @@ -791,7 +794,7 @@ 5 - 89, 396 + 89, 411 597, 20 @@ -812,7 +815,7 @@ 6 - 89, 420 + 89, 435 258, 20 @@ -833,7 +836,7 @@ 7 - 89, 444 + 89, 459 258, 20 @@ -857,7 +860,7 @@ 89, 84 - 597, 133 + 597, 138 7 @@ -875,10 +878,10 @@ 9 - 89, 221 + 89, 226 - 597, 171 + 597, 181 8 @@ -917,7 +920,7 @@ 11 - 428, 420 + 428, 435 G @@ -944,7 +947,7 @@ 12 - 428, 444 + 428, 459 d @@ -1004,7 +1007,7 @@ Geändert wann - 698, 476 + 698, 491 22 @@ -1055,7 +1058,7 @@ 128 - 353, 508 + 353, 523 20 @@ -1073,7 +1076,7 @@ 2 - 1057, 508 + 1057, 523 Email Phrasen @@ -1091,7 +1094,7 @@ 0 - 1059, 533 + 1059, 548 2 @@ -1220,29 +1223,8 @@ 8 - - 89, 132 - - - 443, 20 - - - 9 - - - STRING1TextEdit - - - DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - - DataLayoutControl2 - - - 9 - - 89, 156 + 89, 303 443, 20 @@ -1260,10 +1242,10 @@ DataLayoutControl2 - 10 + 9 - 89, 180 + 89, 327 443, 20 @@ -1281,10 +1263,10 @@ DataLayoutControl2 - 11 + 10 - 89, 204 + 89, 351 443, 20 @@ -1302,10 +1284,10 @@ DataLayoutControl2 - 12 + 11 - 89, 228 + 89, 375 443, 20 @@ -1323,10 +1305,10 @@ DataLayoutControl2 - 13 + 12 - 89, 252 + 89, 399 443, 20 @@ -1344,10 +1326,10 @@ DataLayoutControl2 - 14 + 13 - 89, 276 + 89, 423 181, 20 @@ -1365,10 +1347,10 @@ DataLayoutControl2 - 15 + 14 - 351, 276 + 351, 423 d @@ -1392,10 +1374,10 @@ DataLayoutControl2 - 16 + 15 - 89, 300 + 89, 447 181, 20 @@ -1413,10 +1395,10 @@ DataLayoutControl2 - 17 + 16 - 351, 300 + 351, 447 d @@ -1440,7 +1422,7 @@ DataLayoutControl2 - 18 + 17 89, 60 @@ -1461,7 +1443,7 @@ DataLayoutControl2 - 19 + 18 274, 12 @@ -1474,7 +1456,7 @@ Default - 108, 20 + 108, 19 20 @@ -1489,6 +1471,27 @@ DataLayoutControl2 + 19 + + + 89, 132 + + + 443, 167 + + + 9 + + + STRING1TextEdit + + + DevExpress.XtraEditors.MemoEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + DataLayoutControl2 + + 20 @@ -1625,6 +1628,9 @@ False + + Segoe UI, 9pt + 50, 23 @@ -1748,7 +1754,7 @@ 3 - 509, 508 + 509, 523 21 @@ -1766,7 +1772,7 @@ 2 - 1057, 508 + 1057, 523 GUI Phrasen diff --git a/app/DD_PM_WINDREAM/frmValidator.vb b/app/DD_PM_WINDREAM/frmValidator.vb index 81cad66..699833b 100644 --- a/app/DD_PM_WINDREAM/frmValidator.vb +++ b/app/DD_PM_WINDREAM/frmValidator.vb @@ -666,6 +666,7 @@ Public Class frmValidator For Each oControlRow As DataRow In DTCONTROLS.Rows Dim oMyControl As Control + Dim oControlID = oControlRow.Item("GUID") oControlInfo = $"CtrlName: {oControlRow.Item("NAME")} - CtrlIndex: {oControlRow.Item("INDEX_NAME")}" Try Select Case oControlRow.Item("CTRL_TYPE").ToString.ToUpper @@ -948,6 +949,10 @@ Public Class frmValidator End If End If End Sub + + + + oMyControl = oGrid Case "LINE" @@ -996,7 +1001,16 @@ Public Class frmValidator allgFunk.Insert_LogEntry($"ERROR CreateControls >> {ex.Message}") End Try End Sub + Private Sub GridControlColumnWidthChanged(sender As System.Object, e As System.EventArgs) + Try + Dim oMyGridView As DevExpress.XtraGrid.Views.Grid.GridView = sender + Dim oControlID = DirectCast(oMyGridView.GridControl.Tag, ClassControlCreator.ControlMetadata).Guid + SaveDevExpressGridControl_Layout(CURRENT_ProfilGUID, oControlID, oMyGridView) + Catch ex As Exception + + End Try + End Sub Sub Clear_all_Input() For Each inctrl As Control In Me.pnldesigner.Controls Dim Type As String = inctrl.GetType.ToString @@ -2414,7 +2428,11 @@ Public Class frmValidator Dim oType As String = oControl.GetType.ToString Dim oTyp As String = oControlRow.Item("CTRL_TYPE") - Dim oIDBTyp As String = oControlRow.Item("IDB_TYP") + Dim oIDBTyp As String + If IDB_ACTIVE Then + oIDBTyp = oControlRow.Item("IDB_TYP") + End If + Dim oSourceIndexName As String = oControlRow.Item("INDEX_NAME") ' Wenn kein defaultValue existiert, leeren String setzen Dim oDefaultValue As String = NotNull(oControlRow.Item("DEFAULT_VALUE"), String.Empty) @@ -2582,6 +2600,7 @@ Public Class frmValidator Case "DevExpress.XtraGrid.GridControl" oControlType = "DevExpress.XtraGrid.GridControl" Dim oMyGridControl As GridControl = oControl + Dim oDTColumnsPerDevExGrid As DataTable = DTGRID_COLUMNS.Clone() If oSourceIndexName = "" Then MsgBox("Attention wrong configuration:" & vbNewLine & "for control " & oControl.Name & " no INDEX configured!" & vbNewLine & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical, ADDITIONAL_TITLE) Exit For @@ -2603,11 +2622,14 @@ Public Class frmValidator Select Case oTyp 'Tabellendarstellung Case "TABLE" - Dim oDTColumnsPerDevExGrid As DataTable = ClassDatabase.Return_Datatable($"SELECT * FROM TBPM_CONTROL_TABLE WHERE CONTROL_ID = {oControlId} ORDER BY [SEQUENCE]") - Dim oColCount = oDTColumnsPerDevExGrid.Rows.Count + Dim oExpression = $"CONTROL_ID = {oControlId}" + DTGRID_COLUMNS.Select(oExpression, "SEQUENCE").CopyToDataTable(oDTColumnsPerDevExGrid, LoadOption.PreserveChanges) + + 'Dim oDTColumnsPerDevExGrid As DataTable = ClassDatabase.Return_Datatable($"SELECT * FROM TBPM_CONTROL_TABLE WHERE CONTROL_ID = {oControlId} ORDER BY [SEQUENCE]") + 'Dim oColCount = oDTColumnsPerDevExGrid.Rows.Count Dim oColValuesfromSource As String() - LOGGER.Debug($"DevExpressGrid: {oColCount} Columns configured for control {oControlId}.") - If oColCount >= 1 Then + LOGGER.Debug($"DevExpressGrid: {oDTColumnsPerDevExGrid.Rows.Count} Columns configured for control {oControlId}.") + If oDTColumnsPerDevExGrid.Rows.Count >= 1 Then Dim oDataSource As DataTable = oMyGridControl.DataSource oDataSource.Rows.Clear() If IDB_ACTIVE = False Then @@ -2615,7 +2637,7 @@ Public Class frmValidator LOGGER.Debug($"vektorrow Value {Zeile.ToString}...") oColValuesfromSource = Split(Zeile, Delimiter) - Select Case oColCount + Select Case oDTColumnsPerDevExGrid.Rows.Count Case 1 oDataSource.Rows.Add(New String() {Zeile.ToString}) @@ -2683,45 +2705,7 @@ Public Class frmValidator Case 4 oDataSource.Rows.Add(New String() {oColValuesfromSource(0), oColValuesfromSource(1), oColValuesfromSource(2), oColValuesfromSource(3)}) End Select - 'Select Case oMyDatatable.Rows.Count - ' Case 1 - ' oDataSource.Rows.Add(New String() {oRow.Item(0).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 @@ -2756,6 +2740,30 @@ Public Class frmValidator End If End If + Try + 'Dim oFilteredDatatable As DataTable = DTGRID_COLUMNS.Clone() + 'Dim oExpression = $"CONTROL_ID = {oControlRow.Item("GUID")}" + 'DTGRID_COLUMNS.Select(oExpression, "SEQUENCE").CopyToDataTable(oFilteredDatatable, LoadOption.PreserveChanges) + Dim oMyGridView As DevExpress.XtraGrid.Views.Grid.GridView = oMyGridControl.MainView + oMyGridView.OptionsView.ColumnAutoWidth = False + 'AddHandler oMyGridView.ColumnWidthChanged, AddressOf GridControlColumnWidthChanged + For Each oRow As DataRow In oDTColumnsPerDevExGrid.Rows + For Each oActGridColumn As DevExpress.XtraGrid.Columns.GridColumn In oMyGridView.Columns + Dim oGridDXFieldName = oActGridColumn.FieldName + Dim GridDXColumnEditName = oActGridColumn.ColumnEditName + If oRow.Item("SPALTENNAME") = oGridDXFieldName Then + oActGridColumn.Width = oRow.Item("SPALTENBREITE") + Exit For + End If + + Next + Next + Dim i = 0 + + ' RestoreDevExpressGridControl_Layout(CURRENT_CLICKED_PROFILE_ID, oControlId, oMyGridView) + Catch ex As Exception + + End Try End If Case "System.Windows.Forms.CheckBox" LOGGER.Debug("Loading checkbox.") @@ -3600,7 +3608,11 @@ Public Class frmValidator Dim oSQLCheckCommand As String = IIf(IsDBNull(dr.Item("SQL_UEBERPRUEFUNG")), "", dr.Item("SQL_UEBERPRUEFUNG")) Dim oIsReadOnly As Boolean = CBool(dr.Item("READ_ONLY")) Dim oControlType As String = dr.Item("CTRL_TYPE") - Dim oIDBTyp As Integer = dr.Item("IDB_TYP") + Dim oIDBTyp As Integer + If IDB_ACTIVE Then + oIDBTyp = dr.Item("IDB_TYP") + End If + oControlId = dr.Item("GUID") Dim oRegexMatch As String = NotNull(dr.Item("REGEX_MATCH"), String.Empty) Dim oRegexMessage As String = NotNull(dr.Item("REGEX_MESSAGE_DE"), String.Empty) @@ -4732,4 +4744,31 @@ Public Class frmValidator SetStatusLabel($"Error while saving data!", "Red") End If End Sub + Private Sub SaveDevExpressGridControl_Layout(pProfilID As Integer, pControlID As Integer, pGridView As DevExpress.XtraGrid.Views.Grid.GridView) + Try + Dim xml As String = GetXML_OverviewLayoutName(pProfilID, pControlID) + pGridView.SaveLayoutToXml(xml) + Catch ex As Exception + LOGGER.Error(ex) + LOGGER.Info("Error while saving GridLayout: " & ex.Message) + End Try + End Sub + + Private Sub RestoreDevExpressGridControl_Layout(pProfilID As Integer, pControlID As Integer, pGridView As DevExpress.XtraGrid.Views.Grid.GridView) + + Try + Dim oXml As String = GetXML_OverviewLayoutName(pProfilID, pControlID) + If File.Exists(oXml) Then + pGridView.RestoreLayoutFromXml(oXml) + End If + + Catch ex As Exception + LOGGER.Error(ex) + LOGGER.Info("Error while restoring layout: " & ex.Message) + End Try + End Sub + Private Function GetXML_OverviewLayoutName(pProfilID As Integer, pControlID As Integer) + Dim Filename As String = String.Format($"DevExpressValidatorGridControl_{pProfilID}-{pControlID}.xml") + Return System.IO.Path.Combine(Application.UserAppDataPath(), Filename) + End Function End Class \ No newline at end of file