Change Doc Type
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user