diff --git a/app/DD-Record-Organizer/Classes/NodeNavigation/ClassDoctypeChange.vb b/app/DD-Record-Organizer/Classes/NodeNavigation/ClassDoctypeChange.vb new file mode 100644 index 0000000..51d7b0d --- /dev/null +++ b/app/DD-Record-Organizer/Classes/NodeNavigation/ClassDoctypeChange.vb @@ -0,0 +1,29 @@ +Imports DD_LIB_Standards +Imports DigitalData.Modules.Base +Imports DigitalData.Modules.Logging + +Public Class ClassDoctypeChange + Inherits BaseClass + + Public Sub New(pLogConfig As LogConfig) + MyBase.New(pLogConfig) + End Sub + + Public Function ChangeDocType(pFilePaths As List(Of String), pNewDocTypeName As String, pObjectType As String) As Boolean + Try + For Each oPath As String In pFilePaths + Dim oResult As Boolean = clsWD_SET.IndexFile(oPath, "String 37", pNewDocTypeName, pObjectType) + If oResult = True Then + Logger.Debug("Successfully set doctype of file [{0}] to [{1}]", oPath, pNewDocTypeName) + Else + Logger.Warn("Could not set doctype of file [{0}]!", pNewDocTypeName) + End If + Next + + Return True + Catch ex As Exception + Logger.Error(ex) + + End Try + End Function +End Class diff --git a/app/DD-Record-Organizer/OrgFlow.vbproj b/app/DD-Record-Organizer/OrgFlow.vbproj index 04def83..08c8407 100644 --- a/app/DD-Record-Organizer/OrgFlow.vbproj +++ b/app/DD-Record-Organizer/OrgFlow.vbproj @@ -307,6 +307,7 @@ + True @@ -322,6 +323,12 @@ Form + + frmChangeDocType.vb + + + Form + frmChooseParentRecord.vb @@ -803,6 +810,9 @@ frmCalendarEntity.vb + + frmChangeDocType.vb + frmChooseParentRecord.vb diff --git a/app/DD-Record-Organizer/frmChangeDocType.Designer.vb b/app/DD-Record-Organizer/frmChangeDocType.Designer.vb new file mode 100644 index 0000000..6b5b397 --- /dev/null +++ b/app/DD-Record-Organizer/frmChangeDocType.Designer.vb @@ -0,0 +1,174 @@ + _ +Partial Class frmChangeDocType + Inherits DevExpress.XtraEditors.XtraForm + + 'Form overrides dispose to clean up the component list. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + MyBase.Dispose(disposing) + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + _ + Private Sub InitializeComponent() + Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmChangeDocType)) + Me.LayoutControl1 = New DevExpress.XtraLayout.LayoutControl() + Me.Root = New DevExpress.XtraLayout.LayoutControlGroup() + Me.cmbDocType = New DevExpress.XtraEditors.ComboBoxEdit() + Me.LayoutControlItem2 = New DevExpress.XtraLayout.LayoutControlItem() + Me.SimpleButton1 = New DevExpress.XtraEditors.SimpleButton() + Me.LayoutControlItem1 = New DevExpress.XtraLayout.LayoutControlItem() + Me.EmptySpaceItem1 = New DevExpress.XtraLayout.EmptySpaceItem() + Me.EmptySpaceItem2 = New DevExpress.XtraLayout.EmptySpaceItem() + Me.txtDocuments = New DevExpress.XtraEditors.TextEdit() + Me.LayoutControlItem3 = New DevExpress.XtraLayout.LayoutControlItem() + CType(Me.LayoutControl1, System.ComponentModel.ISupportInitialize).BeginInit() + Me.LayoutControl1.SuspendLayout() + CType(Me.Root, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.cmbDocType.Properties, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.LayoutControlItem2, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.LayoutControlItem1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.EmptySpaceItem1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.EmptySpaceItem2, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.txtDocuments.Properties, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.LayoutControlItem3, System.ComponentModel.ISupportInitialize).BeginInit() + Me.SuspendLayout() + ' + 'LayoutControl1 + ' + Me.LayoutControl1.Controls.Add(Me.cmbDocType) + Me.LayoutControl1.Controls.Add(Me.SimpleButton1) + Me.LayoutControl1.Controls.Add(Me.txtDocuments) + Me.LayoutControl1.Dock = System.Windows.Forms.DockStyle.Fill + Me.LayoutControl1.Location = New System.Drawing.Point(0, 0) + Me.LayoutControl1.Name = "LayoutControl1" + Me.LayoutControl1.Root = Me.Root + Me.LayoutControl1.Size = New System.Drawing.Size(431, 131) + Me.LayoutControl1.TabIndex = 0 + Me.LayoutControl1.Text = "LayoutControl1" + ' + 'Root + ' + Me.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.[True] + Me.Root.GroupBordersVisible = False + Me.Root.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlItem2, Me.LayoutControlItem1, Me.EmptySpaceItem1, Me.EmptySpaceItem2, Me.LayoutControlItem3}) + Me.Root.Name = "Root" + Me.Root.Size = New System.Drawing.Size(431, 131) + Me.Root.TextVisible = False + ' + 'cmbDocType + ' + Me.cmbDocType.Location = New System.Drawing.Point(114, 36) + Me.cmbDocType.Name = "cmbDocType" + Me.cmbDocType.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) + Me.cmbDocType.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor + Me.cmbDocType.Size = New System.Drawing.Size(305, 20) + Me.cmbDocType.StyleController = Me.LayoutControl1 + Me.cmbDocType.TabIndex = 5 + ' + 'LayoutControlItem2 + ' + Me.LayoutControlItem2.Control = Me.cmbDocType + Me.LayoutControlItem2.Location = New System.Drawing.Point(0, 24) + Me.LayoutControlItem2.Name = "LayoutControlItem2" + Me.LayoutControlItem2.Size = New System.Drawing.Size(411, 24) + Me.LayoutControlItem2.Text = "Neue Dokumentart" + Me.LayoutControlItem2.TextSize = New System.Drawing.Size(90, 13) + ' + 'SimpleButton1 + ' + Me.SimpleButton1.DialogResult = System.Windows.Forms.DialogResult.OK + Me.SimpleButton1.Location = New System.Drawing.Point(299, 97) + Me.SimpleButton1.Name = "SimpleButton1" + Me.SimpleButton1.Size = New System.Drawing.Size(120, 22) + Me.SimpleButton1.StyleController = Me.LayoutControl1 + Me.SimpleButton1.TabIndex = 6 + Me.SimpleButton1.Text = "OK" + ' + 'LayoutControlItem1 + ' + Me.LayoutControlItem1.Control = Me.SimpleButton1 + Me.LayoutControlItem1.Location = New System.Drawing.Point(287, 85) + Me.LayoutControlItem1.Name = "LayoutControlItem1" + Me.LayoutControlItem1.Size = New System.Drawing.Size(124, 26) + Me.LayoutControlItem1.TextSize = New System.Drawing.Size(0, 0) + Me.LayoutControlItem1.TextVisible = False + ' + 'EmptySpaceItem1 + ' + Me.EmptySpaceItem1.AllowHotTrack = False + Me.EmptySpaceItem1.Location = New System.Drawing.Point(0, 85) + Me.EmptySpaceItem1.Name = "EmptySpaceItem1" + Me.EmptySpaceItem1.Size = New System.Drawing.Size(287, 26) + Me.EmptySpaceItem1.TextSize = New System.Drawing.Size(0, 0) + ' + 'EmptySpaceItem2 + ' + Me.EmptySpaceItem2.AllowHotTrack = False + Me.EmptySpaceItem2.Location = New System.Drawing.Point(0, 48) + Me.EmptySpaceItem2.Name = "EmptySpaceItem2" + Me.EmptySpaceItem2.Size = New System.Drawing.Size(411, 37) + Me.EmptySpaceItem2.TextSize = New System.Drawing.Size(0, 0) + ' + 'txtDocuments + ' + Me.txtDocuments.Location = New System.Drawing.Point(114, 12) + Me.txtDocuments.Name = "txtDocuments" + Me.txtDocuments.Properties.ReadOnly = True + Me.txtDocuments.Size = New System.Drawing.Size(305, 20) + Me.txtDocuments.StyleController = Me.LayoutControl1 + Me.txtDocuments.TabIndex = 7 + ' + 'LayoutControlItem3 + ' + Me.LayoutControlItem3.Control = Me.txtDocuments + Me.LayoutControlItem3.Location = New System.Drawing.Point(0, 0) + Me.LayoutControlItem3.Name = "LayoutControlItem3" + Me.LayoutControlItem3.Size = New System.Drawing.Size(411, 24) + Me.LayoutControlItem3.Text = "Dokument" + Me.LayoutControlItem3.TextSize = New System.Drawing.Size(90, 13) + ' + 'frmChangeDocType + ' + Me.AcceptButton = Me.SimpleButton1 + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(431, 131) + Me.Controls.Add(Me.LayoutControl1) + Me.IconOptions.SvgImage = CType(resources.GetObject("frmChangeDocType.IconOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) + Me.Name = "frmChangeDocType" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent + Me.Text = "Dokumentart ändern" + CType(Me.LayoutControl1, System.ComponentModel.ISupportInitialize).EndInit() + Me.LayoutControl1.ResumeLayout(False) + CType(Me.Root, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.cmbDocType.Properties, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.LayoutControlItem2, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.LayoutControlItem1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.EmptySpaceItem1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.EmptySpaceItem2, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.txtDocuments.Properties, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.LayoutControlItem3, System.ComponentModel.ISupportInitialize).EndInit() + Me.ResumeLayout(False) + + End Sub + + Friend WithEvents LayoutControl1 As DevExpress.XtraLayout.LayoutControl + Friend WithEvents Root As DevExpress.XtraLayout.LayoutControlGroup + Friend WithEvents cmbDocType As DevExpress.XtraEditors.ComboBoxEdit + Friend WithEvents SimpleButton1 As DevExpress.XtraEditors.SimpleButton + Friend WithEvents LayoutControlItem2 As DevExpress.XtraLayout.LayoutControlItem + Friend WithEvents LayoutControlItem1 As DevExpress.XtraLayout.LayoutControlItem + Friend WithEvents EmptySpaceItem1 As DevExpress.XtraLayout.EmptySpaceItem + Friend WithEvents EmptySpaceItem2 As DevExpress.XtraLayout.EmptySpaceItem + Friend WithEvents txtDocuments As DevExpress.XtraEditors.TextEdit + Friend WithEvents LayoutControlItem3 As DevExpress.XtraLayout.LayoutControlItem +End Class diff --git a/app/DD-Record-Organizer/frmChangeDocType.resx b/app/DD-Record-Organizer/frmChangeDocType.resx new file mode 100644 index 0000000..b76fe78 --- /dev/null +++ b/app/DD-Record-Organizer/frmChangeDocType.resx @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAHECAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTXVsdGlwbGVfRG9jdW1lbnRzIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91 + bmQ6bmV3IDAgMCAzMiAzMiI+DQogIDxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+CgkuQmxhY2t7ZmlsbDoj + NzI3MjcyO30KPC9zdHlsZT4NCiAgPHBhdGggZD0iTTMxLDhoLTVWNWMwLTAuNS0wLjUtMS0xLTFoLTVW + MWMwLTAuNS0wLjUtMS0xLTFIMUMwLjUsMCwwLDAuNSwwLDF2MjJjMCwwLjUsMC41LDEsMSwxaDV2M2Mw + LDAuNSwwLjUsMSwxLDEgIGg1djNjMCwwLjUsMC41LDEsMSwxaDE4YzAuNSwwLDEtMC41LDEtMVY5QzMy + LDguNSwzMS41LDgsMzEsOHogTTYsNXYxN0gyVjJoMTZ2Mkg3QzYuNSw0LDYsNC41LDYsNXogTTEyLDl2 + MTdIOFY2aDE2djJIMTMgIEMxMi41LDgsMTIsOC41LDEyLDl6IE0zMCwzMEgxNFYxMGgxNlYzMHoiIGNs + YXNzPSJCbGFjayIgLz4NCjwvc3ZnPgs= + + + \ No newline at end of file diff --git a/app/DD-Record-Organizer/frmChangeDocType.vb b/app/DD-Record-Organizer/frmChangeDocType.vb new file mode 100644 index 0000000..7c7dce0 --- /dev/null +++ b/app/DD-Record-Organizer/frmChangeDocType.vb @@ -0,0 +1,29 @@ +Public Class frmChangeDocType + Public Property SelectedDocType As DocType + Public Property DocTypes As List(Of DocType) + Public Property FileNames As List(Of String) + + + Private Sub frmChangeDocType_Load(sender As Object, e As EventArgs) Handles MyBase.Load + cmbDocType.Properties.Items.AddRange(DocTypes) + + If FileNames.Count = 1 Then + txtDocuments.EditValue = FileNames.First() + Else + txtDocuments.EditValue = $"{FileNames.Count} Dokumente" + End If + End Sub + + Public Class DocType + Public Property Name As String + Public Property Id As Integer + + Public Overrides Function ToString() As String + Return Name + End Function + End Class + + Private Sub SimpleButton1_Click(sender As Object, e As EventArgs) Handles SimpleButton1.Click + SelectedDocType = cmbDocType.EditValue + End Sub +End Class \ No newline at end of file diff --git a/app/DD-Record-Organizer/frmNewNode.Designer.vb b/app/DD-Record-Organizer/frmNewNode.Designer.vb index 0c67dae..6c7cdd8 100644 --- a/app/DD-Record-Organizer/frmNewNode.Designer.vb +++ b/app/DD-Record-Organizer/frmNewNode.Designer.vb @@ -19,6 +19,7 @@ Partial Class frmNewNode 'Do not modify it using the code editor. _ Private Sub InitializeComponent() + Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmNewNode)) Me.LayoutControl1 = New DevExpress.XtraLayout.LayoutControl() Me.cmbNodeConfig = New DevExpress.XtraEditors.ComboBoxEdit() Me.TextEdit1 = New DevExpress.XtraEditors.TextEdit() @@ -56,19 +57,19 @@ Partial Class frmNewNode ' 'cmbNodeConfig ' - Me.cmbNodeConfig.Location = New System.Drawing.Point(73, 36) + Me.cmbNodeConfig.Location = New System.Drawing.Point(81, 36) Me.cmbNodeConfig.Name = "cmbNodeConfig" Me.cmbNodeConfig.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) Me.cmbNodeConfig.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor - Me.cmbNodeConfig.Size = New System.Drawing.Size(356, 20) + Me.cmbNodeConfig.Size = New System.Drawing.Size(348, 20) Me.cmbNodeConfig.StyleController = Me.LayoutControl1 Me.cmbNodeConfig.TabIndex = 4 ' 'TextEdit1 ' - Me.TextEdit1.Location = New System.Drawing.Point(73, 12) + Me.TextEdit1.Location = New System.Drawing.Point(81, 12) Me.TextEdit1.Name = "TextEdit1" - Me.TextEdit1.Size = New System.Drawing.Size(356, 20) + Me.TextEdit1.Size = New System.Drawing.Size(348, 20) Me.TextEdit1.StyleController = Me.LayoutControl1 Me.TextEdit1.TabIndex = 5 ' @@ -140,9 +141,11 @@ Partial Class frmNewNode Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(441, 125) Me.Controls.Add(Me.LayoutControl1) + Me.IconOptions.SvgImage = CType(resources.GetObject("frmNewNode.IconOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "frmNewNode" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent Me.Text = "Neuen Knoten erstellen" CType(Me.LayoutControl1, System.ComponentModel.ISupportInitialize).EndInit() Me.LayoutControl1.ResumeLayout(False) diff --git a/app/DD-Record-Organizer/frmNewNode.resx b/app/DD-Record-Organizer/frmNewNode.resx index 1af7de1..6bb6dd7 100644 --- a/app/DD-Record-Organizer/frmNewNode.resx +++ b/app/DD-Record-Organizer/frmNewNode.resx @@ -117,4 +117,28 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAIkDAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkdyZWVue2ZpbGw6IzAzOUMyMzt9Cgku + QmxhY2t7ZmlsbDojNzI3MjcyO30KCS5SZWR7ZmlsbDojRDExQzFDO30KCS5ZZWxsb3d7ZmlsbDojRkZC + MTE1O30KCS5CbHVle2ZpbGw6IzExNzdENzt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQo8L3N0eWxlPg0KICA8ZyBpZD0iSW5zZXJ0VHJl + ZVZpZXciPg0KICAgIDxwYXRoIGQ9Ik0xMyw4SDVDNC40LDgsNCw3LjYsNCw3VjNjMC0wLjUsMC40LTEs + MS0xaDhjMC42LDAsMSwwLjUsMSwxdjRDMTQsNy42LDEzLjYsOCwxMyw4eiBNMjYsMTd2LTQgICBjMC0w + LjYtMC41LTEtMS0xaC04Yy0wLjUsMC0xLDAuNC0xLDF2NGMwLDAuNSwwLjUsMSwxLDFoOEMyNS41LDE4 + LDI2LDE3LjUsMjYsMTd6IE0yNiwyN3YtNGMwLTAuNS0wLjUtMS0xLTFoLThjLTAuNSwwLTEsMC41LTEs + MSAgIHY0YzAsMC41LDAuNSwxLDEsMWg4QzI1LjUsMjgsMjYsMjcuNSwyNiwyN3oiIGNsYXNzPSJZZWxs + b3ciIC8+DQogICAgPHBvbHlnb24gcG9pbnRzPSIxNCwxNiAxNCwxNCAxMCwxNCAxMCwxMCA4LDEwIDgs + MjYgMTQsMjYgMTQsMjQgMTAsMjQgMTAsMTYgICIgY2xhc3M9IkJsYWNrIiAvPg0KICA8L2c+DQo8L3N2 + Zz4L + + \ No newline at end of file diff --git a/app/DD-Record-Organizer/frmNodeNavigation.Designer.vb b/app/DD-Record-Organizer/frmNodeNavigation.Designer.vb index bc132eb..b040e80 100644 --- a/app/DD-Record-Organizer/frmNodeNavigation.Designer.vb +++ b/app/DD-Record-Organizer/frmNodeNavigation.Designer.vb @@ -85,6 +85,7 @@ Partial Class frmNodeNavigation Me.TimerClearResultfiles = New System.Windows.Forms.Timer(Me.components) Me.SplitContainerDocView = New DevExpress.XtraEditors.SplitContainerControl() Me.DocumentViewer = New DigitalData.Controls.DocumentViewer.DocumentViewer() + Me.DokumentartÄndernToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() CType(Me.ribbonNodeNavigation, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.SplitContainerMain, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.SplitContainerMain.Panel1, System.ComponentModel.ISupportInitialize).BeginInit() @@ -124,7 +125,7 @@ Partial Class frmNodeNavigation Me.ribbonNodeNavigation.ShowExpandCollapseButton = DevExpress.Utils.DefaultBoolean.[True] Me.ribbonNodeNavigation.ShowMoreCommandsButton = DevExpress.Utils.DefaultBoolean.[False] Me.ribbonNodeNavigation.ShowToolbarCustomizeItem = False - Me.ribbonNodeNavigation.Size = New System.Drawing.Size(1307, 147) + Me.ribbonNodeNavigation.Size = New System.Drawing.Size(1307, 158) Me.ribbonNodeNavigation.StatusBar = Me.RibbonStatusBar1 Me.ribbonNodeNavigation.Toolbar.ShowCustomizeItem = False ' @@ -305,10 +306,10 @@ Partial Class frmNodeNavigation Me.RibbonStatusBar1.ItemLinks.Add(Me.bsitmRecordID) Me.RibbonStatusBar1.ItemLinks.Add(Me.BarStaticItemLocked) Me.RibbonStatusBar1.ItemLinks.Add(Me.bsitmtInfoDoc) - Me.RibbonStatusBar1.Location = New System.Drawing.Point(0, 667) + Me.RibbonStatusBar1.Location = New System.Drawing.Point(0, 668) Me.RibbonStatusBar1.Name = "RibbonStatusBar1" Me.RibbonStatusBar1.Ribbon = Me.ribbonNodeNavigation - Me.RibbonStatusBar1.Size = New System.Drawing.Size(1307, 23) + Me.RibbonStatusBar1.Size = New System.Drawing.Size(1307, 22) ' 'RibbonPage2 ' @@ -330,7 +331,7 @@ Partial Class frmNodeNavigation ' Me.SplitContainerMain.Panel2.Controls.Add(Me.SplitContainer1) Me.SplitContainerMain.Panel2.Text = "Panel2" - Me.SplitContainerMain.Size = New System.Drawing.Size(1295, 520) + Me.SplitContainerMain.Size = New System.Drawing.Size(1297, 510) Me.SplitContainerMain.SplitterPosition = 289 Me.SplitContainerMain.TabIndex = 2 ' @@ -368,7 +369,7 @@ Partial Class frmNodeNavigation Me.TreeListDevexpress.OptionsView.ShowVertLines = False Me.TreeListDevexpress.OptionsView.TreeLineStyle = DevExpress.XtraTreeList.LineStyle.Dark Me.TreeListDevexpress.ParentFieldName = "PARENT_GUID" - Me.TreeListDevexpress.Size = New System.Drawing.Size(289, 520) + Me.TreeListDevexpress.Size = New System.Drawing.Size(289, 510) Me.TreeListDevexpress.StateImageList = Me.ImageCollection1 Me.TreeListDevexpress.TabIndex = 1 ' @@ -391,8 +392,8 @@ Partial Class frmNodeNavigation 'SplitContainer1.Panel2 ' Me.SplitContainer1.Panel2.Controls.Add(Me.GridControlDocSearch) - Me.SplitContainer1.Size = New System.Drawing.Size(994, 520) - Me.SplitContainer1.SplitterDistance = 167 + Me.SplitContainer1.Size = New System.Drawing.Size(998, 510) + Me.SplitContainer1.SplitterDistance = 163 Me.SplitContainer1.TabIndex = 0 ' 'pnlControls @@ -402,7 +403,7 @@ Partial Class frmNodeNavigation Me.pnlControls.Dock = System.Windows.Forms.DockStyle.Fill Me.pnlControls.Location = New System.Drawing.Point(0, 0) Me.pnlControls.Name = "pnlControls" - Me.pnlControls.Size = New System.Drawing.Size(994, 167) + Me.pnlControls.Size = New System.Drawing.Size(998, 163) Me.pnlControls.TabIndex = 0 ' 'GridControlDocSearch @@ -415,7 +416,7 @@ Partial Class frmNodeNavigation Me.GridControlDocSearch.Location = New System.Drawing.Point(0, 0) Me.GridControlDocSearch.MainView = Me.GridViewDoc_Search Me.GridControlDocSearch.Name = "GridControlDocSearch" - Me.GridControlDocSearch.Size = New System.Drawing.Size(994, 349) + Me.GridControlDocSearch.Size = New System.Drawing.Size(998, 343) Me.GridControlDocSearch.TabIndex = 8 Me.GridControlDocSearch.TabStop = False Me.GridControlDocSearch.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridViewDoc_Search}) @@ -472,9 +473,9 @@ Partial Class frmNodeNavigation ' 'cmsResultFileDetail ' - Me.cmsResultFileDetail.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tsmiFileProperties, Me.ToolStripSeparator5, Me.tsmiFileOpen, Me.tsmiFileFolderOpen, Me.ToolStripSeparator1, Me.tsmiFileInWork, Me.ToolStripSeparator3, Me.tsmiFileLink_Add, Me.tsmiFileLink_ShowAll, Me.tsmiFileLinkRemove, Me.ToolStripSeparator2, Me.tsmiFileRename, Me.tsmiFileVersion, Me.tsmiFileRightsShow, Me.ToolStripSeparator4, Me.tsmiFileDelete}) + Me.cmsResultFileDetail.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tsmiFileProperties, Me.ToolStripSeparator5, Me.tsmiFileOpen, Me.tsmiFileFolderOpen, Me.ToolStripSeparator1, Me.tsmiFileInWork, Me.ToolStripSeparator3, Me.tsmiFileLink_Add, Me.tsmiFileLink_ShowAll, Me.tsmiFileLinkRemove, Me.ToolStripSeparator2, Me.tsmiFileRename, Me.tsmiFileVersion, Me.DokumentartÄndernToolStripMenuItem, Me.tsmiFileRightsShow, Me.ToolStripSeparator4, Me.tsmiFileDelete}) Me.cmsResultFileDetail.Name = "ContextMenuStripResultFiles" - Me.cmsResultFileDetail.Size = New System.Drawing.Size(240, 276) + Me.cmsResultFileDetail.Size = New System.Drawing.Size(240, 320) ' 'tsmiFileProperties ' @@ -603,7 +604,7 @@ Partial Class frmNodeNavigation Me.SplitContainerDocView.Collapsed = True Me.SplitContainerDocView.CollapsePanel = DevExpress.XtraEditors.SplitCollapsePanel.Panel2 Me.SplitContainerDocView.Dock = System.Windows.Forms.DockStyle.Fill - Me.SplitContainerDocView.Location = New System.Drawing.Point(0, 147) + Me.SplitContainerDocView.Location = New System.Drawing.Point(0, 158) Me.SplitContainerDocView.Name = "SplitContainerDocView" ' 'SplitContainerDocView.Panel1 @@ -615,7 +616,7 @@ Partial Class frmNodeNavigation ' Me.SplitContainerDocView.Panel2.Controls.Add(Me.DocumentViewer) Me.SplitContainerDocView.Panel2.Text = "Panel2" - Me.SplitContainerDocView.Size = New System.Drawing.Size(1307, 520) + Me.SplitContainerDocView.Size = New System.Drawing.Size(1307, 510) Me.SplitContainerDocView.SplitterPosition = 969 Me.SplitContainerDocView.TabIndex = 0 ' @@ -628,6 +629,12 @@ Partial Class frmNodeNavigation Me.DocumentViewer.Size = New System.Drawing.Size(0, 0) Me.DocumentViewer.TabIndex = 0 ' + 'DokumentartÄndernToolStripMenuItem + ' + Me.DokumentartÄndernToolStripMenuItem.Name = "DokumentartÄndernToolStripMenuItem" + Me.DokumentartÄndernToolStripMenuItem.Size = New System.Drawing.Size(239, 22) + Me.DokumentartÄndernToolStripMenuItem.Text = "Dokumentart ändern" + ' 'frmNodeNavigation ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -729,4 +736,5 @@ Partial Class frmNodeNavigation Friend WithEvents RibbonPageGroupView As DevExpress.XtraBars.Ribbon.RibbonPageGroup Friend WithEvents checkShowPreview As DevExpress.XtraBars.BarCheckItem Friend WithEvents btnCreateNewNode As DevExpress.XtraBars.BarButtonItem + Friend WithEvents DokumentartÄndernToolStripMenuItem As ToolStripMenuItem End Class diff --git a/app/DD-Record-Organizer/frmNodeNavigation.vb b/app/DD-Record-Organizer/frmNodeNavigation.vb index b62c49e..834258c 100644 --- a/app/DD-Record-Organizer/frmNodeNavigation.vb +++ b/app/DD-Record-Organizer/frmNodeNavigation.vb @@ -2938,15 +2938,56 @@ Public Class frmNodeNavigation Dim oParentNodeGuid As Integer = FocusedNode.Item("GUID") Dim oIsExpanded As Boolean = FocusedNode.Expanded Dim oNodeCreator = New ClassNodeCreator(LOGCONFIG, ImageCollection1) - oNodeCreator.AddNode(_EntityId, oForm.Title, oParentNodeGuid, oForm.Id, oCreateRecord) + Dim oSuccess = oNodeCreator.AddNode(_EntityId, oForm.Title, oParentNodeGuid, oForm.Id, oCreateRecord) - Await ReloadTreeView() + If oSuccess = True Then + Dim oMessage As String = "Der Knoten wurde erfolgreich angelegt! Wollen Sie die Sicht jetzt neu laden? Abhängig von der Anzahl der Knoten kann dies einige Sekunden dauern." - Dim oNode = TreeListDevexpress.FindNodeByFieldValue("GUID", oParentNodeGuid) - Dim oNodeIndex = TreeListDevexpress.MakeNodeVisible(oNode) - TreeListDevexpress.SetFocusedNode(oNode) - If oIsExpanded Then - oNode.Expand() + If MsgBox(oMessage, MsgBoxStyle.Question Or MsgBoxStyle.YesNo, Text) = MsgBoxResult.Yes Then + Await ReloadTreeView() + + Dim oNode = TreeListDevexpress.FindNodeByFieldValue("GUID", oParentNodeGuid) + Dim oNodeIndex = TreeListDevexpress.MakeNodeVisible(oNode) + TreeListDevexpress.SetFocusedNode(oNode) + If oIsExpanded Then + oNode.Expand() + End If + End If + Else + MsgBox("Fehler beim Anlegen des neuen Knotens!", MsgBoxStyle.Critical, Text) End If + + End Sub + + Private Sub DokumentartÄndernToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DokumentartÄndernToolStripMenuItem.Click + + Try + Dim oSelectedDocs = ClassWindreamDocGrid.GetSelectedDocuments(GridViewDoc_Search) + + If oSelectedDocs.Count = 0 Then + Exit Sub + End If + + Dim oTable = MYDB_ECM.GetDatatable($"SELECT DOKUMENTTYPE_ID AS ID, DOKUMENTTYPE AS NAME FROM VWPMO_DOKUMENTTYPES WHERE FORM_ID = {CURRENT_ENTITY_ID}") + Dim oDocTypes = oTable.Rows.Cast(Of DataRow).Select(AddressOf ToDocType).ToList() + Dim oFileNames = oSelectedDocs.Select(Function(d) d.DisplayName).ToList() + + Dim oForm As New frmChangeDocType With {.DocTypes = oDocTypes, .FileNames = oFileNames} + + If oForm.ShowDialog() = DialogResult.OK Then + + End If + Catch ex As Exception + LOGGER.Error(ex) + End Try + End Sub + + Private Function ToDocType(pRow As DataRow) As frmChangeDocType.DocType + Return New frmChangeDocType.DocType() With { + .Id = pRow.ItemEx("ID", 0), + .Name = pRow.ItemEx("NAME", "") + } + End Function + End Class \ No newline at end of file