Compare commits
4 Commits
b278f26acb
...
54c96b0b1f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
54c96b0b1f | ||
|
|
20375e3134 | ||
|
|
36b86ed9d1 | ||
|
|
5d296873be |
9
GUIs.Monitor/Constants.vb
Normal file
9
GUIs.Monitor/Constants.vb
Normal file
@@ -0,0 +1,9 @@
|
||||
Public Class Constants
|
||||
Public Const STATE_SUCCESS As String = "SUCCESS"
|
||||
Public Const STATE_FAILURE As String = "FAILURE"
|
||||
Public Const STATE_WARNING As String = "WARNING"
|
||||
Public Const STATE_WAITING As String = "WAITING"
|
||||
Public Const STATE_HIGHLIGHT As String = "HIGHLIGHT"
|
||||
Public Const STATE_DEFAULT As String = "DEFAULT"
|
||||
Public Const STATE_USER As String = "USER"
|
||||
End Class
|
||||
16
GUIs.Monitor/Resources/actions_refresh.svg
Normal file
16
GUIs.Monitor/Resources/actions_refresh.svg
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<svg x="0px" y="0px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" id="Layer_1" style="enable-background:new 0 0 32 32">
|
||||
<style type="text/css">
|
||||
.Blue{fill:#1177D7;}
|
||||
.Yellow{fill:#FFB115;}
|
||||
.Black{fill:#727272;}
|
||||
.Green{fill:#039C23;}
|
||||
.Red{fill:#D11C1C;}
|
||||
.st0{opacity:0.75;}
|
||||
.st1{opacity:0.5;}
|
||||
</style>
|
||||
<g id="Refresh_1_">
|
||||
<path d="M24.5,7.5C22.3,5.3,19.3,4,16,4C10.1,4,5.1,8.3,4.2,14h4.1c0.9-3.4,4-6,7.7-6c2.2,0,4.2,0.9,5.6,2.4L18,14 h5.7h4.1H28V4L24.5,7.5z" class="Green" />
|
||||
<path d="M16.2,24c-2.2,0-4.2-0.9-5.6-2.4l3.6-3.6H8.4H4.4H4.2v10l3.5-3.5c2.2,2.2,5.2,3.5,8.5,3.5 C22.1,28,27,23.7,28,18h-4.1C23,21.4,19.9,24,16.2,24z" class="Green" />
|
||||
</g>
|
||||
</svg>
|
||||
17
GUIs.Monitor/Resources/inserttreeview.svg
Normal file
17
GUIs.Monitor/Resources/inserttreeview.svg
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<svg x="0px" y="0px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" id="Layer_1" style="enable-background:new 0 0 32 32">
|
||||
<style type="text/css">
|
||||
.Green{fill:#039C23;}
|
||||
.Black{fill:#727272;}
|
||||
.Red{fill:#D11C1C;}
|
||||
.Yellow{fill:#FFB115;}
|
||||
.Blue{fill:#1177D7;}
|
||||
.White{fill:#FFFFFF;}
|
||||
.st0{opacity:0.5;}
|
||||
.st1{opacity:0.75;}
|
||||
</style>
|
||||
<g id="InsertTreeView">
|
||||
<path d="M13,8H5C4.4,8,4,7.6,4,7V3c0-0.5,0.4-1,1-1h8c0.6,0,1,0.5,1,1v4C14,7.6,13.6,8,13,8z M26,17v-4 c0-0.6-0.5-1-1-1h-8c-0.5,0-1,0.4-1,1v4c0,0.5,0.5,1,1,1h8C25.5,18,26,17.5,26,17z M26,27v-4c0-0.5-0.5-1-1-1h-8c-0.5,0-1,0.5-1,1 v4c0,0.5,0.5,1,1,1h8C25.5,28,26,27.5,26,27z" class="Yellow" />
|
||||
<polygon points="14,16 14,14 10,14 10,10 8,10 8,26 14,26 14,24 10,24 10,16 " class="Black" />
|
||||
</g>
|
||||
</svg>
|
||||
237
GUIs.Monitor/TreeListManager.vb
Normal file
237
GUIs.Monitor/TreeListManager.vb
Normal file
@@ -0,0 +1,237 @@
|
||||
Imports DevExpress.Utils
|
||||
Imports DevExpress.XtraEditors.Controls
|
||||
Imports DevExpress.XtraEditors.Repository
|
||||
Imports DevExpress.XtraTreeList
|
||||
Imports DevExpress.XtraTreeList.Columns
|
||||
Imports DevExpress.XtraTreeList.Nodes
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Language.Utils
|
||||
|
||||
Public Class TreeListManager
|
||||
Private ReadOnly SvgImages As SvgImageCollection
|
||||
Private ReadOnly LogConfig As LogConfig
|
||||
Private ReadOnly Property Database As MSSQLServer
|
||||
Private ReadOnly Logger As Logger
|
||||
|
||||
Private ReadOnly DisplayColumns As New List(Of String) From {"COLUMN1", "COLUMN2", "COLUMN3", "ADDED_WHEN", "STATE", "ICON"}
|
||||
Private ReadOnly SQLColumns As New List(Of String) From {"SELECT1", "SELECT2", "SELECT3", "SELECT4"}
|
||||
Private ReadOnly DocViewColumns As New List(Of String) From {"DOCVIEW1", "DOCVIEW2"}
|
||||
Private ReadOnly HtmlViewColumns As New List(Of String) From {"HTML1", "HTML2"}
|
||||
Private ReadOnly DataColumns As List(Of String) = SQLColumns.
|
||||
Concat(DocViewColumns).
|
||||
Concat(HtmlViewColumns).
|
||||
ToList
|
||||
|
||||
'Private ReadOnly Items As New List(Of Tuple(Of TreeList, TreeListProperties))
|
||||
Private ReadOnly Items As New Dictionary(Of TreeList, TreeListProperties)
|
||||
|
||||
Public ReadOnly Property TreeLists As List(Of TreeList)
|
||||
Get
|
||||
Return Items.Keys.ToList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property CurrentTreeListProps As TreeListProperties
|
||||
Get
|
||||
If CurrentTreeList IsNot Nothing Then
|
||||
Return Items.Item(CurrentTreeList)
|
||||
Else
|
||||
Return Nothing
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property CurrentTreeList As TreeList
|
||||
|
||||
Public Event TreeList_FocusedNodeChanged As EventHandler(Of FocusedNodeChangedEventArgs)
|
||||
Public Event TreeList_CustomDrawNodeCell As EventHandler(Of CustomDrawNodeCellEventArgs)
|
||||
|
||||
Public Class TreeListProperties
|
||||
Public SearchValue As String
|
||||
Public ViewName As String
|
||||
Public CreatedAt As Date
|
||||
End Class
|
||||
|
||||
Private Enum NodeImage
|
||||
[Default] = 0
|
||||
SQL = 1
|
||||
File = 2
|
||||
Mail = 3
|
||||
Success = 4
|
||||
Failure = 5
|
||||
Warning = 6
|
||||
Waiting = 7
|
||||
User = 8
|
||||
Highlight = 9
|
||||
End Enum
|
||||
|
||||
Public Sub New(LogConfig As LogConfig, Database As MSSQLServer, SvgImageCollection As SvgImageCollection)
|
||||
Me.LogConfig = LogConfig
|
||||
Me.Database = Database
|
||||
Logger = LogConfig.GetLogger()
|
||||
SvgImages = SvgImageCollection
|
||||
End Sub
|
||||
|
||||
Public Sub Add(TreeList As TreeList)
|
||||
Items.Add(TreeList, New TreeListProperties() With {.CreatedAt = Now})
|
||||
End Sub
|
||||
|
||||
Public Sub AddRange(ParamArray TreeLists As TreeList())
|
||||
For Each oTreeList In TreeLists
|
||||
Add(oTreeList)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Function GetNextTreeList() As TreeList
|
||||
' Return next free Treelist
|
||||
For Each oTreeList In TreeLists
|
||||
If oTreeList.DataSource Is Nothing Then
|
||||
Return oTreeList
|
||||
End If
|
||||
Next
|
||||
|
||||
' Otherwise return oldest TreeList
|
||||
Return Items.
|
||||
OrderBy(Function(i) i.Value.CreatedAt).
|
||||
Select(Of TreeList)(Function(i) i.Key).
|
||||
First()
|
||||
End Function
|
||||
|
||||
Public Sub LoadDataFor(TreeList As TreeList, DataSource As DataTable, ViewName As String, Value As String)
|
||||
Try
|
||||
AddHandler TreeList.FocusedNodeChanged, Sub(sender As Object, e As FocusedNodeChangedEventArgs)
|
||||
RaiseEvent TreeList_FocusedNodeChanged(sender, e)
|
||||
End Sub
|
||||
|
||||
AddHandler TreeList.CustomDrawNodeCell, Sub(sender As Object, e As CustomDrawNodeCellEventArgs)
|
||||
RaiseEvent TreeList_CustomDrawNodeCell(sender, e)
|
||||
End Sub
|
||||
|
||||
' Load data
|
||||
TreeList.DataSource = DataSource
|
||||
TreeList.PopulateColumns()
|
||||
|
||||
' Show all columns in DisplayColumns List
|
||||
For Each oColumn In TreeList.Columns
|
||||
oColumn.Visible = DisplayColumns.Contains(oColumn.FieldName)
|
||||
If oColumn.FieldName = "ADDED_WHEN" Then
|
||||
oColumn.Format.FormatType = FormatType.DateTime
|
||||
oColumn.Format.FormatString = "dd.MM.yyyy HH:MM:ss"
|
||||
End If
|
||||
Next
|
||||
|
||||
' Initialize TreeList visuals
|
||||
Init(TreeList)
|
||||
|
||||
' Expand all nodes that contain state WARNING or FAILURE
|
||||
Dim oStateColumn As TreeListColumn = TreeList.Columns.Item("STATE")
|
||||
For Each oNode As TreeListNode In TreeList.Nodes
|
||||
ExpandNodes(oNode, Function(n)
|
||||
Dim oObjectValue = n.GetValue(oStateColumn)
|
||||
Dim oValue As String = NotNull(oObjectValue, String.Empty)
|
||||
Return oValue IsNot Nothing AndAlso (oValue = Constants.STATE_WARNING Or oValue = Constants.STATE_FAILURE)
|
||||
End Function)
|
||||
Next
|
||||
|
||||
' Set currently loaded TreeList as current
|
||||
CurrentTreeList = TreeList
|
||||
|
||||
' Update Timestamp and Searchdata for current TreeList
|
||||
Dim oItem = Items.Item(TreeList)
|
||||
oItem.CreatedAt = Now
|
||||
oItem.SearchValue = Value
|
||||
oItem.ViewName = ViewName
|
||||
Items.Item(TreeList) = oItem
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub ExpandNodes(RootNode As TreeListNode, Condition As Predicate(Of TreeListNode))
|
||||
If Condition(RootNode) = True Then
|
||||
RootNode.Expand()
|
||||
ExpandParentNode(RootNode)
|
||||
End If
|
||||
|
||||
For Each oNode As TreeListNode In RootNode.Nodes
|
||||
ExpandNodes(oNode, Condition)
|
||||
|
||||
If Condition(oNode) = True Then
|
||||
oNode.Expand()
|
||||
ExpandParentNode(oNode)
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub ExpandParentNode(ChildNode As TreeListNode)
|
||||
If ChildNode.ParentNode IsNot Nothing Then
|
||||
ChildNode.ParentNode.Expand()
|
||||
ExpandParentNode(ChildNode.ParentNode)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Init(TreeList As TreeList)
|
||||
If TreeList.Columns.Count = 0 Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
TreeList.KeyFieldName = "GUID"
|
||||
TreeList.ParentFieldName = "PARENT_ID"
|
||||
|
||||
Dim oStateEdit As New RepositoryItemImageComboBox With {
|
||||
.SmallImages = SvgImages,
|
||||
.GlyphAlignment = HorzAlignment.Near
|
||||
}
|
||||
oStateEdit.Buttons.Clear()
|
||||
oStateEdit.Items.AddRange(New List(Of ImageComboBoxItem) From {
|
||||
New ImageComboBoxItem("Success", Constants.STATE_SUCCESS, NodeImage.Success),
|
||||
New ImageComboBoxItem("Failure", Constants.STATE_FAILURE, NodeImage.Failure),
|
||||
New ImageComboBoxItem("Warning", Constants.STATE_WARNING, NodeImage.Warning),
|
||||
New ImageComboBoxItem("Waiting", Constants.STATE_WAITING, NodeImage.Waiting),
|
||||
New ImageComboBoxItem("Default", Constants.STATE_DEFAULT, NodeImage.Default),
|
||||
New ImageComboBoxItem("User", Constants.STATE_USER, NodeImage.User),
|
||||
New ImageComboBoxItem("Highlight", Constants.STATE_HIGHLIGHT, NodeImage.Highlight)
|
||||
})
|
||||
|
||||
Dim oIconEdit As New RepositoryItemImageComboBox With {
|
||||
.SmallImages = SvgImages,
|
||||
.GlyphAlignment = HorzAlignment.Near
|
||||
}
|
||||
oIconEdit.Buttons.Clear()
|
||||
oIconEdit.Items.AddRange(New List(Of ImageComboBoxItem) From {
|
||||
New ImageComboBoxItem("Email", "MAIL", NodeImage.Mail),
|
||||
New ImageComboBoxItem("SQL", "SQL", NodeImage.SQL),
|
||||
New ImageComboBoxItem("File", "FILE", NodeImage.File)
|
||||
})
|
||||
|
||||
Dim oColumn1 = TreeList.Columns.Item("COLUMN1")
|
||||
Dim oStateColumn = TreeList.Columns.Item("STATE")
|
||||
Dim oIconColumn = TreeList.Columns.Item("ICON")
|
||||
|
||||
|
||||
oStateColumn.VisibleIndex = 1
|
||||
oIconColumn.VisibleIndex = 2
|
||||
|
||||
With oColumn1
|
||||
.VisibleIndex = 0
|
||||
.MinWidth = 150
|
||||
End With
|
||||
|
||||
With oStateColumn
|
||||
.ColumnEdit = oStateEdit
|
||||
.MaxWidth = 25
|
||||
.MinWidth = 25
|
||||
.Caption = " "
|
||||
End With
|
||||
|
||||
With oIconColumn
|
||||
.ColumnEdit = oIconEdit
|
||||
.MaxWidth = 25
|
||||
.MinWidth = 25
|
||||
.Caption = " "
|
||||
End With
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
268
GUIs.Monitor/frmDocumentManager.Designer.vb
generated
Normal file
268
GUIs.Monitor/frmDocumentManager.Designer.vb
generated
Normal file
@@ -0,0 +1,268 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class frmDocumentManager
|
||||
Inherits DevExpress.XtraBars.Ribbon.RibbonForm
|
||||
|
||||
'Form overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
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.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim DockingContainer1 As DevExpress.XtraBars.Docking2010.Views.Tabbed.DockingContainer = New DevExpress.XtraBars.Docking2010.Views.Tabbed.DockingContainer()
|
||||
Me.DocumentManager1 = New DevExpress.XtraBars.Docking2010.DocumentManager(Me.components)
|
||||
Me.TabbedView1 = New DevExpress.XtraBars.Docking2010.Views.Tabbed.TabbedView(Me.components)
|
||||
Me.RibbonControl1 = New DevExpress.XtraBars.Ribbon.RibbonControl()
|
||||
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
|
||||
Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||
Me.RibbonPageGroup2 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||
Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
|
||||
Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage()
|
||||
Me.DockManager1 = New DevExpress.XtraBars.Docking.DockManager(Me.components)
|
||||
Me.PanelDashboard = New DevExpress.XtraBars.Docking.DockPanel()
|
||||
Me.DockPanel1_Container = New DevExpress.XtraBars.Docking.ControlContainer()
|
||||
Me.Document1 = New DevExpress.XtraBars.Docking2010.Views.Tabbed.Document(Me.components)
|
||||
Me.DocumentGroup1 = New DevExpress.XtraBars.Docking2010.Views.Tabbed.DocumentGroup(Me.components)
|
||||
Me.PanelSearch = New DevExpress.XtraBars.Docking.DockPanel()
|
||||
Me.DockPanel2_Container = New DevExpress.XtraBars.Docking.ControlContainer()
|
||||
Me.PanelDocView = New DevExpress.XtraBars.Docking.DockPanel()
|
||||
Me.DockPanel3_Container = New DevExpress.XtraBars.Docking.ControlContainer()
|
||||
Me.PanelSQL = New DevExpress.XtraBars.Docking.DockPanel()
|
||||
Me.DockPanel4_Container = New DevExpress.XtraBars.Docking.ControlContainer()
|
||||
Me.hideContainerRight = New DevExpress.XtraBars.Docking.AutoHideContainer()
|
||||
CType(Me.DocumentManager1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.TabbedView1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.DockManager1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.PanelDashboard.SuspendLayout()
|
||||
CType(Me.Document1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.DocumentGroup1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.PanelSearch.SuspendLayout()
|
||||
Me.PanelDocView.SuspendLayout()
|
||||
Me.PanelSQL.SuspendLayout()
|
||||
Me.hideContainerRight.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'DocumentManager1
|
||||
'
|
||||
Me.DocumentManager1.ContainerControl = Me
|
||||
Me.DocumentManager1.View = Me.TabbedView1
|
||||
Me.DocumentManager1.ViewCollection.AddRange(New DevExpress.XtraBars.Docking2010.Views.BaseView() {Me.TabbedView1})
|
||||
'
|
||||
'TabbedView1
|
||||
'
|
||||
Me.TabbedView1.DocumentGroups.AddRange(New DevExpress.XtraBars.Docking2010.Views.Tabbed.DocumentGroup() {Me.DocumentGroup1})
|
||||
Me.TabbedView1.Documents.AddRange(New DevExpress.XtraBars.Docking2010.Views.BaseDocument() {Me.Document1})
|
||||
DockingContainer1.Element = Me.DocumentGroup1
|
||||
Me.TabbedView1.RootContainer.Nodes.AddRange(New DevExpress.XtraBars.Docking2010.Views.Tabbed.DockingContainer() {DockingContainer1})
|
||||
Me.TabbedView1.Style = DevExpress.XtraBars.Docking2010.Views.DockingViewStyle.Light
|
||||
'
|
||||
'RibbonControl1
|
||||
'
|
||||
Me.RibbonControl1.ExpandCollapseItem.Id = 0
|
||||
Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem})
|
||||
Me.RibbonControl1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.RibbonControl1.MaxItemId = 1
|
||||
Me.RibbonControl1.Name = "RibbonControl1"
|
||||
Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1})
|
||||
Me.RibbonControl1.Size = New System.Drawing.Size(1134, 159)
|
||||
Me.RibbonControl1.StatusBar = Me.RibbonStatusBar1
|
||||
'
|
||||
'RibbonPage1
|
||||
'
|
||||
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1, Me.RibbonPageGroup2})
|
||||
Me.RibbonPage1.Name = "RibbonPage1"
|
||||
Me.RibbonPage1.Text = "RibbonPage1"
|
||||
'
|
||||
'RibbonPageGroup1
|
||||
'
|
||||
Me.RibbonPageGroup1.Name = "RibbonPageGroup1"
|
||||
Me.RibbonPageGroup1.Text = "RibbonPageGroup1"
|
||||
'
|
||||
'RibbonPageGroup2
|
||||
'
|
||||
Me.RibbonPageGroup2.Name = "RibbonPageGroup2"
|
||||
Me.RibbonPageGroup2.Text = "RibbonPageGroup2"
|
||||
'
|
||||
'RibbonStatusBar1
|
||||
'
|
||||
Me.RibbonStatusBar1.Location = New System.Drawing.Point(0, 665)
|
||||
Me.RibbonStatusBar1.Name = "RibbonStatusBar1"
|
||||
Me.RibbonStatusBar1.Ribbon = Me.RibbonControl1
|
||||
Me.RibbonStatusBar1.Size = New System.Drawing.Size(1134, 22)
|
||||
'
|
||||
'RibbonPage2
|
||||
'
|
||||
Me.RibbonPage2.Name = "RibbonPage2"
|
||||
Me.RibbonPage2.Text = "RibbonPage2"
|
||||
'
|
||||
'DockManager1
|
||||
'
|
||||
Me.DockManager1.AutoHideContainers.AddRange(New DevExpress.XtraBars.Docking.AutoHideContainer() {Me.hideContainerRight})
|
||||
Me.DockManager1.Form = Me
|
||||
Me.DockManager1.RootPanels.AddRange(New DevExpress.XtraBars.Docking.DockPanel() {Me.PanelDashboard, Me.PanelSearch, Me.PanelSQL})
|
||||
Me.DockManager1.Style = DevExpress.XtraBars.Docking2010.Views.DockingViewStyle.Light
|
||||
Me.DockManager1.TopZIndexControls.AddRange(New String() {"DevExpress.XtraBars.BarDockControl", "DevExpress.XtraBars.StandaloneBarDockControl", "System.Windows.Forms.StatusBar", "System.Windows.Forms.MenuStrip", "System.Windows.Forms.StatusStrip", "DevExpress.XtraBars.Ribbon.RibbonStatusBar", "DevExpress.XtraBars.Ribbon.RibbonControl", "DevExpress.XtraBars.Navigation.OfficeNavigationBar", "DevExpress.XtraBars.Navigation.TileNavPane", "DevExpress.XtraBars.TabFormControl", "DevExpress.XtraBars.FluentDesignSystem.FluentDesignFormControl", "DevExpress.XtraBars.ToolbarForm.ToolbarFormControl"})
|
||||
'
|
||||
'PanelDashboard
|
||||
'
|
||||
Me.PanelDashboard.Controls.Add(Me.DockPanel1_Container)
|
||||
Me.PanelDashboard.DockedAsTabbedDocument = True
|
||||
Me.PanelDashboard.ID = New System.Guid("7a841a4a-faca-4797-87c6-8be6fc59b50d")
|
||||
Me.PanelDashboard.Name = "PanelDashboard"
|
||||
Me.PanelDashboard.Options.ShowCloseButton = False
|
||||
Me.PanelDashboard.OriginalSize = New System.Drawing.Size(200, 200)
|
||||
Me.PanelDashboard.Text = "DockPanel1"
|
||||
'
|
||||
'DockPanel1_Container
|
||||
'
|
||||
Me.DockPanel1_Container.Location = New System.Drawing.Point(0, 0)
|
||||
Me.DockPanel1_Container.Name = "DockPanel1_Container"
|
||||
Me.DockPanel1_Container.Size = New System.Drawing.Size(903, 257)
|
||||
Me.DockPanel1_Container.TabIndex = 0
|
||||
'
|
||||
'Document1
|
||||
'
|
||||
Me.Document1.Caption = "DockPanel1"
|
||||
Me.Document1.ControlName = "PanelDashboard"
|
||||
Me.Document1.FloatLocation = New System.Drawing.Point(0, 0)
|
||||
Me.Document1.FloatSize = New System.Drawing.Size(200, 200)
|
||||
Me.Document1.Properties.AllowClose = DevExpress.Utils.DefaultBoolean.[False]
|
||||
Me.Document1.Properties.AllowFloat = DevExpress.Utils.DefaultBoolean.[True]
|
||||
Me.Document1.Properties.AllowFloatOnDoubleClick = DevExpress.Utils.DefaultBoolean.[True]
|
||||
'
|
||||
'DocumentGroup1
|
||||
'
|
||||
Me.DocumentGroup1.Items.AddRange(New DevExpress.XtraBars.Docking2010.Views.Tabbed.Document() {Me.Document1})
|
||||
'
|
||||
'PanelSearch
|
||||
'
|
||||
Me.PanelSearch.Controls.Add(Me.DockPanel2_Container)
|
||||
Me.PanelSearch.Dock = DevExpress.XtraBars.Docking.DockingStyle.Left
|
||||
Me.PanelSearch.ID = New System.Guid("6c1851ca-e156-402e-90f8-a83e25b0ee52")
|
||||
Me.PanelSearch.Location = New System.Drawing.Point(0, 159)
|
||||
Me.PanelSearch.Name = "PanelSearch"
|
||||
Me.PanelSearch.Options.ShowCloseButton = False
|
||||
Me.PanelSearch.OriginalSize = New System.Drawing.Size(200, 200)
|
||||
Me.PanelSearch.Size = New System.Drawing.Size(200, 506)
|
||||
Me.PanelSearch.Text = "Suche"
|
||||
'
|
||||
'DockPanel2_Container
|
||||
'
|
||||
Me.DockPanel2_Container.Location = New System.Drawing.Point(0, 43)
|
||||
Me.DockPanel2_Container.Name = "DockPanel2_Container"
|
||||
Me.DockPanel2_Container.Size = New System.Drawing.Size(199, 463)
|
||||
Me.DockPanel2_Container.TabIndex = 0
|
||||
'
|
||||
'PanelDocView
|
||||
'
|
||||
Me.PanelDocView.Controls.Add(Me.DockPanel3_Container)
|
||||
Me.PanelDocView.Dock = DevExpress.XtraBars.Docking.DockingStyle.Right
|
||||
Me.PanelDocView.ID = New System.Guid("a668ae35-02f7-4338-aeee-25839395e8cc")
|
||||
Me.PanelDocView.Location = New System.Drawing.Point(0, 0)
|
||||
Me.PanelDocView.Name = "PanelDocView"
|
||||
Me.PanelDocView.Options.ShowCloseButton = False
|
||||
Me.PanelDocView.OriginalSize = New System.Drawing.Size(200, 200)
|
||||
Me.PanelDocView.SavedDock = DevExpress.XtraBars.Docking.DockingStyle.Right
|
||||
Me.PanelDocView.SavedIndex = 2
|
||||
Me.PanelDocView.Size = New System.Drawing.Size(200, 506)
|
||||
Me.PanelDocView.Text = "Document Viewer"
|
||||
Me.PanelDocView.Visibility = DevExpress.XtraBars.Docking.DockVisibility.AutoHide
|
||||
'
|
||||
'DockPanel3_Container
|
||||
'
|
||||
Me.DockPanel3_Container.Location = New System.Drawing.Point(1, 43)
|
||||
Me.DockPanel3_Container.Name = "DockPanel3_Container"
|
||||
Me.DockPanel3_Container.Size = New System.Drawing.Size(199, 463)
|
||||
Me.DockPanel3_Container.TabIndex = 0
|
||||
'
|
||||
'PanelSQL
|
||||
'
|
||||
Me.PanelSQL.Controls.Add(Me.DockPanel4_Container)
|
||||
Me.PanelSQL.Dock = DevExpress.XtraBars.Docking.DockingStyle.Bottom
|
||||
Me.PanelSQL.ID = New System.Guid("0f65098f-8b5a-4efd-9b19-ba4effecffec")
|
||||
Me.PanelSQL.Location = New System.Drawing.Point(200, 445)
|
||||
Me.PanelSQL.Name = "PanelSQL"
|
||||
Me.PanelSQL.Options.ShowCloseButton = False
|
||||
Me.PanelSQL.OriginalSize = New System.Drawing.Size(200, 220)
|
||||
Me.PanelSQL.Size = New System.Drawing.Size(903, 220)
|
||||
Me.PanelSQL.Text = "SQL"
|
||||
'
|
||||
'DockPanel4_Container
|
||||
'
|
||||
Me.DockPanel4_Container.Location = New System.Drawing.Point(0, 44)
|
||||
Me.DockPanel4_Container.Name = "DockPanel4_Container"
|
||||
Me.DockPanel4_Container.Size = New System.Drawing.Size(903, 176)
|
||||
Me.DockPanel4_Container.TabIndex = 0
|
||||
'
|
||||
'hideContainerRight
|
||||
'
|
||||
Me.hideContainerRight.BackColor = System.Drawing.Color.FromArgb(CType(CType(248, Byte), Integer), CType(CType(248, Byte), Integer), CType(CType(248, Byte), Integer))
|
||||
Me.hideContainerRight.Controls.Add(Me.PanelDocView)
|
||||
Me.hideContainerRight.Dock = System.Windows.Forms.DockStyle.Right
|
||||
Me.hideContainerRight.Location = New System.Drawing.Point(1103, 159)
|
||||
Me.hideContainerRight.Name = "hideContainerRight"
|
||||
Me.hideContainerRight.Size = New System.Drawing.Size(31, 506)
|
||||
'
|
||||
'frmDocumentManager
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(1134, 687)
|
||||
Me.Controls.Add(Me.PanelSQL)
|
||||
Me.Controls.Add(Me.PanelSearch)
|
||||
Me.Controls.Add(Me.hideContainerRight)
|
||||
Me.Controls.Add(Me.RibbonStatusBar1)
|
||||
Me.Controls.Add(Me.RibbonControl1)
|
||||
Me.Name = "frmDocumentManager"
|
||||
Me.Ribbon = Me.RibbonControl1
|
||||
Me.StatusBar = Me.RibbonStatusBar1
|
||||
Me.Text = "frmDocumentManager"
|
||||
CType(Me.DocumentManager1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.TabbedView1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.DockManager1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.PanelDashboard.ResumeLayout(False)
|
||||
CType(Me.Document1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.DocumentGroup1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.PanelSearch.ResumeLayout(False)
|
||||
Me.PanelDocView.ResumeLayout(False)
|
||||
Me.PanelSQL.ResumeLayout(False)
|
||||
Me.hideContainerRight.ResumeLayout(False)
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents DocumentManager1 As DevExpress.XtraBars.Docking2010.DocumentManager
|
||||
Friend WithEvents TabbedView1 As DevExpress.XtraBars.Docking2010.Views.Tabbed.TabbedView
|
||||
Friend WithEvents RibbonControl1 As DevExpress.XtraBars.Ribbon.RibbonControl
|
||||
Friend WithEvents RibbonPage1 As DevExpress.XtraBars.Ribbon.RibbonPage
|
||||
Friend WithEvents RibbonPageGroup1 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
|
||||
Friend WithEvents RibbonPageGroup2 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
|
||||
Friend WithEvents RibbonStatusBar1 As DevExpress.XtraBars.Ribbon.RibbonStatusBar
|
||||
Friend WithEvents RibbonPage2 As DevExpress.XtraBars.Ribbon.RibbonPage
|
||||
Friend WithEvents PanelSQL As DevExpress.XtraBars.Docking.DockPanel
|
||||
Friend WithEvents DockPanel4_Container As DevExpress.XtraBars.Docking.ControlContainer
|
||||
Friend WithEvents PanelDocView As DevExpress.XtraBars.Docking.DockPanel
|
||||
Friend WithEvents DockPanel3_Container As DevExpress.XtraBars.Docking.ControlContainer
|
||||
Friend WithEvents PanelSearch As DevExpress.XtraBars.Docking.DockPanel
|
||||
Friend WithEvents DockPanel2_Container As DevExpress.XtraBars.Docking.ControlContainer
|
||||
Friend WithEvents DocumentGroup1 As DevExpress.XtraBars.Docking2010.Views.Tabbed.DocumentGroup
|
||||
Friend WithEvents Document1 As DevExpress.XtraBars.Docking2010.Views.Tabbed.Document
|
||||
Friend WithEvents DockManager1 As DevExpress.XtraBars.Docking.DockManager
|
||||
Friend WithEvents PanelDashboard As DevExpress.XtraBars.Docking.DockPanel
|
||||
Friend WithEvents DockPanel1_Container As DevExpress.XtraBars.Docking.ControlContainer
|
||||
Friend WithEvents hideContainerRight As DevExpress.XtraBars.Docking.AutoHideContainer
|
||||
End Class
|
||||
126
GUIs.Monitor/frmDocumentManager.resx
Normal file
126
GUIs.Monitor/frmDocumentManager.resx
Normal file
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="DocumentManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="DockManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>181, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
3
GUIs.Monitor/frmDocumentManager.vb
Normal file
3
GUIs.Monitor/frmDocumentManager.vb
Normal file
@@ -0,0 +1,3 @@
|
||||
Public Class frmDocumentManager
|
||||
|
||||
End Class
|
||||
@@ -1194,6 +1194,8 @@ Public Class frmGlobix_Index
|
||||
NI_TITLE = "Error Globix-Import"
|
||||
NI_MESSAGE = "The import was not successful - Check LogFile"
|
||||
End If
|
||||
|
||||
MsgBox(NI_MESSAGE, MsgBoxStyle.Critical, NI_TITLE)
|
||||
End If
|
||||
|
||||
'False oder True zurückgeben
|
||||
|
||||
@@ -36,7 +36,7 @@ Public Class frmtest
|
||||
Using oMemoryStream As New MemoryStream
|
||||
oStream.CopyTo(oMemoryStream)
|
||||
Dim oContents As Byte() = oMemoryStream.ToArray()
|
||||
oResult = Await My.Application.Service.Client.ImportFileObjectAsync(oContents, My.Application.User.UserName, txtIDB_OBJ_ID.Text, 1, txtIDBFOPath.Text)
|
||||
oResult = Await My.Application.Service.Client.ImportFileObjectAsync(oContents, My.Application.User.UserName, txtIDB_OBJ_ID.Text, "WORK", txtIDBFOPath.Text)
|
||||
End Using
|
||||
End Using
|
||||
|
||||
@@ -103,26 +103,25 @@ Public Class frmtest
|
||||
|
||||
txtFile2Import.Text = OpenFileDialog1.FileName
|
||||
|
||||
Using oStream As New FileStream(txtFile2Import.Text, FileMode.Open, FileAccess.Read)
|
||||
Using oMemoryStream As New MemoryStream
|
||||
oStream.CopyTo(oMemoryStream)
|
||||
Dim oContents As Byte() = oMemoryStream.ToArray()
|
||||
|
||||
oResult = Await My.Application.Service.Client.ImportFileAsync(
|
||||
txtFile2Import.Text,
|
||||
Environment.UserName,
|
||||
Date.Now,
|
||||
"WORK",
|
||||
1,
|
||||
"DEFAULT",
|
||||
New Client.ImportFileOptions With {
|
||||
.KeepExtension = True
|
||||
}
|
||||
)
|
||||
|
||||
MsgBox($"File saved to: [{oResult}]")
|
||||
'oResult = Await My.Application.Service.Client.ImportFileObjectAsync(oContents, My.Application.User.UserName, txtIDB_OBJ_ID.Text, 1, txtIDBFOPath.Text)
|
||||
End Using
|
||||
End Using
|
||||
oResult = Await My.Application.Service.Client.NewFileAsync(
|
||||
txtFile2Import.Text,
|
||||
Environment.UserName,
|
||||
Date.Now,
|
||||
"WORK",
|
||||
"DEFAULT",
|
||||
New Client.ImportFileOptions With {
|
||||
.KeepExtension = True
|
||||
}
|
||||
)
|
||||
|
||||
MsgBox($"File saved to: [{oResult}]")
|
||||
'oResult = Await My.Application.Service.Client.ImportFileObjectAsync(oContents, My.Application.User.UserName, txtIDB_OBJ_ID.Text, 1, txtIDBFOPath.Text)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub frmtest_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
@@ -78,20 +78,38 @@ Public Class Client
|
||||
End Try
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Import options for NewFileAsync
|
||||
''' </summary>
|
||||
Public Class ImportFileOptions
|
||||
Public KeepExtension As Boolean
|
||||
End Class
|
||||
|
||||
''' <summary>
|
||||
''' Imports a file by filename
|
||||
''' TODO: Platzhalter
|
||||
''' </summary>
|
||||
''' <returns>A document object</returns>
|
||||
Public Async Function ImportFileAsync(pFilePath As String, pWho As String, pWhen As Date, pObjectStoreType As String, pObjectStoreId As Long, pBusinessEntity As String, ImportOptions As ImportFileOptions) As Task(Of String)
|
||||
'pObjectId As Long, pStoreType As String, pDate As String, pExtension As String, pKeepExtension As String
|
||||
Dim oKindType = "DOC"
|
||||
''' <returns></returns>
|
||||
Public Async Function NewObjectAsync() As Task
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Imports a file from a filepath, creating a IDB ObjectId and Filesystem Object
|
||||
''' </summary>
|
||||
''' <param name="pFilePath">Local filepath to a file.</param>
|
||||
''' <param name="pWho">Windows username of the user responsible for the import.</param>
|
||||
''' <param name="pWhen">Date when the file was imported. Can be in the past.</param>
|
||||
''' <param name="pObjectStoreType">Type of ObjectStore. Can be WORK or ARCHIVE.</param>
|
||||
''' <param name="pBusinessEntity">Business entity that the new file object should belong to.</param>
|
||||
''' <param name="ImportOptions">Other file import options</param>
|
||||
''' <returns>The ObjectId of the newly generated filesystem object</returns>
|
||||
''' <exception cref="FileNotFoundException">When local filepath was not found</exception>
|
||||
''' <exception cref="ApplicationException">When there was a error in the Service</exception>
|
||||
Public Async Function NewFileAsync(pFilePath As String, pWho As String, pWhen As Date, pObjectStoreType As String, pBusinessEntity As String, ImportOptions As ImportFileOptions) As Task(Of Long)
|
||||
Const oKindType = "DOC"
|
||||
|
||||
Try
|
||||
If File.Exists(pFilePath) = False Then
|
||||
Throw New ApplicationException("ImportFileAsync: Path does not exist")
|
||||
Throw New FileNotFoundException("ImportFileAsync: Path does not exist")
|
||||
End If
|
||||
|
||||
Dim oFileInfo As New FileInfo(pFilePath)
|
||||
@@ -125,10 +143,10 @@ Public Class Client
|
||||
Dim oContents = oMemoryStream.ToArray()
|
||||
|
||||
Dim oFileImportResponse = Await _channel.ImportFileIntoFileObjectAsync(New ImportFileIntoFileObjectRequest With {
|
||||
.pIDBFilePath = oFilePathResponse.FileObjectPath,
|
||||
.pIDB_OBJ_ID = oObjectIdResponse.ObjectId,
|
||||
.pObjectStoreID = pObjectStoreId,
|
||||
.pWho = pWho,
|
||||
.FilePath = oFilePathResponse.FileObjectPath,
|
||||
.ObjectId = oObjectIdResponse.ObjectId,
|
||||
.ObjectStoreType = pObjectStoreType,
|
||||
.Who = pWho,
|
||||
.Contents = oContents
|
||||
})
|
||||
|
||||
@@ -138,39 +156,12 @@ Public Class Client
|
||||
End Using
|
||||
End Using
|
||||
|
||||
Return oFilePathResponse.FileObjectPath
|
||||
Return oObjectIdResponse.ObjectId
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
'Public Async Function ImportFileAsync(FilePath As String, DocumentType As String, ObjectStoreId As Long, Optional RetentionDays As Integer = 0) As Task(Of Long)
|
||||
' Try
|
||||
' Dim oFileInfo As New FileInfo(FilePath)
|
||||
' If oFileInfo.Exists = False Then
|
||||
' Throw New FileNotFoundException("Cannot import non-existing file.", FilePath)
|
||||
' End If
|
||||
|
||||
' Using oStream As New FileStream(FilePath, FileMode.Open)
|
||||
' Dim oContents(oStream.Length) As Byte
|
||||
' Dim oBytesRead = Await oStream.ReadAsync(oContents, 0, oStream.Length)
|
||||
' Dim oData As New DocumentImportRequest() With {
|
||||
' .FileName = oFileInfo.Name,
|
||||
' .Contents = oContents,
|
||||
' .DocumentType = DocumentType,
|
||||
' .ObjectStoreId = ObjectStoreId,
|
||||
' .RetentionDays = RetentionDays
|
||||
' }
|
||||
|
||||
' Dim oResponse = Await _channel.ImportFileAsync(oData)
|
||||
|
||||
' Return oResponse.ObjectId
|
||||
' End Using
|
||||
' Catch ex As Exception
|
||||
' _logger.Error(ex)
|
||||
' Throw ex
|
||||
' End Try
|
||||
'End Function
|
||||
|
||||
Public Function CreateObjectId(pKindType As String, pWho As String, pBusinessEntity As String) As Long
|
||||
Try
|
||||
@@ -209,14 +200,14 @@ Public Class Client
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Async Function ImportFileObjectAsync(pContent As Byte(), pWho As String, pObjectId As Long, pObjectStoreID As Short, pFileObjectPath As String) As Task(Of Boolean)
|
||||
Public Async Function ImportFileObjectAsync(pContent As Byte(), pWho As String, pObjectId As Long, pObjectStoreType As String, pFileObjectPath As String) As Task(Of Boolean)
|
||||
Try
|
||||
Dim oData As New ImportFileIntoFileObjectRequest() With {
|
||||
.Contents = pContent,
|
||||
.pWho = pWho,
|
||||
.pIDBFilePath = pFileObjectPath,
|
||||
.pIDB_OBJ_ID = pObjectId,
|
||||
.pObjectStoreID = pObjectStoreID
|
||||
.Who = pWho,
|
||||
.FilePath = pFileObjectPath,
|
||||
.ObjectId = pObjectId,
|
||||
.ObjectStoreType = pObjectStoreType
|
||||
}
|
||||
|
||||
Dim oResponse = Await _channel.ImportFileIntoFileObjectAsync(oData)
|
||||
|
||||
@@ -264,10 +264,10 @@
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element minOccurs="0" name="Contents" nillable="true" type="xs:base64Binary" />
|
||||
<xs:element minOccurs="0" name="pIDBFilePath" nillable="true" type="xs:string" />
|
||||
<xs:element minOccurs="0" name="pIDB_OBJ_ID" type="xs:long" />
|
||||
<xs:element minOccurs="0" name="pObjectStoreID" type="xs:int" />
|
||||
<xs:element minOccurs="0" name="pWho" nillable="true" type="xs:string" />
|
||||
<xs:element minOccurs="0" name="FilePath" nillable="true" type="xs:string" />
|
||||
<xs:element minOccurs="0" name="ObjectId" type="xs:long" />
|
||||
<xs:element minOccurs="0" name="ObjectStoreType" nillable="true" type="xs:string" />
|
||||
<xs:element minOccurs="0" name="Who" nillable="true" type="xs:string" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
@@ -755,176 +755,176 @@ Namespace EDMIServiceReference
|
||||
|
||||
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=0)> _
|
||||
Public Contents() As Byte
|
||||
|
||||
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=1)> _
|
||||
Public pIDBFilePath As String
|
||||
|
||||
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=2)> _
|
||||
Public pIDB_OBJ_ID As Long
|
||||
|
||||
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=3)> _
|
||||
Public pObjectStoreID As Integer
|
||||
|
||||
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=4)> _
|
||||
Public pWho As String
|
||||
|
||||
|
||||
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=1)>
|
||||
Public FilePath As String
|
||||
|
||||
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=2)>
|
||||
Public ObjectId As Long
|
||||
|
||||
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=3)>
|
||||
Public ObjectStoreType As String
|
||||
|
||||
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=4)>
|
||||
Public Who As String
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New
|
||||
End Sub
|
||||
|
||||
Public Sub New(ByVal Contents() As Byte, ByVal pIDBFilePath As String, ByVal pIDB_OBJ_ID As Long, ByVal pObjectStoreID As Integer, ByVal pWho As String)
|
||||
|
||||
Public Sub New(ByVal Contents() As Byte, ByVal FilePath As String, ByVal ObjectId As Long, ByVal ObjectStoreType As String, ByVal Who As String)
|
||||
MyBase.New
|
||||
Me.Contents = Contents
|
||||
Me.pIDBFilePath = pIDBFilePath
|
||||
Me.pIDB_OBJ_ID = pIDB_OBJ_ID
|
||||
Me.pObjectStoreID = pObjectStoreID
|
||||
Me.pWho = pWho
|
||||
Me.FilePath = FilePath
|
||||
Me.ObjectId = ObjectId
|
||||
Me.ObjectStoreType = ObjectStoreType
|
||||
Me.Who = Who
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
<System.Diagnostics.DebuggerStepThroughAttribute(), _
|
||||
System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0"), _
|
||||
System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced), _
|
||||
System.ServiceModel.MessageContractAttribute(WrapperName:="ImportFileIntoFileObjectResponse", WrapperNamespace:="http://DigitalData.Services.EDMIService", IsWrapped:=true)> _
|
||||
|
||||
<System.Diagnostics.DebuggerStepThroughAttribute(),
|
||||
System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0"),
|
||||
System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced),
|
||||
System.ServiceModel.MessageContractAttribute(WrapperName:="ImportFileIntoFileObjectResponse", WrapperNamespace:="http://DigitalData.Services.EDMIService", IsWrapped:=True)>
|
||||
Partial Public Class ImportFileIntoFileObjectResponse
|
||||
|
||||
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=0)> _
|
||||
|
||||
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=0)>
|
||||
Public Result As Boolean
|
||||
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub New(ByVal Result As Boolean)
|
||||
MyBase.New
|
||||
Me.Result = Result
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")> _
|
||||
|
||||
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")>
|
||||
Public Interface IEDMIServiceChannel
|
||||
Inherits EDMIServiceReference.IEDMIService, System.ServiceModel.IClientChannel
|
||||
End Interface
|
||||
|
||||
<System.Diagnostics.DebuggerStepThroughAttribute(), _
|
||||
System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")> _
|
||||
|
||||
<System.Diagnostics.DebuggerStepThroughAttribute(),
|
||||
System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")>
|
||||
Partial Public Class EDMIServiceClient
|
||||
Inherits System.ServiceModel.ClientBase(Of EDMIServiceReference.IEDMIService)
|
||||
Implements EDMIServiceReference.IEDMIService
|
||||
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub New(ByVal endpointConfigurationName As String)
|
||||
MyBase.New(endpointConfigurationName)
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub New(ByVal endpointConfigurationName As String, ByVal remoteAddress As String)
|
||||
MyBase.New(endpointConfigurationName, remoteAddress)
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub New(ByVal endpointConfigurationName As String, ByVal remoteAddress As System.ServiceModel.EndpointAddress)
|
||||
MyBase.New(endpointConfigurationName, remoteAddress)
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub New(ByVal binding As System.ServiceModel.Channels.Binding, ByVal remoteAddress As System.ServiceModel.EndpointAddress)
|
||||
MyBase.New(binding, remoteAddress)
|
||||
End Sub
|
||||
|
||||
|
||||
Public Function Heartbeat() As Boolean Implements EDMIServiceReference.IEDMIService.Heartbeat
|
||||
Return MyBase.Channel.Heartbeat
|
||||
End Function
|
||||
|
||||
|
||||
Public Function HeartbeatAsync() As System.Threading.Tasks.Task(Of Boolean) Implements EDMIServiceReference.IEDMIService.HeartbeatAsync
|
||||
Return MyBase.Channel.HeartbeatAsync
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ReturnDatatableFromCache(ByVal Name As String, ByVal FilterExpression As String, ByVal SortByColumn As String) As EDMIServiceReference.TableResult Implements EDMIServiceReference.IEDMIService.ReturnDatatableFromCache
|
||||
Return MyBase.Channel.ReturnDatatableFromCache(Name, FilterExpression, SortByColumn)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ReturnDatatableFromCacheAsync(ByVal Name As String, ByVal FilterExpression As String, ByVal SortByColumn As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.TableResult) Implements EDMIServiceReference.IEDMIService.ReturnDatatableFromCacheAsync
|
||||
Return MyBase.Channel.ReturnDatatableFromCacheAsync(Name, FilterExpression, SortByColumn)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ReturnDatatable_Firebird(ByVal SQL As String) As EDMIServiceReference.TableResult Implements EDMIServiceReference.IEDMIService.ReturnDatatable_Firebird
|
||||
Return MyBase.Channel.ReturnDatatable_Firebird(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ReturnDatatable_FirebirdAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.TableResult) Implements EDMIServiceReference.IEDMIService.ReturnDatatable_FirebirdAsync
|
||||
Return MyBase.Channel.ReturnDatatable_FirebirdAsync(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ReturnScalar_Firebird(ByVal SQL As String) As EDMIServiceReference.ScalarResult Implements EDMIServiceReference.IEDMIService.ReturnScalar_Firebird
|
||||
Return MyBase.Channel.ReturnScalar_Firebird(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ReturnScalar_FirebirdAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.ScalarResult) Implements EDMIServiceReference.IEDMIService.ReturnScalar_FirebirdAsync
|
||||
Return MyBase.Channel.ReturnScalar_FirebirdAsync(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ExecuteNonQuery_Firebird(ByVal SQL As String) As EDMIServiceReference.NonQueryResult Implements EDMIServiceReference.IEDMIService.ExecuteNonQuery_Firebird
|
||||
Return MyBase.Channel.ExecuteNonQuery_Firebird(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ExecuteNonQuery_FirebirdAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.NonQueryResult) Implements EDMIServiceReference.IEDMIService.ExecuteNonQuery_FirebirdAsync
|
||||
Return MyBase.Channel.ExecuteNonQuery_FirebirdAsync(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ReturnDatatable_MSSQL_IDB(ByVal SQL As String) As EDMIServiceReference.TableResult Implements EDMIServiceReference.IEDMIService.ReturnDatatable_MSSQL_IDB
|
||||
Return MyBase.Channel.ReturnDatatable_MSSQL_IDB(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ReturnDatatable_MSSQL_IDBAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.TableResult) Implements EDMIServiceReference.IEDMIService.ReturnDatatable_MSSQL_IDBAsync
|
||||
Return MyBase.Channel.ReturnDatatable_MSSQL_IDBAsync(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ReturnScalar_MSSQL_IDB(ByVal SQL As String) As EDMIServiceReference.ScalarResult Implements EDMIServiceReference.IEDMIService.ReturnScalar_MSSQL_IDB
|
||||
Return MyBase.Channel.ReturnScalar_MSSQL_IDB(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ReturnScalar_MSSQL_IDBAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.ScalarResult) Implements EDMIServiceReference.IEDMIService.ReturnScalar_MSSQL_IDBAsync
|
||||
Return MyBase.Channel.ReturnScalar_MSSQL_IDBAsync(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ExecuteNonQuery_MSSQL_IDB(ByVal SQL As String) As EDMIServiceReference.NonQueryResult Implements EDMIServiceReference.IEDMIService.ExecuteNonQuery_MSSQL_IDB
|
||||
Return MyBase.Channel.ExecuteNonQuery_MSSQL_IDB(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ExecuteNonQuery_MSSQL_IDBAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.NonQueryResult) Implements EDMIServiceReference.IEDMIService.ExecuteNonQuery_MSSQL_IDBAsync
|
||||
Return MyBase.Channel.ExecuteNonQuery_MSSQL_IDBAsync(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ReturnDatatable_MSSQL_ECM(ByVal SQL As String) As EDMIServiceReference.TableResult Implements EDMIServiceReference.IEDMIService.ReturnDatatable_MSSQL_ECM
|
||||
Return MyBase.Channel.ReturnDatatable_MSSQL_ECM(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ReturnDatatable_MSSQL_ECMAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.TableResult) Implements EDMIServiceReference.IEDMIService.ReturnDatatable_MSSQL_ECMAsync
|
||||
Return MyBase.Channel.ReturnDatatable_MSSQL_ECMAsync(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ReturnScalar_MSSQL_ECM(ByVal SQL As String) As EDMIServiceReference.ScalarResult Implements EDMIServiceReference.IEDMIService.ReturnScalar_MSSQL_ECM
|
||||
Return MyBase.Channel.ReturnScalar_MSSQL_ECM(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ReturnScalar_MSSQL_ECMAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.ScalarResult) Implements EDMIServiceReference.IEDMIService.ReturnScalar_MSSQL_ECMAsync
|
||||
Return MyBase.Channel.ReturnScalar_MSSQL_ECMAsync(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ExecuteNonQuery_MSSQL_ECM(ByVal SQL As String) As EDMIServiceReference.NonQueryResult Implements EDMIServiceReference.IEDMIService.ExecuteNonQuery_MSSQL_ECM
|
||||
Return MyBase.Channel.ExecuteNonQuery_MSSQL_ECM(SQL)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ExecuteNonQuery_MSSQL_ECMAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.NonQueryResult) Implements EDMIServiceReference.IEDMIService.ExecuteNonQuery_MSSQL_ECMAsync
|
||||
Return MyBase.Channel.ExecuteNonQuery_MSSQL_ECMAsync(SQL)
|
||||
End Function
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>
|
||||
Function EDMIServiceReference_IEDMIService_ImportFile(ByVal request As EDMIServiceReference.DocumentImportRequest) As EDMIServiceReference.DocumentImportResponse Implements EDMIServiceReference.IEDMIService.ImportFile
|
||||
Return MyBase.Channel.ImportFile(request)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ImportFile(ByVal Contents() As Byte, ByVal DocumentType As String, ByVal FileName As String, ByVal ObjectStoreId As Long, ByVal RetentionDays As Long) As Long
|
||||
Dim inValue As EDMIServiceReference.DocumentImportRequest = New EDMIServiceReference.DocumentImportRequest()
|
||||
inValue.Contents = Contents
|
||||
@@ -932,15 +932,15 @@ Namespace EDMIServiceReference
|
||||
inValue.FileName = FileName
|
||||
inValue.ObjectStoreId = ObjectStoreId
|
||||
inValue.RetentionDays = RetentionDays
|
||||
Dim retVal As EDMIServiceReference.DocumentImportResponse = CType(Me,EDMIServiceReference.IEDMIService).ImportFile(inValue)
|
||||
Dim retVal As EDMIServiceReference.DocumentImportResponse = CType(Me, EDMIServiceReference.IEDMIService).ImportFile(inValue)
|
||||
Return retVal.ObjectId
|
||||
End Function
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>
|
||||
Function EDMIServiceReference_IEDMIService_ImportFileAsync(ByVal request As EDMIServiceReference.DocumentImportRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentImportResponse) Implements EDMIServiceReference.IEDMIService.ImportFileAsync
|
||||
Return MyBase.Channel.ImportFileAsync(request)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ImportFileAsync(ByVal Contents() As Byte, ByVal DocumentType As String, ByVal FileName As String, ByVal ObjectStoreId As Long, ByVal RetentionDays As Long) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentImportResponse)
|
||||
Dim inValue As EDMIServiceReference.DocumentImportRequest = New EDMIServiceReference.DocumentImportRequest()
|
||||
inValue.Contents = Contents
|
||||
@@ -948,104 +948,104 @@ Namespace EDMIServiceReference
|
||||
inValue.FileName = FileName
|
||||
inValue.ObjectStoreId = ObjectStoreId
|
||||
inValue.RetentionDays = RetentionDays
|
||||
Return CType(Me,EDMIServiceReference.IEDMIService).ImportFileAsync(inValue)
|
||||
Return CType(Me, EDMIServiceReference.IEDMIService).ImportFileAsync(inValue)
|
||||
End Function
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>
|
||||
Function EDMIServiceReference_IEDMIService_GetFileByObjectId(ByVal request As EDMIServiceReference.DocumentStreamRequest) As EDMIServiceReference.DocumentStreamResponse Implements EDMIServiceReference.IEDMIService.GetFileByObjectId
|
||||
Return MyBase.Channel.GetFileByObjectId(request)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetFileByObjectId(ByVal ObjectId As Long, <System.Runtime.InteropServices.OutAttribute()> ByRef FileContents As System.IO.Stream) As String
|
||||
Dim inValue As EDMIServiceReference.DocumentStreamRequest = New EDMIServiceReference.DocumentStreamRequest()
|
||||
inValue.ObjectId = ObjectId
|
||||
Dim retVal As EDMIServiceReference.DocumentStreamResponse = CType(Me,EDMIServiceReference.IEDMIService).GetFileByObjectId(inValue)
|
||||
Dim retVal As EDMIServiceReference.DocumentStreamResponse = CType(Me, EDMIServiceReference.IEDMIService).GetFileByObjectId(inValue)
|
||||
FileContents = retVal.FileContents
|
||||
Return retVal.FileName
|
||||
End Function
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>
|
||||
Function EDMIServiceReference_IEDMIService_GetFileByObjectIdAsync(ByVal request As EDMIServiceReference.DocumentStreamRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentStreamResponse) Implements EDMIServiceReference.IEDMIService.GetFileByObjectIdAsync
|
||||
Return MyBase.Channel.GetFileByObjectIdAsync(request)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetFileByObjectIdAsync(ByVal ObjectId As Long) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentStreamResponse)
|
||||
Dim inValue As EDMIServiceReference.DocumentStreamRequest = New EDMIServiceReference.DocumentStreamRequest()
|
||||
inValue.ObjectId = ObjectId
|
||||
Return CType(Me,EDMIServiceReference.IEDMIService).GetFileByObjectIdAsync(inValue)
|
||||
Return CType(Me, EDMIServiceReference.IEDMIService).GetFileByObjectIdAsync(inValue)
|
||||
End Function
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>
|
||||
Function EDMIServiceReference_IEDMIService_GetFileInfoByObjectId(ByVal request As EDMIServiceReference.DocumentInfoRequest) As EDMIServiceReference.DocumentInfoResponse Implements EDMIServiceReference.IEDMIService.GetFileInfoByObjectId
|
||||
Return MyBase.Channel.GetFileInfoByObjectId(request)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetFileInfoByObjectId(ByVal ObjectId As Long, ByVal UserId As Long, <System.Runtime.InteropServices.OutAttribute()> ByRef FullPath As String) As EDMIServiceReference.RightsAccessRight
|
||||
Dim inValue As EDMIServiceReference.DocumentInfoRequest = New EDMIServiceReference.DocumentInfoRequest()
|
||||
inValue.ObjectId = ObjectId
|
||||
inValue.UserId = UserId
|
||||
Dim retVal As EDMIServiceReference.DocumentInfoResponse = CType(Me,EDMIServiceReference.IEDMIService).GetFileInfoByObjectId(inValue)
|
||||
Dim retVal As EDMIServiceReference.DocumentInfoResponse = CType(Me, EDMIServiceReference.IEDMIService).GetFileInfoByObjectId(inValue)
|
||||
FullPath = retVal.FullPath
|
||||
Return retVal.FileRight
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetFileInfoByObjectIdAsync(ByVal request As EDMIServiceReference.DocumentInfoRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentInfoResponse) Implements EDMIServiceReference.IEDMIService.GetFileInfoByObjectIdAsync
|
||||
Return MyBase.Channel.GetFileInfoByObjectIdAsync(request)
|
||||
End Function
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>
|
||||
Function EDMIServiceReference_IEDMIService_ListFilesForUser(ByVal request As EDMIServiceReference.ListFilesForUserRequest) As EDMIServiceReference.DocumentListResponse Implements EDMIServiceReference.IEDMIService.ListFilesForUser
|
||||
Return MyBase.Channel.ListFilesForUser(request)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ListFilesForUser() As System.Data.DataTable
|
||||
Dim inValue As EDMIServiceReference.ListFilesForUserRequest = New EDMIServiceReference.ListFilesForUserRequest()
|
||||
Dim retVal As EDMIServiceReference.DocumentListResponse = CType(Me,EDMIServiceReference.IEDMIService).ListFilesForUser(inValue)
|
||||
Dim retVal As EDMIServiceReference.DocumentListResponse = CType(Me, EDMIServiceReference.IEDMIService).ListFilesForUser(inValue)
|
||||
Return retVal.Datatable
|
||||
End Function
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>
|
||||
Function EDMIServiceReference_IEDMIService_ListFilesForUserAsync(ByVal request As EDMIServiceReference.ListFilesForUserRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentListResponse) Implements EDMIServiceReference.IEDMIService.ListFilesForUserAsync
|
||||
Return MyBase.Channel.ListFilesForUserAsync(request)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ListFilesForUserAsync() As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentListResponse)
|
||||
Dim inValue As EDMIServiceReference.ListFilesForUserRequest = New EDMIServiceReference.ListFilesForUserRequest()
|
||||
Return CType(Me,EDMIServiceReference.IEDMIService).ListFilesForUserAsync(inValue)
|
||||
Return CType(Me, EDMIServiceReference.IEDMIService).ListFilesForUserAsync(inValue)
|
||||
End Function
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>
|
||||
Function EDMIServiceReference_IEDMIService_NewObjectId(ByVal request As EDMIServiceReference.NewObjectIdRequest) As EDMIServiceReference.NewObjectIdResponse Implements EDMIServiceReference.IEDMIService.NewObjectId
|
||||
Return MyBase.Channel.NewObjectId(request)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function NewObjectId(ByVal BusinessEntity As String, ByVal KindType As String, ByVal Who As String) As Long
|
||||
Dim inValue As EDMIServiceReference.NewObjectIdRequest = New EDMIServiceReference.NewObjectIdRequest()
|
||||
inValue.BusinessEntity = BusinessEntity
|
||||
inValue.KindType = KindType
|
||||
inValue.Who = Who
|
||||
Dim retVal As EDMIServiceReference.NewObjectIdResponse = CType(Me,EDMIServiceReference.IEDMIService).NewObjectId(inValue)
|
||||
Dim retVal As EDMIServiceReference.NewObjectIdResponse = CType(Me, EDMIServiceReference.IEDMIService).NewObjectId(inValue)
|
||||
Return retVal.ObjectId
|
||||
End Function
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>
|
||||
Function EDMIServiceReference_IEDMIService_NewObjectIdAsync(ByVal request As EDMIServiceReference.NewObjectIdRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.NewObjectIdResponse) Implements EDMIServiceReference.IEDMIService.NewObjectIdAsync
|
||||
Return MyBase.Channel.NewObjectIdAsync(request)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function NewObjectIdAsync(ByVal BusinessEntity As String, ByVal KindType As String, ByVal Who As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.NewObjectIdResponse)
|
||||
Dim inValue As EDMIServiceReference.NewObjectIdRequest = New EDMIServiceReference.NewObjectIdRequest()
|
||||
inValue.BusinessEntity = BusinessEntity
|
||||
inValue.KindType = KindType
|
||||
inValue.Who = Who
|
||||
Return CType(Me,EDMIServiceReference.IEDMIService).NewObjectIdAsync(inValue)
|
||||
Return CType(Me, EDMIServiceReference.IEDMIService).NewObjectIdAsync(inValue)
|
||||
End Function
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>
|
||||
Function EDMIServiceReference_IEDMIService_NewFileObject(ByVal request As EDMIServiceReference.NewFileObjectRequest) As EDMIServiceReference.NewFileObjectResponse Implements EDMIServiceReference.IEDMIService.NewFileObject
|
||||
Return MyBase.Channel.NewFileObject(request)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function NewFileObject(ByVal DateImported As Date, ByVal Extension As String, ByVal KeepExtension As Boolean, ByVal ObjectId As Long, ByVal StoreType As String) As String
|
||||
Dim inValue As EDMIServiceReference.NewFileObjectRequest = New EDMIServiceReference.NewFileObjectRequest()
|
||||
inValue.DateImported = DateImported
|
||||
@@ -1053,15 +1053,15 @@ Namespace EDMIServiceReference
|
||||
inValue.KeepExtension = KeepExtension
|
||||
inValue.ObjectId = ObjectId
|
||||
inValue.StoreType = StoreType
|
||||
Dim retVal As EDMIServiceReference.NewFileObjectResponse = CType(Me,EDMIServiceReference.IEDMIService).NewFileObject(inValue)
|
||||
Dim retVal As EDMIServiceReference.NewFileObjectResponse = CType(Me, EDMIServiceReference.IEDMIService).NewFileObject(inValue)
|
||||
Return retVal.FileObjectPath
|
||||
End Function
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>
|
||||
Function EDMIServiceReference_IEDMIService_NewFileObjectAsync(ByVal request As EDMIServiceReference.NewFileObjectRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.NewFileObjectResponse) Implements EDMIServiceReference.IEDMIService.NewFileObjectAsync
|
||||
Return MyBase.Channel.NewFileObjectAsync(request)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function NewFileObjectAsync(ByVal DateImported As Date, ByVal Extension As String, ByVal KeepExtension As Boolean, ByVal ObjectId As Long, ByVal StoreType As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.NewFileObjectResponse)
|
||||
Dim inValue As EDMIServiceReference.NewFileObjectRequest = New EDMIServiceReference.NewFileObjectRequest()
|
||||
inValue.DateImported = DateImported
|
||||
@@ -1069,37 +1069,37 @@ Namespace EDMIServiceReference
|
||||
inValue.KeepExtension = KeepExtension
|
||||
inValue.ObjectId = ObjectId
|
||||
inValue.StoreType = StoreType
|
||||
Return CType(Me,EDMIServiceReference.IEDMIService).NewFileObjectAsync(inValue)
|
||||
Return CType(Me, EDMIServiceReference.IEDMIService).NewFileObjectAsync(inValue)
|
||||
End Function
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>
|
||||
Function EDMIServiceReference_IEDMIService_ImportFileIntoFileObject(ByVal request As EDMIServiceReference.ImportFileIntoFileObjectRequest) As EDMIServiceReference.ImportFileIntoFileObjectResponse Implements EDMIServiceReference.IEDMIService.ImportFileIntoFileObject
|
||||
Return MyBase.Channel.ImportFileIntoFileObject(request)
|
||||
End Function
|
||||
|
||||
Public Function ImportFileIntoFileObject(ByVal Contents() As Byte, ByVal pIDBFilePath As String, ByVal pIDB_OBJ_ID As Long, ByVal pObjectStoreID As Integer, ByVal pWho As String) As Boolean
|
||||
|
||||
Public Function ImportFileIntoFileObject(ByVal Contents() As Byte, ByVal FilePath As String, ByVal ObjectId As Long, ByVal ObjectStoreType As String, ByVal Who As String) As Boolean
|
||||
Dim inValue As EDMIServiceReference.ImportFileIntoFileObjectRequest = New EDMIServiceReference.ImportFileIntoFileObjectRequest()
|
||||
inValue.Contents = Contents
|
||||
inValue.pIDBFilePath = pIDBFilePath
|
||||
inValue.pIDB_OBJ_ID = pIDB_OBJ_ID
|
||||
inValue.pObjectStoreID = pObjectStoreID
|
||||
inValue.pWho = pWho
|
||||
Dim retVal As EDMIServiceReference.ImportFileIntoFileObjectResponse = CType(Me,EDMIServiceReference.IEDMIService).ImportFileIntoFileObject(inValue)
|
||||
inValue.FilePath = FilePath
|
||||
inValue.ObjectId = ObjectId
|
||||
inValue.ObjectStoreType = ObjectStoreType
|
||||
inValue.Who = Who
|
||||
Dim retVal As EDMIServiceReference.ImportFileIntoFileObjectResponse = CType(Me, EDMIServiceReference.IEDMIService).ImportFileIntoFileObject(inValue)
|
||||
Return retVal.Result
|
||||
End Function
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
|
||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)>
|
||||
Function EDMIServiceReference_IEDMIService_ImportFileIntoFileObjectAsync(ByVal request As EDMIServiceReference.ImportFileIntoFileObjectRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.ImportFileIntoFileObjectResponse) Implements EDMIServiceReference.IEDMIService.ImportFileIntoFileObjectAsync
|
||||
Return MyBase.Channel.ImportFileIntoFileObjectAsync(request)
|
||||
End Function
|
||||
|
||||
Public Function ImportFileIntoFileObjectAsync(ByVal Contents() As Byte, ByVal pIDBFilePath As String, ByVal pIDB_OBJ_ID As Long, ByVal pObjectStoreID As Integer, ByVal pWho As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.ImportFileIntoFileObjectResponse)
|
||||
|
||||
Public Function ImportFileIntoFileObjectAsync(ByVal Contents() As Byte, ByVal FilePath As String, ByVal ObjectId As Long, ByVal ObjectStoreType As String, ByVal Who As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.ImportFileIntoFileObjectResponse)
|
||||
Dim inValue As EDMIServiceReference.ImportFileIntoFileObjectRequest = New EDMIServiceReference.ImportFileIntoFileObjectRequest()
|
||||
inValue.Contents = Contents
|
||||
inValue.pIDBFilePath = pIDBFilePath
|
||||
inValue.pIDB_OBJ_ID = pIDB_OBJ_ID
|
||||
inValue.pObjectStoreID = pObjectStoreID
|
||||
inValue.pWho = pWho
|
||||
inValue.FilePath = FilePath
|
||||
inValue.ObjectId = ObjectId
|
||||
inValue.ObjectStoreType = ObjectStoreType
|
||||
inValue.Who = Who
|
||||
Return CType(Me,EDMIServiceReference.IEDMIService).ImportFileIntoFileObjectAsync(inValue)
|
||||
End Function
|
||||
End Class
|
||||
|
||||
@@ -346,7 +346,7 @@ Public Class LogConfig
|
||||
Public Function GetLogger(ClassName As String, ModuleName As String) As Logger
|
||||
Dim oLogger = LogFactory.GetLogger(Of Logger)(ClassName)
|
||||
|
||||
If ModuleName IsNot Nothing Then
|
||||
If ModuleName IsNot Nothing AndAlso ModuleName.Length > 0 Then
|
||||
Return oLogger.WithProperty("ModuleName", $"-{ModuleName}")
|
||||
End If
|
||||
|
||||
|
||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.4.0.0")>
|
||||
<Assembly: AssemblyFileVersion("2.4.0.0")>
|
||||
<Assembly: AssemblyVersion("2.4.1.0")>
|
||||
<Assembly: AssemblyFileVersion("2.4.1.0")>
|
||||
|
||||
@@ -580,12 +580,17 @@ Public Class EDMIService
|
||||
End Function
|
||||
|
||||
Public Function ImportFileIntoFileObject(Data As ImportFileIntoFileObjectRequest) As ImportFileIntoFileObjectResponse Implements IEDMIService.ImportFileIntoFileObject
|
||||
Dim oObjectStore = GlobalState.ObjectStores.First()
|
||||
Dim oEDMIPath = New EDMI.File.Path(LogConfig, oObjectStore.Path)
|
||||
|
||||
Try
|
||||
Using oStream = New FileStream(Data.pIDBFilePath, FileMode.Create, FileAccess.Write)
|
||||
_Logger.Info("ImportFile: Saving file to path [{0}]", Data.pIDBFilePath)
|
||||
Dim oObjectStore = GlobalState.ObjectStores.
|
||||
Where(Function(o) o.Title = Data.ObjectStoreType).
|
||||
FirstOrDefault()
|
||||
|
||||
If oObjectStore Is Nothing Then
|
||||
Throw New KeyNotFoundException($"ObjectStore [{Data.ObjectStoreType}] was not found.")
|
||||
End If
|
||||
|
||||
Using oStream = New FileStream(Data.FilePath, FileMode.Create, FileAccess.Write)
|
||||
_Logger.Info("ImportFile: Saving file to path [{0}]", Data.FilePath)
|
||||
_Logger.Info("ImportFile: Content Length: {0}", Data.Contents.Length)
|
||||
|
||||
oStream.Write(Data.Contents, 0, Data.Contents.Length)
|
||||
@@ -594,7 +599,7 @@ Public Class EDMIService
|
||||
End Using
|
||||
|
||||
' insert into db
|
||||
Dim oSQL As String = $"EXEC PRIDB_NEW_IDBFO '{Data.pIDBFilePath}','{Data.pWho}','{Data.pIDB_OBJ_ID}',{Data.pObjectStoreID}"
|
||||
Dim oSQL As String = $"EXEC PRIDB_NEW_IDBFO '{Data.FilePath}','{Data.Who}','{Data.ObjectId}',{oObjectStore.Id}"
|
||||
Dim oResult As Boolean = MSSQL_IDB.ExecuteNonQuery(oSQL)
|
||||
|
||||
Return New ImportFileIntoFileObjectResponse() With {.Result = oResult}
|
||||
|
||||
@@ -32,13 +32,13 @@ Namespace Messages
|
||||
<MessageBodyMember>
|
||||
Public Contents() As Byte
|
||||
<MessageBodyMember>
|
||||
Public pWho As String
|
||||
Public Who As String
|
||||
<MessageBodyMember>
|
||||
Public pIDBFilePath As String
|
||||
Public FilePath As String
|
||||
<MessageBodyMember>
|
||||
Public pIDB_OBJ_ID As Long
|
||||
Public ObjectId As Long
|
||||
<MessageBodyMember>
|
||||
Public pObjectStoreID As Integer
|
||||
Public ObjectStoreType As String
|
||||
End Class
|
||||
|
||||
<MessageContract>
|
||||
|
||||
@@ -18,7 +18,7 @@ Public Class DatatableJob
|
||||
Dim oLogConfig As LogConfig = oJobData.Item("LogConfig")
|
||||
Dim oCronJobId As Integer = oJobData.Item("CronJobId")
|
||||
Dim oCronJobTitle As String = oJobData.Item("CronJobTitle")
|
||||
Dim oLogger As Logger = oLogConfig.GetLogger()
|
||||
Dim oLogger As Logger = oLogConfig.GetLoggerFor("Scheduler")
|
||||
|
||||
Dim oResult As New JobResult()
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ Public Class JobListener
|
||||
MyBase.New()
|
||||
|
||||
_LogConfig = LogConfig
|
||||
_Logger = LogConfig.GetLogger()
|
||||
_Logger = LogConfig.GetLoggerFor("Scheduler")
|
||||
_MSSQL = MSSQL
|
||||
Dataset = ResultDataSet
|
||||
End Sub
|
||||
|
||||
@@ -108,8 +108,6 @@ Public Class Scheduler
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Public Async Function GetCronJobs() As Task(Of DataTable)
|
||||
Try
|
||||
Dim oSQL As String = "SELECT * FROM TBAPPSERV_CRON_JOB WHERE ACTIVE = 1"
|
||||
|
||||
Reference in New Issue
Block a user