This commit is contained in:
SchreiberM 2021-07-01 13:32:53 +02:00
commit 6675cb2a94
45 changed files with 1349 additions and 583 deletions

View 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

View 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>

View 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>

View 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

View 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

View 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>

View File

@ -0,0 +1,3 @@
Public Class frmDocumentManager
End Class

View File

@ -67,16 +67,16 @@ Public Class frmAdmin_ClipboardWatcher
'TODO: Diese Codezeile lädt Daten in die Tabelle "DSDD_Stammdaten.TBDD_CONNECTION". Sie können sie bei Bedarf verschieben oder entfernen. 'TODO: Diese Codezeile lädt Daten in die Tabelle "DSDD_Stammdaten.TBDD_CONNECTION". Sie können sie bei Bedarf verschieben oder entfernen.
Me.TBDD_CONNECTIONTableAdapter.Fill(Me.DSDD_Stammdaten.TBDD_CONNECTION) Me.TBDD_CONNECTIONTableAdapter.Fill(Me.DSDD_Stammdaten.TBDD_CONNECTION)
Try Try
TBCW_PROFILESTableAdapter.Connection.ConnectionString = My.Database.CurrentSQLConnectionString TBCW_PROFILESTableAdapter.Connection.ConnectionString = My.DatabaseECM.CurrentSQLConnectionString
TBCW_PROFILESTableAdapter.Fill(DBCW_Stammdaten.TBCW_PROFILES, PrimaryKey) TBCW_PROFILESTableAdapter.Fill(DBCW_Stammdaten.TBCW_PROFILES, PrimaryKey)
TBCW_PROF_DOC_SEARCHTableAdapter.Connection.ConnectionString = My.Database.CurrentSQLConnectionString TBCW_PROF_DOC_SEARCHTableAdapter.Connection.ConnectionString = My.DatabaseECM.CurrentSQLConnectionString
TBCW_PROF_DOC_SEARCHTableAdapter.Fill(DBCW_Stammdaten.TBCW_PROF_DOC_SEARCH, PrimaryKey) TBCW_PROF_DOC_SEARCHTableAdapter.Fill(DBCW_Stammdaten.TBCW_PROF_DOC_SEARCH, PrimaryKey)
TBCW_PROF_DATA_SEARCHTableAdapter.Connection.ConnectionString = My.Database.CurrentSQLConnectionString TBCW_PROF_DATA_SEARCHTableAdapter.Connection.ConnectionString = My.DatabaseECM.CurrentSQLConnectionString
TBCW_PROF_DATA_SEARCHTableAdapter.Fill(DBCW_Stammdaten.TBCW_PROF_DATA_SEARCH, PrimaryKey) TBCW_PROF_DATA_SEARCHTableAdapter.Fill(DBCW_Stammdaten.TBCW_PROF_DATA_SEARCH, PrimaryKey)
TBDD_CONNECTIONTableAdapter.Connection.ConnectionString = My.Database.CurrentSQLConnectionString TBDD_CONNECTIONTableAdapter.Connection.ConnectionString = My.DatabaseECM.CurrentSQLConnectionString
TBDD_CONNECTIONTableAdapter.Fill(DSDD_Stammdaten.TBDD_CONNECTION) TBDD_CONNECTIONTableAdapter.Fill(DSDD_Stammdaten.TBDD_CONNECTION)
' Configure the GridViews with some default options ' Configure the GridViews with some default options
@ -220,7 +220,7 @@ Public Class frmAdmin_ClipboardWatcher
Dim oTextEdit As TextEdit = sender Dim oTextEdit As TextEdit = sender
If e.Button.Tag = BUTTON_SEARCH_SQL Then If e.Button.Tag = BUTTON_SEARCH_SQL Then
Dim oForm As New frmSQLEditor(My.LogConfig, My.Database) With {.SQLString = oTextEdit.EditValue} Dim oForm As New frmSQLEditor(My.LogConfig, My.DatabaseECM) With {.SQLString = oTextEdit.EditValue}
Dim oResult = oForm.ShowDialog() Dim oResult = oForm.ShowDialog()
If oResult = DialogResult.OK Then If oResult = DialogResult.OK Then
@ -233,7 +233,7 @@ Public Class frmAdmin_ClipboardWatcher
Dim oTextEdit As TextEdit = sender Dim oTextEdit As TextEdit = sender
If e.Button.Tag = BUTTON_COUNT_SQL Then If e.Button.Tag = BUTTON_COUNT_SQL Then
Dim oForm As New frmSQLEditor(My.LogConfig, My.Database) With {.SQLString = oTextEdit.EditValue} Dim oForm As New frmSQLEditor(My.LogConfig, My.DatabaseECM) With {.SQLString = oTextEdit.EditValue}
Dim oResult = oForm.ShowDialog() Dim oResult = oForm.ShowDialog()
If oResult = DialogResult.OK Then If oResult = DialogResult.OK Then

View File

@ -17,7 +17,7 @@ Public Class frmAdmin_Globix
Private Sub frmAdmin_Attribute_Load(sender As Object, e As EventArgs) Handles MyBase.Load Private Sub frmAdmin_Attribute_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Try Try
TBDD_DOKUMENTARTTableAdapter.Connection.ConnectionString = My.Database.CurrentSQLConnectionString TBDD_DOKUMENTARTTableAdapter.Connection.ConnectionString = My.DatabaseECM.CurrentSQLConnectionString
Me.TBDD_DOKUMENTARTTableAdapter.Fill(Me.GlobixDataset.TBDD_DOKUMENTART, PrimaryKey) Me.TBDD_DOKUMENTARTTableAdapter.Fill(Me.GlobixDataset.TBDD_DOKUMENTART, PrimaryKey)
Catch ex As Exception Catch ex As Exception
ShowErrorMessage(ex) ShowErrorMessage(ex)

View File

@ -63,7 +63,7 @@ Public Class frmAdmin_Start
Private Function Load_SQLData() As Boolean Private Function Load_SQLData() As Boolean
Try Try
Dim oTable As DataTable = My.Database.GetDatatable("SELECT * FROM TBZF_ADMIN_SOURCE_SQL") Dim oTable As DataTable = My.DatabaseECM.GetDatatable("SELECT * FROM TBZF_ADMIN_SOURCE_SQL")
DetailForm.DetailDataList.Clear() DetailForm.DetailDataList.Clear()
For Each oRow As DataRow In oTable.Rows For Each oRow As DataRow In oTable.Rows
@ -77,7 +77,7 @@ Public Class frmAdmin_Start
} }
Try Try
oItem.SQLResult = My.Database.GetDatatable(oItem.SQLCommand) oItem.SQLResult = My.DatabaseECM.GetDatatable(oItem.SQLCommand)
Catch ex As Exception Catch ex As Exception
oItem.SQLResult = Nothing oItem.SQLResult = Nothing
Logger.Error(ex) Logger.Error(ex)

View File

@ -39,4 +39,6 @@
Public Const IDB_ADDED_WHEN_String_German = "Erstellt Wann" Public Const IDB_ADDED_WHEN_String_German = "Erstellt Wann"
Public Const IDB_ADDED_WHEN_String_Englisch = "Added when" Public Const IDB_ADDED_WHEN_String_Englisch = "Added when"
Public Const WM_WINDOWPOSCHANGING As Integer = &H46
End Class End Class

View File

@ -24,7 +24,7 @@ Public Class ClassDataASorDB
End Try End Try
Else Else
If pDB = "DD_ECM" Then If pDB = "DD_ECM" Then
oReturnDT = My.Database.GetDatatable(pSQL) oReturnDT = My.DatabaseECM.GetDatatable(pSQL)
ElseIf pDB = "IDB" Then ElseIf pDB = "IDB" Then
oReturnDT = My.DatabaseIDB.GetDatatable(pSQL) oReturnDT = My.DatabaseIDB.GetDatatable(pSQL)
End If End If

View File

@ -4,7 +4,7 @@ Public Class ClassEnvironment
Public Shared Function GetEnvironment() As Environment Public Shared Function GetEnvironment() As Environment
Dim oEnvironment As New Environment() With { Dim oEnvironment As New Environment() With {
.DatabaseIDB = My.DatabaseIDB, .DatabaseIDB = My.DatabaseIDB,
.Database = My.Database, .Database = My.DatabaseECM,
.Modules = My.Application.Modules, .Modules = My.Application.Modules,
.Service = My.Application.Service, .Service = My.Application.Service,
.Settings = My.Application.Settings, .Settings = My.Application.Settings,

View File

@ -1,4 +1,6 @@
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.EDMI.API
Imports DigitalData.Modules.EDMI.API.Constants
Imports DigitalData.Modules.Logging
Public Class ClassIDBData Public Class ClassIDBData
Public Property DTVWIDB_BE_ATTRIBUTE As DataTable Public Property DTVWIDB_BE_ATTRIBUTE As DataTable
@ -9,11 +11,17 @@ Public Class ClassIDBData
''' <returns>Array with all Indices</returns> ''' <returns>Array with all Indices</returns>
Private _Logger As Logger Private _Logger As Logger
Private _DataASorDB As ClassDataASorDB Private _DataASorDB As ClassDataASorDB
Private _Database As DatabaseWithFallback
Public Sub New(LogConfig As LogConfig) Public Sub New(LogConfig As LogConfig)
_Logger = LogConfig.GetLogger _Logger = LogConfig.GetLogger
_Database = New DatabaseWithFallback(LogConfig, My.Application.Service.Client, My.DatabaseECM, My.DatabaseIDB)
_DataASorDB = New ClassDataASorDB(LogConfig) _DataASorDB = New ClassDataASorDB(LogConfig)
Dim oSQL = $"SELECT * FROM VWIDB_BE_ATTRIBUTE WHERE LANG_ID = {My.Application.User.LanguageID}" Dim oSQL = $"SELECT * FROM VWIDB_BE_ATTRIBUTE WHERE LANG_ID = {My.Application.User.LanguageID}"
DTVWIDB_BE_ATTRIBUTE = _DataASorDB.GetDatatable("IDB", oSQL, "VWIDB_BE_ATTRIBUTE", $"LANG_ID = {My.Application.User.LanguageID}")
DTVWIDB_BE_ATTRIBUTE = _Database.GetDatatable("VWIDB_BE_ATTRIBUTE", oSQL, DatabaseType.IDB, $"LANG_ID = {My.Application.User.LanguageID}")
'DTVWIDB_BE_ATTRIBUTE = _DataASorDB.GetDatatable("IDB", oSQL, "VWIDB_BE_ATTRIBUTE", $"LANG_ID = {My.Application.User.LanguageID}")
End Sub End Sub
Public IDBSystemIndices As List(Of String) Public IDBSystemIndices As List(Of String)
Public Function GetIndicesByBE(ByVal pBusinessEntity As String) As List(Of String) Public Function GetIndicesByBE(ByVal pBusinessEntity As String) As List(Of String)

View File

@ -44,10 +44,10 @@ Public Class ClassInit
_Loader = New ClassInitLoader() _Loader = New ClassInitLoader()
' === Init Schritte definieren ' === Init Schritte definieren
_Loader.AddStep("Checking connectivity..", AddressOf CheckConnectivity, True) _Loader.AddStep("Initializing Database (1/2)", AddressOf InitializeDatabase, True)
_Loader.AddStep("Initializing Service", AddressOf InitializeService, True)
_Loader.AddStep("Initializing Database (2/2)", AddressOf InitializeDatabaseWithFallback, True)
_Loader.AddStep("Initializing User..", AddressOf InitializeUser, True) _Loader.AddStep("Initializing User..", AddressOf InitializeUser, True)
_Loader.AddStep("Initializing IDB Database..", AddressOf InitializeIDBDatabase, True)
_Loader.AddStep("Initializing IDB Service..", AddressOf InitializeIDBService, True)
_Loader.AddStep("Initializing Language..", AddressOf InitializeLanguage, False) _Loader.AddStep("Initializing Language..", AddressOf InitializeLanguage, False)
_Loader.AddStep("Loading 3rd-party licenses..", AddressOf Initialize3rdParty, False) _Loader.AddStep("Loading 3rd-party licenses..", AddressOf Initialize3rdParty, False)
_Loader.AddStep("Loading Basic Configs..", AddressOf InitBasicData, False) _Loader.AddStep("Loading Basic Configs..", AddressOf InitBasicData, False)
@ -115,13 +115,41 @@ Public Class ClassInit
End If End If
End Sub End Sub
Private Sub CheckConnectivity(MyApplication As My.MyApplication) Private Sub InitializeDatabase(MyApplication As My.MyApplication)
Dim oConnectionString = MSSQLServer.DecryptConnectionString(My.SystemConfig.ConnectionString) Dim oConnectionString = MSSQLServer.DecryptConnectionString(My.SystemConfig.ConnectionString)
My.Database = New MSSQLServer(My.LogConfig, oConnectionString) My.DatabaseECM = New MSSQLServer(My.LogConfig, oConnectionString)
If My.Database.DBInitialized = False Then If My.DatabaseECM.DBInitialized = False Then
_Logger.Warn("Could not initialize DD_ECM-Database!") _Logger.Warn("Could not initialize DD_ECM-Database!")
Throw New InitException("Could not initialize DD_ECM-Database!") Throw New InitException("Could not initialize ECM-Database!")
Else
Dim oSQl = "SELECT * FROM TBDD_CONNECTION WHERE BEZEICHNUNG = 'IDB'"
Dim oDatatable As DataTable = My.DatabaseECM.GetDatatable(oSQl)
If IsNothing(oDatatable) OrElse oDatatable.Rows.Count = 0 Then
_Logger.Warn("No IDB connection entries in TBDD_CONNECTION found!")
Throw New InitException("Fehler beim Laden der IDB Verbindungsdaten!")
End If
If oDatatable.Rows.Count > 1 Then
_Logger.Warn("Multiple IDB connection entries in TBDD_CONNECTION found!")
Throw New InitException("Fehler beim Laden der IDB Verbindungsdaten!")
End If
Dim oDataRow As DataRow = oDatatable.Rows.Item(0)
Dim oConString = My.DatabaseECM.GetConnectionString(
oDataRow.Item("SERVER").ToString,
oDataRow.Item("DATENBANK").ToString,
oDataRow.Item("USERNAME").ToString,
oDataRow.Item("PASSWORD").ToString)
My.DatabaseIDB = New MSSQLServer(My.LogConfig, oConString)
End If
If My.DatabaseIDB.DBInitialized = False Then
_Logger.Warn("Could not initialize IDB-Database!")
Throw New InitException("Could not initialize IDB-Database!")
End If End If
End Sub End Sub
@ -130,6 +158,7 @@ Public Class ClassInit
Dim oSql = "Select LICENSE FROM TBDD_3RD_PARTY_MODULES WHERE NAME = 'GDPICTURE'" Dim oSql = "Select LICENSE FROM TBDD_3RD_PARTY_MODULES WHERE NAME = 'GDPICTURE'"
Dim oDatatable As DataTable = _DataASorDB.GetDatatable("DD_ECM", oSql, "TBDD_3RD_PARTY_MODULES", "", "") Dim oDatatable As DataTable = _DataASorDB.GetDatatable("DD_ECM", oSql, "TBDD_3RD_PARTY_MODULES", "", "")
If oDatatable.Rows.Count = 0 Then If oDatatable.Rows.Count = 0 Then
Throw New InitException("Konfiguration konnte nicht geladen werden!") Throw New InitException("Konfiguration konnte nicht geladen werden!")
End If End If
@ -139,48 +168,49 @@ Public Class ClassInit
MyApplication.Settings.GdPictureKey = NotNull(oRow.Item("LICENSE"), String.Empty) MyApplication.Settings.GdPictureKey = NotNull(oRow.Item("LICENSE"), String.Empty)
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
Throw New InitException("Error initializing3rdParty!", ex) Throw New InitException("Error Initialize3rdParty!", ex)
End Try End Try
End Sub End Sub
Private Sub InitializeDatabaseWithFallback(MyApplication As My.MyApplication)
Try
My.Database = New DatabaseWithFallback(_LogConfig, My.Application.Service.Client, My.DatabaseECM, My.DatabaseIDB)
Catch ex As Exception
_Logger.Error(ex)
Throw New InitException("Error InitializeDatabaseWithFallback!", ex)
End Try
End Sub
Private Sub InitBasicData(MyApplication As My.MyApplication) Private Sub InitBasicData(MyApplication As My.MyApplication)
Try Try
Dim oSql = "" My.Tables.DTIDB_COMMON_SQL = My.DatabaseECM.GetDatatable("SELECT * FROM TBIDB_COMMON_SQL WHERE ACTIVE = 1")
My.Tables.DTIDB_CATALOG = My.DatabaseECM.GetDatatable("SELECT * FROM TBIDB_CATALOG")
oSql = "SELECT * FROM TBIDB_COMMON_SQL WHERE ACTIVE = 1" 'TODO: Get FilesStores from Application Server
My.Tables.DTIDB_COMMON_SQL = _DataASorDB.GetDatatable("IDB", oSql, "TBIDB_COMMON_SQL", "", "")
oSql = "SELECT * FROM TBIDB_CATALOG"
My.Tables.DTIDB_CATALOG = _DataASorDB.GetDatatable("IDB", oSql, "TBIDB_CATALOG", "", "")
For Each oRow As DataRow In My.Tables.DTIDB_CATALOG.Rows For Each oRow As DataRow In My.Tables.DTIDB_CATALOG.Rows
'Console.WriteLine(oRow.Item("CAT_TITLE").ToString)
Select Case oRow.Item("CAT_TITLE").ToString Select Case oRow.Item("CAT_TITLE").ToString
Case "FILESTORE_ARCHIVE" Case "FILESTORE_ARCHIVE"
My.Filestore_Archive = oRow.Item("CAT_STRING") My.Filestore_Archive = oRow.Item("CAT_STRING")
Case "FILESTORE_WORK" Case "FILESTORE_WORK"
My.Filestore_Work = oRow.Item("CAT_STRING") My.Filestore_Work = oRow.Item("CAT_STRING")
My.Filestore_Work = "Q:\DigitalData - IDB" My.Filestore_Work = "Q:\DigitalData - IDB"
End Select End Select
Next Next
oSql = "SELECT * FROM TBDD_CONNECTION"
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
Throw New InitException("Error in InitBasicData", ex) Throw New InitException("Error in InitBasicData", ex)
End Try End Try
End Sub End Sub
Private Sub InitializeIDBService(MyApplication As My.MyApplication) Private Sub InitializeService(MyApplication As My.MyApplication)
Try Try
MyApplication.Service.Address = My.SystemConfig.AppServerConfig MyApplication.Service.Address = My.SystemConfig.AppServerConfig
Dim oServerData = Client.ParseServiceAddress(My.SystemConfig.AppServerConfig)
My.Application.Service.Client = New Client(_LogConfig, oServerData.Item1, oServerData.Item2)
Dim oSplit() As String = MyApplication.Service.Address.Split(":"c)
Dim oAppServerAddress As String = oSplit(0)
Dim oAppServerPort As Integer = 9000
If oSplit.Length = 2 Then
oAppServerPort = oSplit(1)
End If
My.Application.Service.Client = New Client(_LogConfig, oAppServerAddress, oAppServerPort)
If Not IsNothing(My.Application.Service.Client) Then If Not IsNothing(My.Application.Service.Client) Then
If My.Application.Service.Client.Connect() Then If My.Application.Service.Client.Connect() Then
MyApplication.Service.IsActive = True MyApplication.Service.IsActive = True
@ -188,15 +218,15 @@ Public Class ClassInit
End If End If
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
Throw New InitException("Error in InitBasicData", ex) Throw New InitException("Error in InitializeService", ex)
End Try End Try
End Sub End Sub
Private Sub InitializeIDBDatabase(MyApplication As My.MyApplication) Private Sub InitializeIDBDatabase(MyApplication As My.MyApplication)
If MyApplication.ModulesActive.Contains(MODULE_ZOOFLOW) Then If MyApplication.ModulesActive.Contains(MODULE_ZOOFLOW) Then
If My.Database.DBInitialized Then If My.DatabaseECM.DBInitialized Then
Dim oSQl = "SELECT * FROM TBDD_CONNECTION WHERE BEZEICHNUNG = 'IDB'" Dim oSQl = "SELECT * FROM TBDD_CONNECTION WHERE BEZEICHNUNG = 'IDB'"
Dim oDatatable As DataTable = My.Database.GetDatatable(oSQl) Dim oDatatable As DataTable = My.DatabaseECM.GetDatatable(oSQl)
If IsNothing(oDatatable) OrElse oDatatable.Rows.Count = 0 Then If IsNothing(oDatatable) OrElse oDatatable.Rows.Count = 0 Then
_Logger.Warn("No IDB connection entries in TBDD_CONNECTION found!") _Logger.Warn("No IDB connection entries in TBDD_CONNECTION found!")
@ -209,7 +239,7 @@ Public Class ClassInit
End If End If
Dim oDataRow As DataRow = oDatatable.Rows.Item(0) Dim oDataRow As DataRow = oDatatable.Rows.Item(0)
Dim oConString = My.Database.GetConnectionString( Dim oConString = My.DatabaseECM.GetConnectionString(
oDataRow.Item("SERVER").ToString, oDataRow.Item("SERVER").ToString,
oDataRow.Item("DATENBANK").ToString, oDataRow.Item("DATENBANK").ToString,
oDataRow.Item("USERNAME").ToString, oDataRow.Item("USERNAME").ToString,
@ -230,7 +260,7 @@ Public Class ClassInit
Private Sub InitializeUser(MyApplication As My.MyApplication) Private Sub InitializeUser(MyApplication As My.MyApplication)
Try Try
Dim oSql As String = My.Queries.Common.FNDD_MODULE_INIT(Environment.UserName) Dim oSql As String = My.Queries.Common.FNDD_MODULE_INIT(Environment.UserName)
Dim oDatatable As DataTable = My.Database.GetDatatable(oSql) Dim oDatatable As DataTable = My.DatabaseECM.GetDatatable(oSql)
If oDatatable Is Nothing Then If oDatatable Is Nothing Then
Throw New InitException("Benutzer konnte nicht geladen werden!") Throw New InitException("Benutzer konnte nicht geladen werden!")

View File

@ -180,7 +180,7 @@ Public Class ClassFilehandle
Dim filename_only As String = Path.GetFileName(filename) Dim filename_only As String = Path.GetFileName(filename)
Dim ins As String = "INSERT INTO TBGI_FILES_USER (FILENAME2WORK, USER@WORK,HANDLE_TYPE,FILENAME_ONLY) VALUES ('" & filename & "','" & Environment.UserName & "','" & handleType & "','" & filename_only & "')" Dim ins As String = "INSERT INTO TBGI_FILES_USER (FILENAME2WORK, USER@WORK,HANDLE_TYPE,FILENAME_ONLY) VALUES ('" & filename & "','" & Environment.UserName & "','" & handleType & "','" & filename_only & "')"
Return My.Database.ExecuteNonQuery(ins) Return My.DatabaseECM.ExecuteNonQuery(ins)
Catch ex As Exception Catch ex As Exception
Return False Return False

View File

@ -16,7 +16,7 @@
End Try End Try
oSQL = "SELECT * FROM TBGI_FILES_USER WHERE UPPER(FILE_HASH) = UPPER('" & oHash & "') AND WORKED = 0 ORDER BY ADDED_WHEN" oSQL = "SELECT * FROM TBGI_FILES_USER WHERE UPPER(FILE_HASH) = UPPER('" & oHash & "') AND WORKED = 0 ORDER BY ADDED_WHEN"
Dim oResult As DataTable = My.Database.GetDatatable(oSQL) Dim oResult As DataTable = My.DatabaseECM.GetDatatable(oSQL)
If oResult Is Nothing Then If oResult Is Nothing Then
Return Nothing Return Nothing
@ -24,7 +24,7 @@
If oResult.Rows.Count = 0 Then If oResult.Rows.Count = 0 Then
oSQL = "SELECT * FROM TBGI_HISTORY WHERE UPPER(FILE_HASH) = UPPER('" & oHash & "') ORDER BY ADDED_WHEN" oSQL = "SELECT * FROM TBGI_HISTORY WHERE UPPER(FILE_HASH) = UPPER('" & oHash & "') ORDER BY ADDED_WHEN"
oResult = My.Database.GetDatatable(oSQL) oResult = My.DatabaseECM.GetDatatable(oSQL)
If oResult Is Nothing Then If oResult Is Nothing Then
Return Nothing Return Nothing

View File

@ -101,7 +101,7 @@ Public Class GlobixControls
AddHandler oControl.Properties.SelectedValuesChanged, AddressOf Lookup_SelectedValuesChanged AddHandler oControl.Properties.SelectedValuesChanged, AddressOf Lookup_SelectedValuesChanged
oConnectionString = My.Database.Get_ConnectionStringforID(conid) oConnectionString = My.DatabaseECM.Get_ConnectionStringforID(conid)
If oConnectionString IsNot Nothing And oSql.Length > 0 And SQLSuggestion = True Then If oConnectionString IsNot Nothing And oSql.Length > 0 And SQLSuggestion = True Then
_Logger.Debug("Connection String (redacted): [{0}]", oConnectionString.Substring(0, 30)) _Logger.Debug("Connection String (redacted): [{0}]", oConnectionString.Substring(0, 30))
@ -109,7 +109,7 @@ Public Class GlobixControls
If Patterns.HasComplexPatterns(oSql) Then If Patterns.HasComplexPatterns(oSql) Then
_Logger.Debug("sql enthält Platzhalter und wird erst während der Laufzeit gefüllt!", False) _Logger.Debug("sql enthält Platzhalter und wird erst während der Laufzeit gefüllt!", False)
Else Else
Dim oDatatable = My.Database.GetDatatableWithConnection(oSql, oConnectionString) Dim oDatatable = My.DatabaseECM.GetDatatableWithConnection(oSql, oConnectionString)
oControl.Properties.DataSource = oDatatable oControl.Properties.DataSource = oDatatable
End If End If
Else Else
@ -190,7 +190,7 @@ Public Class GlobixControls
Try Try
Dim indexname = cmb.Name.Replace("cmb", "") Dim indexname = cmb.Name.Replace("cmb", "")
Dim sql = "SELECT GUID,NAME,SQL_RESULT FROM TBDD_INDEX_MAN where SUGGESTION = 1 AND SQL_RESULT like '%@" & indexname & "%' and DOK_ID = " & My.Application.Globix.CURRENT_DOCTYPE_ID & " ORDER BY SEQUENCE" Dim sql = "SELECT GUID,NAME,SQL_RESULT FROM TBDD_INDEX_MAN where SUGGESTION = 1 AND SQL_RESULT like '%@" & indexname & "%' and DOK_ID = " & My.Application.Globix.CURRENT_DOCTYPE_ID & " ORDER BY SEQUENCE"
Dim DT As DataTable = My.Database.GetDatatable(sql) Dim DT As DataTable = My.DatabaseECM.GetDatatable(sql)
If Not IsNothing(DT) Then If Not IsNothing(DT) Then
If DT.Rows.Count > 0 Then If DT.Rows.Count > 0 Then
Dim cmbname = "cmb" & DT.Rows(0).Item("NAME") Dim cmbname = "cmb" & DT.Rows(0).Item("NAME")
@ -217,7 +217,7 @@ Public Class GlobixControls
Dim NewDataset As New DataSet Dim NewDataset As New DataSet
Dim i As Integer Dim i As Integer
Dim DT_INDEX As DataTable = My.Database.GetDatatable("select * FROM TBDD_INDEX_MAN WHERE GUID = " & INDEX_GUID) Dim DT_INDEX As DataTable = My.DatabaseECM.GetDatatable("select * FROM TBDD_INDEX_MAN WHERE GUID = " & INDEX_GUID)
If IsNothing(DT_INDEX) Then If IsNothing(DT_INDEX) Then
Exit Sub Exit Sub
End If End If
@ -231,7 +231,7 @@ Public Class GlobixControls
Dim cmb As ComboBox = ctrl Dim cmb As ComboBox = ctrl
Dim sql As String = sql_result.ToString.ToUpper.Replace("@" & SearchString.ToUpper, Resultvalue) Dim sql As String = sql_result.ToString.ToUpper.Replace("@" & SearchString.ToUpper, Resultvalue)
connectionString = My.Database.Get_ConnectionStringforID(conid) connectionString = My.DatabaseECM.Get_ConnectionStringforID(conid)
If connectionString Is Nothing = False Then If connectionString Is Nothing = False Then
'SQL Befehl füllt die Auswahlliste 'SQL Befehl füllt die Auswahlliste
@ -402,7 +402,7 @@ Public Class GlobixControls
Dim oMeta = DirectCast(Control.Tag, ControlMeta) Dim oMeta = DirectCast(Control.Tag, ControlMeta)
Dim oIndexName As String = oMeta.IndexName Dim oIndexName As String = oMeta.IndexName
Dim oSQL = $"SELECT * FROM TBDD_INDEX_MAN WHERE SQL_RESULT LIKE '%{oIndexName}%'" Dim oSQL = $"SELECT * FROM TBDD_INDEX_MAN WHERE SQL_RESULT LIKE '%{oIndexName}%'"
Dim oDatatable As DataTable = My.Database.GetDatatable(oSQL) Dim oDatatable As DataTable = My.DatabaseECM.GetDatatable(oSQL)
If Not IsNothing(oDatatable) Then If Not IsNothing(oDatatable) Then
_Logger.Debug("Found [{0}] depending controls for [{1}]", oDatatable.Rows.Count, Control.Name) _Logger.Debug("Found [{0}] depending controls for [{1}]", oDatatable.Rows.Count, Control.Name)
@ -439,8 +439,8 @@ Public Class GlobixControls
Exit Sub Exit Sub
End If End If
Dim oConnectionString = My.Database.Get_ConnectionStringforID(SqlConnectionId) Dim oConnectionString = My.DatabaseECM.Get_ConnectionStringforID(SqlConnectionId)
Dim oDatatable As DataTable = My.Database.GetDatatableWithConnection(SqlCommand, oConnectionString) Dim oDatatable As DataTable = My.DatabaseECM.GetDatatableWithConnection(SqlCommand, oConnectionString)
Dim oFoundControl As Control = Nothing Dim oFoundControl As Control = Nothing
For Each oControl As Control In Panel.Controls For Each oControl As Control In Panel.Controls

View File

@ -39,7 +39,7 @@ Public Class frmGlobixAdministration
Private Sub frmGlobixAdministration_Load(sender As Object, e As EventArgs) Handles Me.Load Private Sub frmGlobixAdministration_Load(sender As Object, e As EventArgs) Handles Me.Load
Try Try
Me.TBDD_DOKUMENTARTTableAdapter.Connection.ConnectionString = My.Database.CurrentSQLConnectionString Me.TBDD_DOKUMENTARTTableAdapter.Connection.ConnectionString = My.DatabaseECM.CurrentSQLConnectionString
'Me.TBDD_EINGANGSARTENTableAdapter.Connection.ConnectionString = MyConnectionString 'Me.TBDD_EINGANGSARTENTableAdapter.Connection.ConnectionString = MyConnectionString
'Me.TBDD_MODULESTableAdapter.Connection.ConnectionString = MyConnectionString 'Me.TBDD_MODULESTableAdapter.Connection.ConnectionString = MyConnectionString
'Me.TBDD_DOKART_MODULETableAdapter.Connection.ConnectionString = MyConnectionString 'Me.TBDD_DOKART_MODULETableAdapter.Connection.ConnectionString = MyConnectionString

View File

@ -35,7 +35,7 @@ Public Class frmGlobixBasicConfig
Sub CheckFolder(pMypath As String, FOLDER_TYPE As String) Sub CheckFolder(pMypath As String, FOLDER_TYPE As String)
Try Try
If pMypath = "" Then If pMypath = "" Then
My.Database.ExecuteNonQuery("DELETE FROM TBGI_FOLDERWATCH_USER WHERE USER_ID = " & My.Application.User.UserId & " AND FOLDER_TYPE = '" & FOLDER_TYPE & "'") My.DatabaseECM.ExecuteNonQuery("DELETE FROM TBGI_FOLDERWATCH_USER WHERE USER_ID = " & My.Application.User.UserId & " AND FOLDER_TYPE = '" & FOLDER_TYPE & "'")
If FOLDER_TYPE = "SCAN" Then If FOLDER_TYPE = "SCAN" Then
My.Application.Globix.CURRENT_SCAN_FOLDERWATCH = "" My.Application.Globix.CURRENT_SCAN_FOLDERWATCH = ""
My.UIConfig.Globix.FolderWatchScanStarted = False My.UIConfig.Globix.FolderWatchScanStarted = False
@ -67,15 +67,15 @@ Public Class frmGlobixBasicConfig
Exit Sub Exit Sub
End Try End Try
Dim folderwatch = My.Database.GetScalarValue("SELECT GUID FROM TBGI_FOLDERWATCH_USER WHERE USER_ID = " & My.Application.User.UserId & " AND FOLDER_TYPE = '" & FOLDER_TYPE & "'") Dim folderwatch = My.DatabaseECM.GetScalarValue("SELECT GUID FROM TBGI_FOLDERWATCH_USER WHERE USER_ID = " & My.Application.User.UserId & " AND FOLDER_TYPE = '" & FOLDER_TYPE & "'")
Dim oSql As String Dim oSql As String
If folderwatch Is Nothing Then If folderwatch Is Nothing Then
oSql = "INSERT INTO TBGI_FOLDERWATCH_USER (USER_ID, FOLDER_PATH, FOLDER_TYPE, ADDED_WHO) VALUES (" & My.Application.User.UserId & ",'" & pMypath & "','" & FOLDER_TYPE & "','" & My.Application.User.UserName & "')" oSql = "INSERT INTO TBGI_FOLDERWATCH_USER (USER_ID, FOLDER_PATH, FOLDER_TYPE, ADDED_WHO) VALUES (" & My.Application.User.UserId & ",'" & pMypath & "','" & FOLDER_TYPE & "','" & My.Application.User.UserName & "')"
Else Else
oSql = "UPDATE TBGI_FOLDERWATCH_USER SET FOLDER_PATH = '" & pMypath & "', CHANGED_WHO = '" & My.Application.User.UserName & "' where GUID = " & folderwatch oSql = "UPDATE TBGI_FOLDERWATCH_USER SET FOLDER_PATH = '" & pMypath & "', CHANGED_WHO = '" & My.Application.User.UserName & "' where GUID = " & folderwatch
End If End If
If My.Database.ExecuteNonQuery(oSql) Then If My.DatabaseECM.ExecuteNonQuery(oSql) Then
folderwatch = My.Database.GetScalarValue("SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE USER_ID = " & My.Application.User.UserId & " AND FOLDER_TYPE = '" & FOLDER_TYPE & "'") folderwatch = My.DatabaseECM.GetScalarValue("SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE USER_ID = " & My.Application.User.UserId & " AND FOLDER_TYPE = '" & FOLDER_TYPE & "'")
If FOLDER_TYPE = "SCAN" Then If FOLDER_TYPE = "SCAN" Then
My.Application.Globix.CURRENT_SCAN_FOLDERWATCH = folderwatch My.Application.Globix.CURRENT_SCAN_FOLDERWATCH = folderwatch
@ -102,12 +102,12 @@ Public Class frmGlobixBasicConfig
clsFW = New ClassFolderwatcher() clsFW = New ClassFolderwatcher()
Try Try
oReload = True oReload = True
Dim oFolderwatch = My.Database.GetScalarValue("SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE FOLDER_TYPE = 'DEFAULT' AND USER_ID = " & My.Application.User.UserId) Dim oFolderwatch = My.DatabaseECM.GetScalarValue("SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE FOLDER_TYPE = 'DEFAULT' AND USER_ID = " & My.Application.User.UserId)
If Not oFolderwatch Is Nothing Then If Not oFolderwatch Is Nothing Then
My.Application.Globix.CurrentFolderWatchPath = oFolderwatch My.Application.Globix.CurrentFolderWatchPath = oFolderwatch
End If End If
Me.txtFolderWatch.Text = My.Application.Globix.CurrentFolderWatchPath Me.txtFolderWatch.Text = My.Application.Globix.CurrentFolderWatchPath
Dim oSCANFolderwatch = My.Database.GetScalarValue("SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE FOLDER_TYPE = 'SCAN' AND USER_ID = " & My.Application.User.UserId) Dim oSCANFolderwatch = My.DatabaseECM.GetScalarValue("SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE FOLDER_TYPE = 'SCAN' AND USER_ID = " & My.Application.User.UserId)
If Not oSCANFolderwatch Is Nothing Then If Not oSCANFolderwatch Is Nothing Then
My.Application.Globix.CURRENT_SCAN_FOLDERWATCH = oSCANFolderwatch My.Application.Globix.CURRENT_SCAN_FOLDERWATCH = oSCANFolderwatch
End If End If

View File

@ -86,7 +86,7 @@ Public Class frmGlobix_Index
Try Try
My.Application.Globix.CURRENT_ISATTACHMENT = False My.Application.Globix.CURRENT_ISATTACHMENT = False
DropType = My.Database.GetScalarValue("SELECT HANDLE_TYPE FROM TBGI_FILES_USER WHERE GUID = " & My.Application.Globix.CURRENT_WORKFILE_GUID).ToString DropType = My.DatabaseECM.GetScalarValue("SELECT HANDLE_TYPE FROM TBGI_FILES_USER WHERE GUID = " & My.Application.Globix.CURRENT_WORKFILE_GUID).ToString
My.Application.Globix.CURR_DELETE_ORIGIN = My.UIConfig.Globix.DeleteOriginalFile My.Application.Globix.CURR_DELETE_ORIGIN = My.UIConfig.Globix.DeleteOriginalFile
SourceDeleteItem.Enabled = True SourceDeleteItem.Enabled = True
@ -175,7 +175,7 @@ Public Class frmGlobix_Index
My.Application.Globix.DTTBGI_REGEX_DOCTYPE = _DataASorDB.GetDatatable("DD_ECM", oSQL, "DTTBGI_REGEX_DOCTYPE", "", "") My.Application.Globix.DTTBGI_REGEX_DOCTYPE = _DataASorDB.GetDatatable("DD_ECM", oSQL, "DTTBGI_REGEX_DOCTYPE", "", "")
oSQL = "SELECT * FROM TBDD_INDEX_MAN_POSTPROCESSING" oSQL = "SELECT * FROM TBDD_INDEX_MAN_POSTPROCESSING"
My.Application.Globix.CURR_INDEX_MAN_POSTPROCESSING = _DataASorDB.GetDatatable("DD_ECM", oSQL, "TBDD_INDEX_MAN_POSTPROCESSING", "", "") My.Application.Globix.CURR_INDEX_MAN_POSTPROCESSING = _DataASorDB.GetDatatable("DD_ECM", oSQL, "TBDD_INDEX_MAN_POSTPROCESSING", "", "")
MULTIFILES = My.Database.GetScalarValue("SELECT COUNT(*) FROM TBGI_FILES_USER WHERE WORKED = 0 AND GUID <> " & My.Application.Globix.CURRENT_WORKFILE_GUID & " AND UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')") MULTIFILES = My.DatabaseECM.GetScalarValue("SELECT COUNT(*) FROM TBGI_FILES_USER WHERE WORKED = 0 AND GUID <> " & My.Application.Globix.CURRENT_WORKFILE_GUID & " AND UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')")
My.Application.Globix.MULTIINDEXING_ACTIVE = False My.Application.Globix.MULTIINDEXING_ACTIVE = False
If MULTIFILES > 0 Then If MULTIFILES > 0 Then
If My.Application.User.Language = "de-DE" Then If My.Application.User.Language = "de-DE" Then
@ -228,7 +228,7 @@ Public Class frmGlobix_Index
End Sub End Sub
Private Sub SkipItem_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles SkipItem.ItemClick Private Sub SkipItem_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles SkipItem.ItemClick
My.Database.ExecuteNonQuery($"DELETE FROM TBGI_FILES_USER WHERE GUID = {My.Application.Globix.CURRENT_WORKFILE_GUID}") My.DatabaseECM.ExecuteNonQuery($"DELETE FROM TBGI_FILES_USER WHERE GUID = {My.Application.Globix.CURRENT_WORKFILE_GUID}")
CancelAttempts = 2 CancelAttempts = 2
Close() Close()
End Sub End Sub
@ -497,7 +497,7 @@ Public Class frmGlobix_Index
Dim oMeta = DirectCast(pControl.Tag, ControlMeta) Dim oMeta = DirectCast(pControl.Tag, ControlMeta)
Dim oIndexName As String = oMeta.IndexName Dim oIndexName As String = oMeta.IndexName
Dim oSQL = $"SELECT * FROM TBDD_INDEX_MAN WHERE SQL_RESULT LIKE '%{oIndexName}%' AND DOK_ID = {My.Application.Globix.CURRENT_DOCTYPE_ID}" Dim oSQL = $"SELECT * FROM TBDD_INDEX_MAN WHERE SQL_RESULT LIKE '%{oIndexName}%' AND DOK_ID = {My.Application.Globix.CURRENT_DOCTYPE_ID}"
Dim oDatatable As DataTable = My.Database.GetDatatable(oSQL) Dim oDatatable As DataTable = My.DatabaseECM.GetDatatable(oSQL)
If Not IsNothing(oDatatable) Then If Not IsNothing(oDatatable) Then
_Logger.Debug("Found [{0}] depending controls for [{1}]", oDatatable.Rows.Count, pControl.Name) _Logger.Debug("Found [{0}] depending controls for [{1}]", oDatatable.Rows.Count, pControl.Name)
@ -533,7 +533,7 @@ Public Class frmGlobix_Index
Dim oConnectionString = GetConnectionString(SqlConnectionId) Dim oConnectionString = GetConnectionString(SqlConnectionId)
Dim oDatatable As DataTable = My.Database.GetDatatableWithConnection(pSqlCommand, oConnectionString) Dim oDatatable As DataTable = My.DatabaseECM.GetDatatableWithConnection(pSqlCommand, oConnectionString)
Dim oFoundControl As Control = Nothing Dim oFoundControl As Control = Nothing
For Each oControl As Control In pnlIndex.Controls For Each oControl As Control In pnlIndex.Controls
@ -596,7 +596,7 @@ Public Class frmGlobix_Index
pSQLCommand = _Patterns.ReplaceInternalValues(pSQLCommand) pSQLCommand = _Patterns.ReplaceInternalValues(pSQLCommand)
pSQLCommand = _Patterns.ReplaceUserValues(pSQLCommand, My.Application.Globix.CURRENT_DOCTYPE_ID) pSQLCommand = _Patterns.ReplaceUserValues(pSQLCommand, My.Application.Globix.CURRENT_DOCTYPE_ID)
Dim oDatatable = My.Database.GetDatatableWithConnection(pSQLCommand, oConnectionString) Dim oDatatable = My.DatabaseECM.GetDatatableWithConnection(pSQLCommand, oConnectionString)
Return oDatatable Return oDatatable
End If End If
Else Else
@ -703,7 +703,7 @@ Public Class frmGlobix_Index
Try Try
My.Application.Globix.ABORT_INDEXING = True My.Application.Globix.ABORT_INDEXING = True
Dim sql As String = $"SELECT * FROM TBGI_FILES_USER WHERE WORKED = 0 AND UPPER(USER@WORK) = UPPER('{My.Application.User.UserName}')" Dim sql As String = $"SELECT * FROM TBGI_FILES_USER WHERE WORKED = 0 AND UPPER(USER@WORK) = UPPER('{My.Application.User.UserName}')"
Dim DT As DataTable = My.Database.GetDatatable(sql) Dim DT As DataTable = My.DatabaseECM.GetDatatable(sql)
Dim anz = DT.Rows.Count Dim anz = DT.Rows.Count
For Each Filerow As DataRow In DT.Rows For Each Filerow As DataRow In DT.Rows
@ -722,7 +722,7 @@ Public Class frmGlobix_Index
End If End If
Next Next
'Zuerst die Daten des Ablaufs löschen 'Zuerst die Daten des Ablaufs löschen
If My.Database.ExecuteNonQuery($"DELETE FROM TBGI_FILES_USER WHERE UPPER(USER@WORK) = UPPER('{My.Application.User.UserName}')") = True Then If My.DatabaseECM.ExecuteNonQuery($"DELETE FROM TBGI_FILES_USER WHERE UPPER(USER@WORK) = UPPER('{My.Application.User.UserName}')") = True Then
If containsfw_file = True Then If containsfw_file = True Then
If My.Application.User.Language = "de-DE" Then If My.Application.User.Language = "de-DE" Then
MsgBox("Der Indexierungsprozess beinhaltete (auch) Dateien per Folderwatch!" & vbNewLine & "Diese Dateien wurden nicht gelöscht und verbleiben im Folderwatch-Verzeichnis!" & vbNewLine & "Bitte verschieben Sie die Dateien ggfls.", MsgBoxStyle.Information, "Achtung - Hinweis:") MsgBox("Der Indexierungsprozess beinhaltete (auch) Dateien per Folderwatch!" & vbNewLine & "Diese Dateien wurden nicht gelöscht und verbleiben im Folderwatch-Verzeichnis!" & vbNewLine & "Bitte verschieben Sie die Dateien ggfls.", MsgBoxStyle.Information, "Achtung - Hinweis:")
@ -789,7 +789,7 @@ Public Class frmGlobix_Index
'Die erste Datei indexieren 'Die erste Datei indexieren
If WORK_FILE() = True Then If WORK_FILE() = True Then
'Und nun die folgenden 'Und nun die folgenden
Dim DTFiles2Work As DataTable = My.Database.GetDatatable("SELECT * FROM TBGI_FILES_USER WHERE WORKED = 0 AND GUID <> " & My.Application.Globix.CURRENT_WORKFILE_GUID & " AND UPPER(USER@WORK) = UPPER('" & My.Application.User.UserName & "')") Dim DTFiles2Work As DataTable = My.DatabaseECM.GetDatatable("SELECT * FROM TBGI_FILES_USER WHERE WORKED = 0 AND GUID <> " & My.Application.Globix.CURRENT_WORKFILE_GUID & " AND UPPER(USER@WORK) = UPPER('" & My.Application.User.UserName & "')")
If Not DTFiles2Work Is Nothing Then If Not DTFiles2Work Is Nothing Then
Dim err = False Dim err = False
For Each filerow As DataRow In DTFiles2Work.Rows For Each filerow As DataRow In DTFiles2Work.Rows
@ -876,7 +876,7 @@ Public Class frmGlobix_Index
My.Application.Globix.CURRENT_LASTDOCTYPE = oDokart.Name My.Application.Globix.CURRENT_LASTDOCTYPE = oDokart.Name
_Logger.Info("Datei '" & My.Application.Globix.CURRENT_NEWFILENAME & "' erfolgreich erzeugt.") _Logger.Info("Datei '" & My.Application.Globix.CURRENT_NEWFILENAME & "' erfolgreich erzeugt.")
Dim oDEL As String = "DELETE FROM TBGI_FILES_USER WHERE GUID = " & My.Application.Globix.CURRENT_WORKFILE_GUID Dim oDEL As String = "DELETE FROM TBGI_FILES_USER WHERE GUID = " & My.Application.Globix.CURRENT_WORKFILE_GUID
My.Database.ExecuteNonQuery(oDEL) My.DatabaseECM.ExecuteNonQuery(oDEL)
If My.Application.Globix.CURR_DELETE_ORIGIN = True Then If My.Application.Globix.CURR_DELETE_ORIGIN = True Then
_Logger.Info("Datei [" & My.Application.Globix.CURRENT_WORKFILE & "] wird gelöscht.") _Logger.Info("Datei [" & My.Application.Globix.CURRENT_WORKFILE & "] wird gelöscht.")
@ -1131,7 +1131,6 @@ Public Class frmGlobix_Index
CreateFolderForIndex(String.Empty) CreateFolderForIndex(String.Empty)
End If End If
Dim oIDBImportResult As Boolean = False Dim oIDBImportResult As Boolean = False
'Variable Folder 'Variable Folder
If DropType = "|DROPFROMFSYSTEM|" Or DropType = "|OUTLOOK_ATTACHMENT|" Or DropType = "|ATTMNTEXTRACTED|" Or DropType = "|FW_SIMPLEINDEXER|" Then If DropType = "|DROPFROMFSYSTEM|" Or DropType = "|OUTLOOK_ATTACHMENT|" Or DropType = "|ATTMNTEXTRACTED|" Or DropType = "|FW_SIMPLEINDEXER|" Then
@ -1152,20 +1151,20 @@ Public Class frmGlobix_Index
Dim tempCur_WF = My.Application.Globix.CURRENT_WORKFILE.Replace("'", "''") Dim tempCur_WF = My.Application.Globix.CURRENT_WORKFILE.Replace("'", "''")
Dim tempCur_New_FN = My.Application.Globix.CURRENT_NEWFILENAME.Replace("'", "''") Dim tempCur_New_FN = My.Application.Globix.CURRENT_NEWFILENAME.Replace("'", "''")
Insert_String = sql_history_INSERT_INTO & ",ADDED_WHO) VALUES ('" & tempCur_WF & "','" & tempCur_New_FN & "'" & sql_history_Index_Values & ",'" & Environment.UserDomainName & "\" & Environment.UserName & "')" Insert_String = sql_history_INSERT_INTO & ",ADDED_WHO) VALUES ('" & tempCur_WF & "','" & tempCur_New_FN & "'" & sql_history_Index_Values & ",'" & Environment.UserDomainName & "\" & Environment.UserName & "')"
My.Database.ExecuteNonQuery(Insert_String) My.DatabaseECM.ExecuteNonQuery(Insert_String)
If DropType.Contains("MSG") Or DropType = "|ATTMNTEXTRACTED|" Or DropType = "|OUTLOOK_ATTACHMENT|" Then If DropType.Contains("MSG") Or DropType = "|ATTMNTEXTRACTED|" Or DropType = "|OUTLOOK_ATTACHMENT|" Then
If My.Application.Globix.CURRENT_MESSAGEID <> "" Then If My.Application.Globix.CURRENT_MESSAGEID <> "" Then
Dim max As String = "SELECT MAX(GUID) FROM TBGI_HISTORY" Dim max As String = "SELECT MAX(GUID) FROM TBGI_HISTORY"
Dim GUID = My.Database.GetScalarValue(max) Dim GUID = My.DatabaseECM.GetScalarValue(max)
Try Try
If GUID > 0 Then If GUID > 0 Then
Dim sqlUpdate As String Dim sqlUpdate As String
If DropType = "|ATTMNTEXTRACTED|" Or DropType = "|OUTLOOK_ATTACHMENT|" Then If DropType = "|ATTMNTEXTRACTED|" Or DropType = "|OUTLOOK_ATTACHMENT|" Then
sqlUpdate = "Update TBGI_HISTORY SET ATTACHMENT = 1, MSG_ID = '" & My.Application.Globix.CURRENT_MESSAGEID & "' WHERE GUID = " & GUID sqlUpdate = "Update TBGI_HISTORY SET ATTACHMENT = 1, MSG_ID = '" & My.Application.Globix.CURRENT_MESSAGEID & "' WHERE GUID = " & GUID
My.Database.ExecuteNonQuery(sqlUpdate) My.DatabaseECM.ExecuteNonQuery(sqlUpdate)
Else Else
sqlUpdate = "Update TBGI_HISTORY SET ATTACHMENT = 0, MSG_ID = '" & My.Application.Globix.CURRENT_MESSAGEID & "' WHERE GUID = " & GUID sqlUpdate = "Update TBGI_HISTORY SET ATTACHMENT = 0, MSG_ID = '" & My.Application.Globix.CURRENT_MESSAGEID & "' WHERE GUID = " & GUID
My.Database.ExecuteNonQuery(sqlUpdate) My.DatabaseECM.ExecuteNonQuery(sqlUpdate)
End If End If
End If End If
Catch ex As Exception Catch ex As Exception
@ -1194,6 +1193,8 @@ Public Class frmGlobix_Index
NI_TITLE = "Error Globix-Import" NI_TITLE = "Error Globix-Import"
NI_MESSAGE = "The import was not successful - Check LogFile" NI_MESSAGE = "The import was not successful - Check LogFile"
End If End If
MsgBox(NI_MESSAGE, MsgBoxStyle.Critical, NI_TITLE)
End If End If
'False oder True zurückgeben 'False oder True zurückgeben
@ -1225,9 +1226,9 @@ Public Class frmGlobix_Index
Return True Return True
End If End If
End If End If
Else
Return False
End If End If
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
Return False Return False
@ -1250,19 +1251,19 @@ Public Class frmGlobix_Index
Dim tempCur_WF = My.Application.Globix.CURRENT_WORKFILE.Replace("'", "''") Dim tempCur_WF = My.Application.Globix.CURRENT_WORKFILE.Replace("'", "''")
Dim tempCur_New_FN = My.Application.Globix.CURRENT_NEWFILENAME.Replace("'", "''") Dim tempCur_New_FN = My.Application.Globix.CURRENT_NEWFILENAME.Replace("'", "''")
Insert_String = sql_history_INSERT_INTO & ",ADDED_WHO,ADDED_WHERE) VALUES ('" & tempCur_WF & "','" & tempCur_New_FN & "'" & sql_history_Index_Values & ",'" & Environment.UserDomainName & "\" & Environment.UserName & "','" & Environment.MachineName & "')" Insert_String = sql_history_INSERT_INTO & ",ADDED_WHO,ADDED_WHERE) VALUES ('" & tempCur_WF & "','" & tempCur_New_FN & "'" & sql_history_Index_Values & ",'" & Environment.UserDomainName & "\" & Environment.UserName & "','" & Environment.MachineName & "')"
If My.Database.ExecuteNonQuery(Insert_String) = True Then If My.DatabaseECM.ExecuteNonQuery(Insert_String) = True Then
If My.Application.Globix.CURRENT_MESSAGEID <> "" Then If My.Application.Globix.CURRENT_MESSAGEID <> "" Then
Dim oMax As String = "SELECT MAX(GUID) FROM TBGI_HISTORY" Dim oMax As String = "SELECT MAX(GUID) FROM TBGI_HISTORY"
Dim oGUID = My.Database.GetScalarValue(oMax) Dim oGUID = My.DatabaseECM.GetScalarValue(oMax)
Try Try
If oGUID > 0 Then If oGUID > 0 Then
Dim oSql As String Dim oSql As String
If My.Application.Globix.CURRENT_ISATTACHMENT = True Then If My.Application.Globix.CURRENT_ISATTACHMENT = True Then
oSql = "Update TBGI_HISTORY SET ATTACHMENT = 1, MSG_ID = '" & My.Application.Globix.CURRENT_MESSAGEID & "' WHERE GUID = " & oGUID oSql = "Update TBGI_HISTORY SET ATTACHMENT = 1, MSG_ID = '" & My.Application.Globix.CURRENT_MESSAGEID & "' WHERE GUID = " & oGUID
My.Database.GetScalarValue(oSql) My.DatabaseECM.GetScalarValue(oSql)
Else Else
oSql = "Update TBGI_HISTORY SET ATTACHMENT = 0, MSG_ID = '" & My.Application.Globix.CURRENT_MESSAGEID & "' WHERE GUID = " & oGUID oSql = "Update TBGI_HISTORY SET ATTACHMENT = 0, MSG_ID = '" & My.Application.Globix.CURRENT_MESSAGEID & "' WHERE GUID = " & oGUID
My.Database.GetScalarValue(oSql) My.DatabaseECM.GetScalarValue(oSql)
End If End If
End If End If
Catch ex As Exception Catch ex As Exception
@ -1772,7 +1773,7 @@ Public Class frmGlobix_Index
Private Function SetAttachmentIndices() Private Function SetAttachmentIndices()
Dim indexierung_erfolgreich As Boolean = True Dim indexierung_erfolgreich As Boolean = True
Try Try
Dim DT As DataTable = My.Database.GetDatatable("SELECT * FROM TBGI_OBJECTTYPE_EMAIL_INDEX WHERE OBJECTTYPE = 'DEFAULT'") Dim DT As DataTable = My.DatabaseECM.GetDatatable("SELECT * FROM TBGI_OBJECTTYPE_EMAIL_INDEX WHERE OBJECTTYPE = 'DEFAULT'")
If DT.Rows.Count = 1 Then If DT.Rows.Count = 1 Then
If Not My.Application.Globix.CURRENT_MESSAGEID Is Nothing Then If Not My.Application.Globix.CURRENT_MESSAGEID Is Nothing Then
@ -1824,7 +1825,7 @@ Public Class frmGlobix_Index
If oRow.Item("SQL_CHECK").ToString <> String.Empty Then If oRow.Item("SQL_CHECK").ToString <> String.Empty Then
Dim connectionString As String Dim connectionString As String
Dim sql As String Dim sql As String
connectionString = My.Database.Get_ConnectionStringforID(oRow.Item("CONNECTION_ID")) connectionString = My.DatabaseECM.Get_ConnectionStringforID(oRow.Item("CONNECTION_ID"))
If connectionString <> "" Then If connectionString <> "" Then
Dim sqlscalar = oRow.Item("SQL_CHECK") Dim sqlscalar = oRow.Item("SQL_CHECK")
Select Case oRow.Item("DATENTYP") Select Case oRow.Item("DATENTYP")
@ -1840,7 +1841,7 @@ Public Class frmGlobix_Index
' ergebnis = ClassDatabase.OracleExecute_Scalar(sql, connectionString) ' ergebnis = ClassDatabase.OracleExecute_Scalar(sql, connectionString)
'Else 'Else
'MSQL 'MSQL
ergebnis = My.Database.GetScalarValueWithConnection(sql, connectionString) ergebnis = My.DatabaseECM.GetScalarValueWithConnection(sql, connectionString)
' End If ' End If
Select Case ergebnis Select Case ergebnis
@ -2007,7 +2008,7 @@ Public Class frmGlobix_Index
Function GetAutomaticIndexSQLValue(SQLCommand As String, vconnectionID As Integer, vProvider As String) As String Function GetAutomaticIndexSQLValue(SQLCommand As String, vconnectionID As Integer, vProvider As String) As String
Try Try
Dim oConnectionString As String Dim oConnectionString As String
oConnectionString = My.Database.Get_ConnectionStringforID(vconnectionID) oConnectionString = My.DatabaseECM.Get_ConnectionStringforID(vconnectionID)
If oConnectionString <> "" Then If oConnectionString <> "" Then
'NEU 'NEU
Dim oErgebnis Dim oErgebnis
@ -2015,7 +2016,7 @@ Public Class frmGlobix_Index
'If vProvider.ToLower = "oracle" Then 'If vProvider.ToLower = "oracle" Then
'oErgebnis = My.Database.leExecute_Scalar(SQLCommand, oConnectionString) 'oErgebnis = My.Database.leExecute_Scalar(SQLCommand, oConnectionString)
'Else 'im Moment nur SQL-Server 'Else 'im Moment nur SQL-Server
oErgebnis = My.Database.GetScalarValueWithConnection(SQLCommand, oConnectionString) oErgebnis = My.DatabaseECM.GetScalarValueWithConnection(SQLCommand, oConnectionString)
'End If 'End If
_Logger.Debug("SQL-ConnectionString: " & oConnectionString.Substring(0, oConnectionString.LastIndexOf("="))) _Logger.Debug("SQL-ConnectionString: " & oConnectionString.Substring(0, oConnectionString.LastIndexOf("=")))
If oErgebnis Is Nothing Then If oErgebnis Is Nothing Then
@ -2120,7 +2121,7 @@ Public Class frmGlobix_Index
End If End If
Next Next
Dim DT As DataTable = My.Database.GetDatatable("SELECT * FROM TBGI_OBJECTTYPE_EMAIL_INDEX WHERE OBJECTTYPE = 'DEFAULT'") Dim DT As DataTable = My.DatabaseECM.GetDatatable("SELECT * FROM TBGI_OBJECTTYPE_EMAIL_INDEX WHERE OBJECTTYPE = 'DEFAULT'")
If IsNothing(DT) Then If IsNothing(DT) Then
_Logger.Info("SELECT * FROM TBGI_OBJECTTYPE_EMAIL_INDEX RESULTED in NOTHING") _Logger.Info("SELECT * FROM TBGI_OBJECTTYPE_EMAIL_INDEX RESULTED in NOTHING")
Return False Return False

View File

@ -2,7 +2,7 @@
Private Sub frmGlobixIndexFileList_Load(sender As Object, e As EventArgs) Handles Me.Load Private Sub frmGlobixIndexFileList_Load(sender As Object, e As EventArgs) Handles Me.Load
Try Try
Dim oSQL = $"Select * From TBGI_FILES_USER Where WORKED = 0 And (UPPER([USER@WORK]) = UPPER('{My.Application.User.UserName}'))" Dim oSQL = $"Select * From TBGI_FILES_USER Where WORKED = 0 And (UPPER([USER@WORK]) = UPPER('{My.Application.User.UserName}'))"
Dim oDT As DataTable = My.Database.GetDatatable(oSQL) Dim oDT As DataTable = My.DatabaseECM.GetDatatable(oSQL)
If oDT.Rows.Count > 0 Then If oDT.Rows.Count > 0 Then
CheckedListBox1.DataSource = oDT CheckedListBox1.DataSource = oDT
CheckedListBox1.DisplayMember = oDT.Columns("FILENAME_ONLY").ColumnName CheckedListBox1.DisplayMember = oDT.Columns("FILENAME_ONLY").ColumnName

View File

@ -2,7 +2,7 @@
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Database Imports DigitalData.Modules.Database
Imports DigitalData.Modules.ZooFlow Imports DigitalData.Modules.ZooFlow
Imports DigitalData.Modules.EDMI.API
Namespace My Namespace My
''' <summary> ''' <summary>
@ -28,10 +28,16 @@ Namespace My
Property LogConfig As LogConfig Property LogConfig As LogConfig
Property MainForm As frmAdmin_Start Property MainForm As frmAdmin_Start
Property SearchForm As frmSearchStart Property SearchForm As frmSearchStart
Property Database As MSSQLServer
#Region "Database"
Property Database As DatabaseWithFallback
Property DatabaseECM As MSSQLServer
Property DatabaseIDB As MSSQLServer Property DatabaseIDB As MSSQLServer
Property Tables As New ClassTables Property Tables As New ClassTables
Property Queries As New ClassQueries Property Queries As New ClassQueries
#End Region
Property Filestore_Work As String Property Filestore_Work As String
Property Filestore_Archive As String Property Filestore_Archive As String
End Module End Module
@ -56,7 +62,7 @@ Namespace My
Public Function GetEnvironment() As Environment Public Function GetEnvironment() As Environment
Return New Environment With { Return New Environment With {
.Database = My.Database, .Database = My.DatabaseECM,
.DatabaseIDB = My.DatabaseIDB, .DatabaseIDB = My.DatabaseIDB,
.Modules = My.Application.Modules, .Modules = My.Application.Modules,
.Service = My.Application.Service, .Service = My.Application.Service,

View File

@ -1,10 +1,12 @@
Imports DigitalData.Modules.Logging Imports DevExpress.XtraEditors
Imports DevExpress.XtraEditors
Imports DigitalData.GUIs.Common
Imports DevExpress.XtraSplashScreen Imports DevExpress.XtraSplashScreen
Imports DevExpress.XtraBars Imports DevExpress.XtraBars
Imports DigitalData.GUIs.ZooFlow.ClassConstants
Imports DevExpress.Utils Imports DevExpress.Utils
Imports DigitalData.GUIs.Common
Imports DigitalData.GUIs.ZooFlow.ClassConstants
Imports DigitalData.Modules.EDMI.API
Imports DigitalData.Modules.EDMI.API.Constants
Imports DigitalData.Modules.Logging
Public Class frmFlowSearch Public Class frmFlowSearch
Private Logger As Logger Private Logger As Logger
@ -12,26 +14,26 @@ Public Class frmFlowSearch
Private FontLargeNormal As New Font("Segoe UI", 10) Private FontLargeNormal As New Font("Segoe UI", 10)
Private SecondaryFontBold As New Font("Segoe UI", 8, FontStyle.Bold) Private SecondaryFontBold As New Font("Segoe UI", 8, FontStyle.Bold)
Private SecondaryFont As New Font("Segoe UI", 8) Private SecondaryFont As New Font("Segoe UI", 8)
Dim oLastAttribute As String = "" Private oLastAttribute As String = ""
Dim oAttributeCount As Integer = 1 Private oAttributeCount As Integer = 1
Dim BASE_SEARCHCommand As String Private BaseSearchCommand As String
Private LastSearchForm As frmDocumentResultList Private LastSearchForm As frmDocumentResultList
Private ASorDB As ClassDataASorDB Private Database As DatabaseWithFallback
Private EventtoggleChange As Boolean = False Private EventtoggleChange As Boolean = False
Private SEARCH_FACT_DATE As String = "MONTH(OBJ.ADDED_WHEN) <> 13"
Private SEARCH_FACT_DATE_ATTRIBUTE = "ADDED_WHEN"
Private Language_Term_Object As String Private Language_Term_Object As String
Private LIMITATION_DATE As Boolean = False Private LIMITATION_DATE As Boolean = False
Private TOGGLE_Change As Boolean = False Private TOGGLE_Change As Boolean = False
Private CATEGORIES_SELECTED As String = "" Private CATEGORIES_SELECTED As String = ""
Private SEARCH_FACT_DATE As String = "MONTH(OBJ.ADDED_WHEN) <> 13"
Private SEARCH_FACT_DATE_ATTRIBUTE = "ADDED_WHEN"
Public Sub New(pBaseSearchSql As String) Public Sub New(pBaseSearchSql As String)
' Dieser Aufruf ist für den Designer erforderlich. ' Dieser Aufruf ist für den Designer erforderlich.
InitializeComponent() InitializeComponent()
BASE_SEARCHCommand = pBaseSearchSql
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu. BaseSearchCommand = pBaseSearchSql
Logger = My.LogConfig.GetLogger() Logger = My.LogConfig.GetLogger()
ASorDB = New ClassDataASorDB(My.LogConfig) Database = New DatabaseWithFallback(My.LogConfig, My.Application.Service.Client, My.DatabaseECM, My.DatabaseIDB)
If My.Application.User.Language = "de-DE" Then If My.Application.User.Language = "de-DE" Then
Language_Term_Object = "Objekte" Language_Term_Object = "Objekte"
Else Else
@ -43,7 +45,11 @@ Public Class frmFlowSearch
RibbonControl1.Minimized = True RibbonControl1.Minimized = True
TileControlMatch.Groups.Clear() TileControlMatch.Groups.Clear()
Dim oSQL = "select DISTINCT TERM_VALUE AS CATEGORY ,ATTRIBUTE_ID from VWIDB_CATEGORIES_PER_OBJECT_AND_LANGUAGE WHERE LANGUAGE_ID = @LANGUAGE_ID ORDER BY TERM_VALUE" Dim oSQL = "select DISTINCT TERM_VALUE AS CATEGORY ,ATTRIBUTE_ID from VWIDB_CATEGORIES_PER_OBJECT_AND_LANGUAGE WHERE LANGUAGE_ID = @LANGUAGE_ID ORDER BY TERM_VALUE"
Dim oDTCategory As DataTable = ASorDB.GetDatatable("IDB", $"SELECT 'NONE' as CATEGORY", "VWIDB_CATEGORIES_PER_OBJECT_AND_LANGUAGE", "", "CATEGORY")
'Dim oDTCategory As DataTable = ASorDB.GetDatatable("IDB", $"SELECT 'NONE' as CATEGORY", "VWIDB_CATEGORIES_PER_OBJECT_AND_LANGUAGE", "", "CATEGORY")
Dim oDTCategory As DataTable = Database.GetDatatable("VWIDB_CATEGORIES_PER_OBJECT_AND_LANGUAGE", "SELECT 'NONE' as CATEGORY", DatabaseType.IDB, "", "CATEGORY")
If Not IsNothing(oDTCategory) Then If Not IsNothing(oDTCategory) Then
CheckedListBoxCategories.DataSource = oDTCategory CheckedListBoxCategories.DataSource = oDTCategory
CheckedListBoxCategories.DisplayMember = "CATEGORY" CheckedListBoxCategories.DisplayMember = "CATEGORY"
@ -53,7 +59,9 @@ Public Class frmFlowSearch
Else Else
cmbAttributeDate.Items.Add(IDB_ADDED_WHEN_String_Englisch) cmbAttributeDate.Items.Add(IDB_ADDED_WHEN_String_Englisch)
End If End If
Dim oDT As DataTable = ASorDB.GetDatatable("IDB", $"SELECT * FROM VWIDB_BE_ATTRIBUTE WHERE TYPE_ID = 5 AND LANG_ID = {My.Application.User.LanguageID}", "VWIDB_BE_ATTRIBUTE", $"TYPE_ID = 5 AND LANG_ID = {My.Application.User.LanguageID}") 'Dim oDT As DataTable = ASorDB.GetDatatable("IDB", $"SELECT * FROM VWIDB_BE_ATTRIBUTE WHERE TYPE_ID = 5 AND LANG_ID = {My.Application.User.LanguageID}", "VWIDB_BE_ATTRIBUTE", $"TYPE_ID = 5 AND LANG_ID = {My.Application.User.LanguageID}")
Dim oDT As DataTable = Database.GetDatatable("VWIDB_BE_ATTRIBUTE", $"SELECT * FROM VWIDB_BE_ATTRIBUTE WHERE TYPE_ID = 5 AND LANG_ID = {My.Application.User.LanguageID}", DatabaseType.IDB, $"TYPE_ID = 5 AND LANG_ID = {My.Application.User.LanguageID}")
For Each oRow As DataRow In oDT.Rows For Each oRow As DataRow In oDT.Rows
cmbAttributeDate.Items.Add(oRow.Item("ATTR_TITLE")) cmbAttributeDate.Items.Add(oRow.Item("ATTR_TITLE"))
Next Next
@ -90,7 +98,7 @@ Public Class frmFlowSearch
Dim oSearchValue = Trim(txtSearchTerm.Text) Dim oSearchValue = Trim(txtSearchTerm.Text)
oLastAttribute = "" oLastAttribute = ""
Dim oSQL = BASE_SEARCHCommand.Replace("@SEARCH_STRING", oSearchValue) Dim oSQL = BaseSearchCommand.Replace("@SEARCH_STRING", oSearchValue)
If SEARCH_FACT_DATE_ATTRIBUTE = "ADDED_WHEN" Then If SEARCH_FACT_DATE_ATTRIBUTE = "ADDED_WHEN" Then
@ -213,7 +221,7 @@ Public Class frmFlowSearch
Dim oEnvironment As New Modules.ZooFlow.Environment() With { Dim oEnvironment As New Modules.ZooFlow.Environment() With {
.User = My.Application.User, .User = My.Application.User,
.Modules = My.Application.Modules, .Modules = My.Application.Modules,
.Database = My.Database, .Database = My.DatabaseECM,
.DatabaseIDB = My.DatabaseIDB, .DatabaseIDB = My.DatabaseIDB,
.Settings = My.Application.Settings, .Settings = My.Application.Settings,
.Service = My.Application.Service .Service = My.Application.Service
@ -365,7 +373,10 @@ Public Class frmFlowSearch
Dim oSplit = oItem.Tag.ToString.Split("|") Dim oSplit = oItem.Tag.ToString.Split("|")
Try Try
oHandle = SplashScreenManager.ShowOverlayForm(Me) oHandle = SplashScreenManager.ShowOverlayForm(Me)
Dim oDT As DataTable = ASorDB.GetDatatable("IDB", $"SELECT * FROM VWIDB_BE_ATTRIBUTE WHERE ATTR_ID = {oSplit(1)} AND LANG_ID = {My.Application.User.LanguageID}", "VWIDB_BE_ATTRIBUTE", $"ATTR_ID = {oSplit(1)} AND LANG_ID = {My.Application.User.LanguageID}")
'Dim oDT As DataTable = ASorDB.GetDatatable("IDB", $"SELECT * FROM VWIDB_BE_ATTRIBUTE WHERE ATTR_ID = {oSplit(1)} AND LANG_ID = {My.Application.User.LanguageID}", "VWIDB_BE_ATTRIBUTE", $"ATTR_ID = {oSplit(1)} AND LANG_ID = {My.Application.User.LanguageID}")
Dim oDT As DataTable = Database.GetDatatable("VWIDB_BE_ATTRIBUTE", $"SELECT * FROM VWIDB_BE_ATTRIBUTE WHERE ATTR_ID = {oSplit(1)} AND LANG_ID = {My.Application.User.LanguageID}", DatabaseType.IDB, $"ATTR_ID = {oSplit(1)} AND LANG_ID = {My.Application.User.LanguageID}")
Dim oType = oDT.Rows(0).Item("TYPE_NAME") Dim oType = oDT.Rows(0).Item("TYPE_NAME")
Dim oEXECSQL = $"EXEC PRFLOW_SEARCH_GET_RESULT_PER_TILE {oSplit(0)},{My.Application.User.UserId},'{oType}',{oSplit(1)},'{My.Application.User.Language}'" Dim oEXECSQL = $"EXEC PRFLOW_SEARCH_GET_RESULT_PER_TILE {oSplit(0)},{My.Application.User.UserId},'{oType}',{oSplit(1)},'{My.Application.User.Language}'"
Dim oDTOBJECT_RESULT As DataTable = My.DatabaseIDB.GetDatatable(oEXECSQL) Dim oDTOBJECT_RESULT As DataTable = My.DatabaseIDB.GetDatatable(oEXECSQL)

View File

@ -942,7 +942,7 @@ Public Class frmSearchStart
Dim oEnvironment As New Modules.ZooFlow.Environment() With { Dim oEnvironment As New Modules.ZooFlow.Environment() With {
.User = My.Application.User, .User = My.Application.User,
.Modules = My.Application.Modules, .Modules = My.Application.Modules,
.Database = My.Database, .Database = My.DatabaseECM,
.DatabaseIDB = My.DatabaseIDB, .DatabaseIDB = My.DatabaseIDB,
.Settings = My.Application.Settings, .Settings = My.Application.Settings,
.Service = My.Application.Service .Service = My.Application.Service

View File

@ -49,7 +49,7 @@ Public Class frmFlowForm
Private IndexForm As frmGlobix_Index Private IndexForm As frmGlobix_Index
Private AdminForm As frmAdmin_Start Private AdminForm As frmAdmin_Start
Private Const mSnapOffset As Integer = 35 Private Const mSnapOffset As Integer = 35
Private Const WM_WINDOWPOSCHANGING As Integer = &H46
' Events ' Events
Public Event ClipboardChanged As EventHandler(Of IDataObject) Public Event ClipboardChanged As EventHandler(Of IDataObject)
@ -77,6 +77,8 @@ Public Class frmFlowForm
' === Initialize AppServer Database Connection with Failover ' === Initialize AppServer Database Connection with Failover
AppServerOrDB = New ClassDataASorDB(My.LogConfig) AppServerOrDB = New ClassDataASorDB(My.LogConfig)
' === Initialization === ' === Initialization ===
Init = New ClassInit(My.LogConfig, Me) Init = New ClassInit(My.LogConfig, Me)
AddHandler Init.Completed, AddressOf Init_Completed AddHandler Init.Completed, AddressOf Init_Completed
@ -327,7 +329,7 @@ Public Class frmFlowForm
Try Try
Dim oSql As String = "SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE FOLDER_TYPE = 'SCAN' AND USER_ID = " & My.Application.User.UserId Dim oSql As String = "SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE FOLDER_TYPE = 'SCAN' AND USER_ID = " & My.Application.User.UserId
Dim oFolderwatchScanPath = My.Database.GetScalarValue(oSql) Dim oFolderwatchScanPath = My.DatabaseECM.GetScalarValue(oSql)
oFolderwatchScanPath = IIf(IsDBNull(oFolderwatchScanPath), "", oFolderwatchScanPath) oFolderwatchScanPath = IIf(IsDBNull(oFolderwatchScanPath), "", oFolderwatchScanPath)
@ -565,7 +567,7 @@ Public Class frmFlowForm
End If End If
'Erstmal alles löschen 'Erstmal alles löschen
My.Database.ExecuteNonQuery("DELETE FROM TBGI_FILES_USER WHERE UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')") My.DatabaseECM.ExecuteNonQuery("DELETE FROM TBGI_FILES_USER WHERE UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')")
If FileDrop.Drop_File(e) = True Then If FileDrop.Drop_File(e) = True Then
TimerCheckDroppedFiles.Start() TimerCheckDroppedFiles.Start()
@ -590,7 +592,7 @@ Public Class frmFlowForm
End Sub End Sub
Sub Globix_Check_Dropped_Files() Sub Globix_Check_Dropped_Files()
Try Try
My.Database.ExecuteNonQuery("DELETE FROM TBGI_FILES_USER WHERE WORKED = 1 AND UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')") My.DatabaseECM.ExecuteNonQuery("DELETE FROM TBGI_FILES_USER WHERE WORKED = 1 AND UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')")
Dim i As Integer Dim i As Integer
For Each Str As Object In FileDrop.files_dropped For Each Str As Object In FileDrop.files_dropped
@ -610,7 +612,7 @@ Public Class frmFlowForm
Dim sql As String = "SELECT * FROM TBGI_FILES_USER WHERE WORKED = 0 AND UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')" Dim sql As String = "SELECT * FROM TBGI_FILES_USER WHERE WORKED = 0 AND UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')"
My.Application.Globix.DTACTUAL_FILES = Nothing My.Application.Globix.DTACTUAL_FILES = Nothing
My.Application.Globix.DTACTUAL_FILES = My.Database.GetDatatable(sql) My.Application.Globix.DTACTUAL_FILES = My.DatabaseECM.GetDatatable(sql)
My.Application.Globix.ABORT_INDEXING = False My.Application.Globix.ABORT_INDEXING = False
Dim oOnlyFilesFromFilesystem = True Dim oOnlyFilesFromFilesystem = True
@ -624,7 +626,7 @@ Public Class frmFlowForm
If My.Application.Globix.DTACTUAL_FILES.Rows.Count > 1 And oOnlyFilesFromFilesystem = False Then If My.Application.Globix.DTACTUAL_FILES.Rows.Count > 1 And oOnlyFilesFromFilesystem = False Then
frmGlobix_IndexFileList.ShowDialog() frmGlobix_IndexFileList.ShowDialog()
My.Application.Globix.DTACTUAL_FILES = Nothing My.Application.Globix.DTACTUAL_FILES = Nothing
My.Application.Globix.DTACTUAL_FILES = My.Database.GetDatatable(sql) My.Application.Globix.DTACTUAL_FILES = My.DatabaseECM.GetDatatable(sql)
End If End If
For Each oFileRow As DataRow In My.Application.Globix.DTACTUAL_FILES.Rows For Each oFileRow As DataRow In My.Application.Globix.DTACTUAL_FILES.Rows
@ -797,7 +799,7 @@ Public Class frmFlowForm
If My.Application.Globix.Folderwatchstarted = True Or My.UIConfig.Globix.FolderWatchScanStarted = True Then If My.Application.Globix.Folderwatchstarted = True Or My.UIConfig.Globix.FolderWatchScanStarted = True Then
'Prüfen ob alle Files abgearbeitet wurden 'Prüfen ob alle Files abgearbeitet wurden
Dim sql = "SELECT * FROM TBGI_FILES_USER WHERE WORKED = 0 AND HANDLE_TYPE like '%|FW%' AND UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')" Dim sql = "SELECT * FROM TBGI_FILES_USER WHERE WORKED = 0 AND HANDLE_TYPE like '%|FW%' AND UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')"
My.Application.Globix.DTACTUAL_FILES = My.Database.GetDatatable(sql) My.Application.Globix.DTACTUAL_FILES = My.DatabaseECM.GetDatatable(sql)
If My.Application.Globix.DTACTUAL_FILES.Rows.Count > 0 Then If My.Application.Globix.DTACTUAL_FILES.Rows.Count > 0 Then
My.Application.Globix.ABORT_INDEXING = False My.Application.Globix.ABORT_INDEXING = False
@ -821,7 +823,7 @@ Public Class frmFlowForm
Else Else
Logger.Info(" File not existing - Row will be deleted!") Logger.Info(" File not existing - Row will be deleted!")
Dim oDel = String.Format("DELETE FROM TBGI_FILES_USER WHERE GUID = {0}", FILEGUID) Dim oDel = String.Format("DELETE FROM TBGI_FILES_USER WHERE GUID = {0}", FILEGUID)
My.Database.ExecuteNonQuery(oDel) My.DatabaseECM.ExecuteNonQuery(oDel)
End If End If
Else Else
Logger.Info(" file '" & row.Item(1).ToString & "' could not be opened exclusively - fileInUse!") Logger.Info(" file '" & row.Item(1).ToString & "' could not be opened exclusively - fileInUse!")

View File

@ -22,17 +22,9 @@ Partial Class frmtest
'Das Bearbeiten mit dem Code-Editor ist nicht möglich. 'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _ <System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent() Private Sub InitializeComponent()
Me.txtFilestoreType = New System.Windows.Forms.TextBox()
Me.Button1 = New System.Windows.Forms.Button()
Me.txtIDBFOPath = New System.Windows.Forms.TextBox()
Me.txtDate = New System.Windows.Forms.TextBox()
Me.Label2 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label()
Me.Label3 = New System.Windows.Forms.Label()
Me.Button2 = New System.Windows.Forms.Button()
Me.txtIDB_OBJ_ID = New System.Windows.Forms.TextBox() Me.txtIDB_OBJ_ID = New System.Windows.Forms.TextBox()
Me.Button3 = New System.Windows.Forms.Button()
Me.txtFile2Import = New System.Windows.Forms.TextBox() Me.txtFile2Import = New System.Windows.Forms.TextBox()
Me.Label1 = New System.Windows.Forms.Label()
Me.Button4 = New System.Windows.Forms.Button() Me.Button4 = New System.Windows.Forms.Button()
Me.Button5 = New System.Windows.Forms.Button() Me.Button5 = New System.Windows.Forms.Button()
Me.CheckBoxKeepExtension = New System.Windows.Forms.CheckBox() Me.CheckBoxKeepExtension = New System.Windows.Forms.CheckBox()
@ -40,103 +32,45 @@ Partial Class frmtest
Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog() Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog()
Me.Button7 = New System.Windows.Forms.Button() Me.Button7 = New System.Windows.Forms.Button()
Me.Button8 = New System.Windows.Forms.Button() Me.Button8 = New System.Windows.Forms.Button()
Me.Label4 = New System.Windows.Forms.Label()
Me.Label5 = New System.Windows.Forms.Label()
Me.cmbObjectStoreType = New System.Windows.Forms.ComboBox()
Me.DateTimePicker1 = New System.Windows.Forms.DateTimePicker()
Me.Label6 = New System.Windows.Forms.Label()
Me.TextBox1 = New System.Windows.Forms.TextBox()
Me.Label1 = New System.Windows.Forms.Label()
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
Me.GroupBox1.SuspendLayout()
Me.SuspendLayout() Me.SuspendLayout()
' '
'txtFilestoreType
'
Me.txtFilestoreType.Location = New System.Drawing.Point(16, 62)
Me.txtFilestoreType.Name = "txtFilestoreType"
Me.txtFilestoreType.Size = New System.Drawing.Size(100, 20)
Me.txtFilestoreType.TabIndex = 2
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(152, 58)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(137, 23)
Me.Button1.TabIndex = 3
Me.Button1.Text = "2. GetFileName"
Me.Button1.UseVisualStyleBackColor = True
'
'txtIDBFOPath
'
Me.txtIDBFOPath.Location = New System.Drawing.Point(152, 87)
Me.txtIDBFOPath.Name = "txtIDBFOPath"
Me.txtIDBFOPath.ReadOnly = True
Me.txtIDBFOPath.Size = New System.Drawing.Size(495, 20)
Me.txtIDBFOPath.TabIndex = 4
'
'txtDate
'
Me.txtDate.Location = New System.Drawing.Point(16, 101)
Me.txtDate.Name = "txtDate"
Me.txtDate.Size = New System.Drawing.Size(100, 20)
Me.txtDate.TabIndex = 5
'
'Label2 'Label2
' '
Me.Label2.AutoSize = True Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(16, 43) Me.Label2.Location = New System.Drawing.Point(9, 66)
Me.Label2.Name = "Label2" Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(72, 13) Me.Label2.Size = New System.Drawing.Size(72, 13)
Me.Label2.TabIndex = 6 Me.Label2.TabIndex = 6
Me.Label2.Text = "FileStoreType" Me.Label2.Text = "FileStoreType"
' '
'Label3
'
Me.Label3.AutoSize = True
Me.Label3.Location = New System.Drawing.Point(16, 85)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(30, 13)
Me.Label3.TabIndex = 7
Me.Label3.Text = "Date"
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(12, 12)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(277, 23)
Me.Button2.TabIndex = 8
Me.Button2.Text = "1. Get IDB_OBJ_ID"
Me.Button2.UseVisualStyleBackColor = True
'
'txtIDB_OBJ_ID 'txtIDB_OBJ_ID
' '
Me.txtIDB_OBJ_ID.DataBindings.Add(New System.Windows.Forms.Binding("Text", Global.DigitalData.GUIs.ZooFlow.Settings.Default, "IDBOBJID", True, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)) Me.txtIDB_OBJ_ID.DataBindings.Add(New System.Windows.Forms.Binding("Text", Global.DigitalData.GUIs.ZooFlow.Settings.Default, "IDBOBJID", True, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged))
Me.txtIDB_OBJ_ID.Location = New System.Drawing.Point(295, 14) Me.txtIDB_OBJ_ID.Location = New System.Drawing.Point(137, 38)
Me.txtIDB_OBJ_ID.Name = "txtIDB_OBJ_ID" Me.txtIDB_OBJ_ID.Name = "txtIDB_OBJ_ID"
Me.txtIDB_OBJ_ID.Size = New System.Drawing.Size(100, 20) Me.txtIDB_OBJ_ID.Size = New System.Drawing.Size(100, 20)
Me.txtIDB_OBJ_ID.TabIndex = 9 Me.txtIDB_OBJ_ID.TabIndex = 9
Me.txtIDB_OBJ_ID.Text = Global.DigitalData.GUIs.ZooFlow.Settings.Default.IDBOBJID Me.txtIDB_OBJ_ID.Text = Global.DigitalData.GUIs.ZooFlow.Settings.Default.IDBOBJID
' '
'Button3
'
Me.Button3.Location = New System.Drawing.Point(16, 188)
Me.Button3.Name = "Button3"
Me.Button3.Size = New System.Drawing.Size(175, 23)
Me.Button3.TabIndex = 10
Me.Button3.Text = "3. Import/StreamFile"
Me.Button3.UseVisualStyleBackColor = True
'
'txtFile2Import 'txtFile2Import
' '
Me.txtFile2Import.Location = New System.Drawing.Point(16, 162) Me.txtFile2Import.Location = New System.Drawing.Point(137, 12)
Me.txtFile2Import.Name = "txtFile2Import" Me.txtFile2Import.Name = "txtFile2Import"
Me.txtFile2Import.Size = New System.Drawing.Size(551, 20) Me.txtFile2Import.Size = New System.Drawing.Size(426, 20)
Me.txtFile2Import.TabIndex = 11 Me.txtFile2Import.TabIndex = 11
' '
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(16, 143)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(58, 13)
Me.Label1.TabIndex = 12
Me.Label1.Text = "File2Import"
'
'Button4 'Button4
' '
Me.Button4.Location = New System.Drawing.Point(16, 234) Me.Button4.Location = New System.Drawing.Point(16, 345)
Me.Button4.Name = "Button4" Me.Button4.Name = "Button4"
Me.Button4.Size = New System.Drawing.Size(286, 23) Me.Button4.Size = New System.Drawing.Size(286, 23)
Me.Button4.TabIndex = 13 Me.Button4.TabIndex = 13
@ -145,7 +79,7 @@ Partial Class frmtest
' '
'Button5 'Button5
' '
Me.Button5.Location = New System.Drawing.Point(16, 263) Me.Button5.Location = New System.Drawing.Point(16, 374)
Me.Button5.Name = "Button5" Me.Button5.Name = "Button5"
Me.Button5.Size = New System.Drawing.Size(286, 23) Me.Button5.Size = New System.Drawing.Size(286, 23)
Me.Button5.TabIndex = 14 Me.Button5.TabIndex = 14
@ -155,7 +89,9 @@ Partial Class frmtest
'CheckBoxKeepExtension 'CheckBoxKeepExtension
' '
Me.CheckBoxKeepExtension.AutoSize = True Me.CheckBoxKeepExtension.AutoSize = True
Me.CheckBoxKeepExtension.Location = New System.Drawing.Point(307, 62) Me.CheckBoxKeepExtension.Checked = True
Me.CheckBoxKeepExtension.CheckState = System.Windows.Forms.CheckState.Checked
Me.CheckBoxKeepExtension.Location = New System.Drawing.Point(16, 19)
Me.CheckBoxKeepExtension.Name = "CheckBoxKeepExtension" Me.CheckBoxKeepExtension.Name = "CheckBoxKeepExtension"
Me.CheckBoxKeepExtension.Size = New System.Drawing.Size(100, 17) Me.CheckBoxKeepExtension.Size = New System.Drawing.Size(100, 17)
Me.CheckBoxKeepExtension.TabIndex = 15 Me.CheckBoxKeepExtension.TabIndex = 15
@ -164,7 +100,7 @@ Partial Class frmtest
' '
'Button6 'Button6
' '
Me.Button6.Location = New System.Drawing.Point(572, 160) Me.Button6.Location = New System.Drawing.Point(569, 9)
Me.Button6.Name = "Button6" Me.Button6.Name = "Button6"
Me.Button6.Size = New System.Drawing.Size(75, 23) Me.Button6.Size = New System.Drawing.Size(75, 23)
Me.Button6.TabIndex = 16 Me.Button6.TabIndex = 16
@ -177,7 +113,7 @@ Partial Class frmtest
' '
'Button7 'Button7
' '
Me.Button7.Location = New System.Drawing.Point(16, 292) Me.Button7.Location = New System.Drawing.Point(16, 403)
Me.Button7.Name = "Button7" Me.Button7.Name = "Button7"
Me.Button7.Size = New System.Drawing.Size(286, 23) Me.Button7.Size = New System.Drawing.Size(286, 23)
Me.Button7.TabIndex = 14 Me.Button7.TabIndex = 14
@ -186,52 +122,115 @@ Partial Class frmtest
' '
'Button8 'Button8
' '
Me.Button8.Location = New System.Drawing.Point(666, 14) Me.Button8.Location = New System.Drawing.Point(12, 142)
Me.Button8.Name = "Button8" Me.Button8.Name = "Button8"
Me.Button8.Size = New System.Drawing.Size(187, 23) Me.Button8.Size = New System.Drawing.Size(187, 23)
Me.Button8.TabIndex = 17 Me.Button8.TabIndex = 17
Me.Button8.Text = "1B. All-In-One" Me.Button8.Text = "Import File"
Me.Button8.UseVisualStyleBackColor = True Me.Button8.UseVisualStyleBackColor = True
' '
'Label4
'
Me.Label4.AutoSize = True
Me.Label4.Location = New System.Drawing.Point(9, 14)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(48, 13)
Me.Label4.TabIndex = 18
Me.Label4.Text = "File Path"
'
'Label5
'
Me.Label5.AutoSize = True
Me.Label5.Location = New System.Drawing.Point(9, 41)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(47, 13)
Me.Label5.TabIndex = 18
Me.Label5.Text = "ObjectId"
'
'cmbObjectStoreType
'
Me.cmbObjectStoreType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cmbObjectStoreType.FormattingEnabled = True
Me.cmbObjectStoreType.Items.AddRange(New Object() {"Work", "Archive"})
Me.cmbObjectStoreType.Location = New System.Drawing.Point(137, 63)
Me.cmbObjectStoreType.Name = "cmbObjectStoreType"
Me.cmbObjectStoreType.Size = New System.Drawing.Size(121, 21)
Me.cmbObjectStoreType.TabIndex = 19
'
'DateTimePicker1
'
Me.DateTimePicker1.Location = New System.Drawing.Point(137, 90)
Me.DateTimePicker1.Name = "DateTimePicker1"
Me.DateTimePicker1.Size = New System.Drawing.Size(200, 20)
Me.DateTimePicker1.TabIndex = 20
'
'Label6
'
Me.Label6.AutoSize = True
Me.Label6.Location = New System.Drawing.Point(9, 96)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(30, 13)
Me.Label6.TabIndex = 6
Me.Label6.Text = "Date"
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(137, 183)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(426, 20)
Me.TextBox1.TabIndex = 21
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(9, 186)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(98, 13)
Me.Label1.TabIndex = 18
Me.Label1.Text = "File Path (Imported)"
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.CheckBoxKeepExtension)
Me.GroupBox1.Location = New System.Drawing.Point(653, 12)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(200, 100)
Me.GroupBox1.TabIndex = 22
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "Import Options"
'
'frmtest 'frmtest
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(865, 450) Me.ClientSize = New System.Drawing.Size(865, 450)
Me.Controls.Add(Me.GroupBox1)
Me.Controls.Add(Me.TextBox1)
Me.Controls.Add(Me.DateTimePicker1)
Me.Controls.Add(Me.cmbObjectStoreType)
Me.Controls.Add(Me.Label5)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.Label4)
Me.Controls.Add(Me.Button8) Me.Controls.Add(Me.Button8)
Me.Controls.Add(Me.Button6) Me.Controls.Add(Me.Button6)
Me.Controls.Add(Me.CheckBoxKeepExtension)
Me.Controls.Add(Me.Button7) Me.Controls.Add(Me.Button7)
Me.Controls.Add(Me.Button5) Me.Controls.Add(Me.Button5)
Me.Controls.Add(Me.Button4) Me.Controls.Add(Me.Button4)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.txtFile2Import) Me.Controls.Add(Me.txtFile2Import)
Me.Controls.Add(Me.Button3)
Me.Controls.Add(Me.txtIDB_OBJ_ID) Me.Controls.Add(Me.txtIDB_OBJ_ID)
Me.Controls.Add(Me.Button2) Me.Controls.Add(Me.Label6)
Me.Controls.Add(Me.Label3)
Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.txtDate)
Me.Controls.Add(Me.txtIDBFOPath)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.txtFilestoreType)
Me.Name = "frmtest" Me.Name = "frmtest"
Me.Text = "frmtest" Me.Text = "frmtest"
Me.GroupBox1.ResumeLayout(False)
Me.GroupBox1.PerformLayout()
Me.ResumeLayout(False) Me.ResumeLayout(False)
Me.PerformLayout() Me.PerformLayout()
End Sub End Sub
Friend WithEvents txtFilestoreType As TextBox
Friend WithEvents Button1 As Button
Friend WithEvents txtIDBFOPath As TextBox
Friend WithEvents txtDate As TextBox
Friend WithEvents Label2 As Label Friend WithEvents Label2 As Label
Friend WithEvents Label3 As Label
Friend WithEvents Button2 As Button
Friend WithEvents txtIDB_OBJ_ID As TextBox Friend WithEvents txtIDB_OBJ_ID As TextBox
Friend WithEvents Button3 As Button
Friend WithEvents txtFile2Import As TextBox Friend WithEvents txtFile2Import As TextBox
Friend WithEvents Label1 As Label
Friend WithEvents Button4 As Button Friend WithEvents Button4 As Button
Friend WithEvents Button5 As Button Friend WithEvents Button5 As Button
Friend WithEvents CheckBoxKeepExtension As CheckBox Friend WithEvents CheckBoxKeepExtension As CheckBox
@ -239,4 +238,12 @@ Partial Class frmtest
Friend WithEvents OpenFileDialog1 As OpenFileDialog Friend WithEvents OpenFileDialog1 As OpenFileDialog
Friend WithEvents Button7 As Button Friend WithEvents Button7 As Button
Friend WithEvents Button8 As Button Friend WithEvents Button8 As Button
Friend WithEvents Label4 As Label
Friend WithEvents Label5 As Label
Friend WithEvents cmbObjectStoreType As ComboBox
Friend WithEvents DateTimePicker1 As DateTimePicker
Friend WithEvents Label6 As Label
Friend WithEvents TextBox1 As TextBox
Friend WithEvents Label1 As Label
Friend WithEvents GroupBox1 As GroupBox
End Class End Class

View File

@ -5,56 +5,56 @@ Imports System.IO
Imports System.Text Imports System.Text
Public Class frmtest Public Class frmtest
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click 'Private Sub Button1_Click(sender As Object, e As EventArgs)
My.Settings.Save() ' My.Settings.Save()
Dim oString As String ' Dim oString As String
Dim oextension = "" ' Dim oextension = ""
Dim oKeepExtension As Boolean = False ' Dim oKeepExtension As Boolean = False
If CheckBoxKeepExtension.Checked Then ' If CheckBoxKeepExtension.Checked Then
If txtFile2Import.Text <> String.Empty Then ' If txtFile2Import.Text <> String.Empty Then
oextension = Path.GetExtension(txtFile2Import.Text) ' oextension = Path.GetExtension(txtFile2Import.Text)
oKeepExtension = True ' oKeepExtension = True
End If ' End If
End If ' End If
oString = My.Application.Service.Client.CreateFileStoreObject(txtIDB_OBJ_ID.Text, txtFilestoreType.Text, txtDate.Text, oextension, oKeepExtension) ' oString = My.Application.Service.Client.CreateFileStoreObject(txtIDB_OBJ_ID.Text, txtFilestoreType.Text, txtDate.Text, oextension, oKeepExtension)
txtIDBFOPath.Text = oString ' txtIDBFOPath.Text = oString
End Sub 'End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click 'Private Sub Button2_Click(sender As Object, e As EventArgs)
Dim oString As String ' Dim oString As String
oString = My.Application.Service.Client.CreateObjectId("DOC", My.Application.User.UserName, "") ' oString = My.Application.Service.Client.CreateObjectId("DOC", My.Application.User.UserName, "")
txtIDB_OBJ_ID.Text = oString ' txtIDB_OBJ_ID.Text = oString
End Sub 'End Sub
Private Async Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click 'Private Async Sub Button3_Click(sender As Object, e As EventArgs)
Try ' Try
Dim oResult As Boolean = False ' Dim oResult As Boolean = False
Using oStream As New FileStream(txtFile2Import.Text, FileMode.Open, FileAccess.Read) ' Using oStream As New FileStream(txtFile2Import.Text, FileMode.Open, FileAccess.Read)
Using oMemoryStream As New MemoryStream ' Using oMemoryStream As New MemoryStream
oStream.CopyTo(oMemoryStream) ' oStream.CopyTo(oMemoryStream)
Dim oContents As Byte() = oMemoryStream.ToArray() ' 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
End Using ' End Using
If oResult = False Then ' If oResult = False Then
MsgBox("Oh no error", MsgBoxStyle.Critical) ' MsgBox("Oh no error", MsgBoxStyle.Critical)
Else ' Else
MsgBox("#Nailedit") ' MsgBox("#Nailedit")
End If ' End If
Catch ex As Exception ' Catch ex As Exception
MsgBox(ex.Message) ' MsgBox(ex.Message)
End Try ' End Try
End Sub 'End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
Try Try
Dim oextension = Path.GetExtension(txtFile2Import.Text) Dim oextension = Path.GetExtension(txtFile2Import.Text)
Dim oFile = $"E:\file{oextension}" Dim oFile = $"E:\file{oextension}"
Using oInputStream As New FileStream(txtIDBFOPath.Text, FileMode.Open) Using oInputStream As New FileStream(TextBox1.Text, FileMode.Open)
Using oFileStream As New FileStream(oFile, FileMode.Create, FileAccess.Write) Using oFileStream As New FileStream(oFile, FileMode.Create, FileAccess.Write)
oInputStream.CopyTo(oFileStream) oInputStream.CopyTo(oFileStream)
End Using End Using
@ -91,38 +91,26 @@ Public Class frmtest
Dim oExt = Path.GetExtension(txtFile2Import.Text) Dim oExt = Path.GetExtension(txtFile2Import.Text)
Dim oFile = $"E:\file{oExt}" Dim oFile = $"E:\file{oExt}"
File.Copy(txtIDBFOPath.Text, oFile) File.Copy(TextBox1.Text, oFile)
End Sub End Sub
Private Async Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click Private Async Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click
Dim oResult As Object Dim oResult As Long = Await My.Application.Service.Client.NewFileAsync(
txtFile2Import.Text,
Environment.UserName,
DateTimePicker1.Value,
cmbObjectStoreType.Text,
"DEFAULT",
New Client.ImportFileOptions With {
.KeepExtension = True
}
)
If OpenFileDialog1.ShowDialog() <> DialogResult.OK Then txtIDB_OBJ_ID.Text = oResult
Exit Sub MsgBox("File Imported!")
End If End Sub
txtFile2Import.Text = OpenFileDialog1.FileName Private Sub frmtest_Load(sender As Object, e As EventArgs) Handles MyBase.Load
cmbObjectStoreType.SelectedIndex = 0
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
End Sub End Sub
End Class End Class

View File

@ -114,11 +114,15 @@ Public Class ConfigManager(Of T)
_UserConfigPath = Path.Combine(_UserDirectory, USER_CONFIG_NAME) _UserConfigPath = Path.Combine(_UserDirectory, USER_CONFIG_NAME)
If ComputerConfigPath <> String.Empty Then If ComputerConfigPath <> String.Empty Then
_ComputerDirectory = _File.CreateDirectory(ComputerConfigPath) If IO.File.Exists(ComputerConfigPath) Then
_ComputerDirectory = _File.CreateDirectory(ComputerConfigPath, False)
Else
_ComputerDirectory = ComputerConfigPath
End If
_ComputerConfigPath = Path.Combine(_ComputerDirectory, COMPUTER_CONFIG_NAME) _ComputerConfigPath = Path.Combine(_ComputerDirectory, COMPUTER_CONFIG_NAME)
End If End If
If ApplicationStartupPath <> String.Empty Then If ApplicationStartupPath <> String.Empty Then
_Logger.Debug($"AppConfig is being used: [{ApplicationStartupPath}]") _Logger.Debug($"AppConfig is being used: [{ApplicationStartupPath}]")
_AppConfigPath = Path.Combine(ApplicationStartupPath, APP_CONFIG_NAME) _AppConfigPath = Path.Combine(ApplicationStartupPath, APP_CONFIG_NAME)
End If End If

View File

@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben: ' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.1.0.0")> <Assembly: AssemblyVersion("1.1.2.0")>
<Assembly: AssemblyFileVersion("1.1.0.0")> <Assembly: AssemblyFileVersion("1.1.2.0")>

View File

@ -5,9 +5,14 @@ Imports System.ServiceModel
Imports System.IO Imports System.IO
Public Class Client Public Class Client
Private Const INVALID_OBEJCT_ID As Long = 0
Private Const KIND_TYPE_DOC = "DOC"
Public Const DEFAULT_SERVICE_PORT = 9000
Private ReadOnly _logger As Logger Private ReadOnly _logger As Logger
Private ReadOnly _channelFactory As ChannelFactory(Of IEDMIServiceChannel) Private ReadOnly _channelFactory As ChannelFactory(Of IEDMIServiceChannel)
Private _IPAddressServer As String Private ReadOnly _IPAddressServer As String
Private _channel As IEDMIServiceChannel Private _channel As IEDMIServiceChannel
Public Class StreamedFile Public Class StreamedFile
@ -24,11 +29,27 @@ Public Class Client
Public AccessRight As AccessRight Public AccessRight As AccessRight
End Class End Class
Public Shared Function ParseServiceAddress(AddressWithOptionalPort As String) As Tuple(Of String, Integer)
Dim oSplit() As String = AddressWithOptionalPort.Split(":"c)
Dim oAppServerAddress As String = oSplit(0)
Dim oAppServerPort As Integer
If oSplit.Length = 2 Then
If Integer.TryParse(oSplit(1), oAppServerPort) Then
oAppServerPort = DEFAULT_SERVICE_PORT
End If
Else
oAppServerPort = DEFAULT_SERVICE_PORT
End If
Return New Tuple(Of String, Integer)(oAppServerAddress, oAppServerPort)
End Function
''' <summary> ''' <summary>
''' Creates a new EDMIAPI object ''' Creates a new EDMI Client object
''' </summary> ''' </summary>
''' <param name="LogConfig">LogConfig object</param> ''' <param name="LogConfig">LogConfig object</param>
''' <param name="ServiceAdress">The full service url to connect to</param> ''' <param name="ServiceAdress">The full service url to connect to, for example: net.tcp://1.1.1.1:1111/some/path</param>
Public Sub New(LogConfig As LogConfig, ServiceAdress As String) Public Sub New(LogConfig As LogConfig, ServiceAdress As String)
_logger = LogConfig.GetLogger() _logger = LogConfig.GetLogger()
@ -43,6 +64,12 @@ Public Class Client
End Try End Try
End Sub End Sub
''' <summary>
''' Creates a new EDMI Client object
''' </summary>
''' <param name="LogConfig">LogConfig object</param>
''' <param name="IPAddress">The IP address to connect to</param>
''' <param name="PortNumber">The Port number to use for the connection</param>
Public Sub New(LogConfig As LogConfig, IPAddress As String, PortNumber As Integer) Public Sub New(LogConfig As LogConfig, IPAddress As String, PortNumber As Integer)
_logger = LogConfig.GetLogger() _logger = LogConfig.GetLogger()
@ -78,20 +105,37 @@ Public Class Client
End Try End Try
End Function End Function
''' <summary>
''' Import options for NewFileAsync. Contains default values for all options
''' </summary>
Public Class ImportFileOptions Public Class ImportFileOptions
Public KeepExtension As Boolean Public KeepExtension As Boolean = True
End Class End Class
''' <summary> ''' <summary>
''' Imports a file by filename ''' TODO: Creates a new object
''' </summary> ''' </summary>
''' <returns>A document object</returns> ''' <returns></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) Public Async Function NewObjectAsync() As Task
'pObjectId As Long, pStoreType As String, pDate As String, pExtension As String, pKeepExtension As String Throw New NotImplementedException()
Dim oKindType = "DOC" 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="pAddedWho">Windows username of the user responsible for the import.</param>
''' <param name="pAddedWhen">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="pImportOptions">Other file import options</param>
''' <exception cref="FileNotFoundException">When local filepath was not found</exception>
''' <exception cref="ApplicationException">When there was a error in the Service</exception>
''' <returns>The ObjectId of the newly generated filesystem object</returns>
Public Async Function NewFileAsync(pFilePath As String, pAddedWho As String, pAddedWhen As Date, pObjectStoreType As String, pBusinessEntity As String, pImportOptions As ImportFileOptions) As Task(Of Long)
Try Try
If File.Exists(pFilePath) = False Then If File.Exists(pFilePath) = False Then
Throw New ApplicationException("ImportFileAsync: Path does not exist") Throw New FileNotFoundException("ImportFileAsync: Path does not exist")
End If End If
Dim oFileInfo As New FileInfo(pFilePath) Dim oFileInfo As New FileInfo(pFilePath)
@ -99,8 +143,8 @@ Public Class Client
Dim oObjectIdResponse = Await _channel.NewObjectIdAsync(New NewObjectIdRequest With { Dim oObjectIdResponse = Await _channel.NewObjectIdAsync(New NewObjectIdRequest With {
.BusinessEntity = pBusinessEntity, .BusinessEntity = pBusinessEntity,
.KindType = oKindType, .KindType = KIND_TYPE_DOC,
.Who = pWho .Who = pAddedWho
}) })
If oObjectIdResponse.ObjectId = Nothing OrElse oObjectIdResponse.ObjectId = 0 Then If oObjectIdResponse.ObjectId = Nothing OrElse oObjectIdResponse.ObjectId = 0 Then
@ -108,9 +152,9 @@ Public Class Client
End If End If
Dim oFilePathResponse = Await _channel.NewFileObjectAsync(New NewFileObjectRequest With { Dim oFilePathResponse = Await _channel.NewFileObjectAsync(New NewFileObjectRequest With {
.DateImported = pWhen, .DateImported = pAddedWhen,
.Extension = oExtension, .Extension = oExtension,
.KeepExtension = ImportOptions.KeepExtension, .KeepExtension = pImportOptions.KeepExtension,
.ObjectId = oObjectIdResponse.ObjectId, .ObjectId = oObjectIdResponse.ObjectId,
.StoreType = pObjectStoreType .StoreType = pObjectStoreType
}) })
@ -125,10 +169,10 @@ Public Class Client
Dim oContents = oMemoryStream.ToArray() Dim oContents = oMemoryStream.ToArray()
Dim oFileImportResponse = Await _channel.ImportFileIntoFileObjectAsync(New ImportFileIntoFileObjectRequest With { Dim oFileImportResponse = Await _channel.ImportFileIntoFileObjectAsync(New ImportFileIntoFileObjectRequest With {
.pIDBFilePath = oFilePathResponse.FileObjectPath, .FilePath = oFilePathResponse.FileObjectPath,
.pIDB_OBJ_ID = oObjectIdResponse.ObjectId, .ObjectId = oObjectIdResponse.ObjectId,
.pObjectStoreID = pObjectStoreId, .ObjectStoreType = pObjectStoreType,
.pWho = pWho, .Who = pAddedWho,
.Contents = oContents .Contents = oContents
}) })
@ -138,48 +182,20 @@ Public Class Client
End Using End Using
End Using End Using
Return oFilePathResponse.FileObjectPath Return oObjectIdResponse.ObjectId
Catch ex As Exception Catch ex As Exception
_logger.Error(ex) _logger.Error(ex)
Return Nothing Return INVALID_OBEJCT_ID
End Try End Try
End Function 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 Public Function CreateObjectId(pKindType As String, pWho As String, pBusinessEntity As String) As Long
Try Try
Dim oArgs As New NewObjectIdRequest With { Dim oResponse = _channel.NewObjectId(New NewObjectIdRequest With {
.KindType = pKindType, .KindType = pKindType,
.BusinessEntity = pBusinessEntity, .BusinessEntity = pBusinessEntity,
.Who = pWho .Who = pWho
} })
Dim oResponse = _channel.NewObjectId(oArgs)
Return oResponse.ObjectId Return oResponse.ObjectId
Catch ex As Exception Catch ex As Exception
_logger.Error(ex) _logger.Error(ex)
@ -209,14 +225,14 @@ Public Class Client
End Try End Try
End Function 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 Try
Dim oData As New ImportFileIntoFileObjectRequest() With { Dim oData As New ImportFileIntoFileObjectRequest() With {
.Contents = pContent, .Contents = pContent,
.pWho = pWho, .Who = pWho,
.pIDBFilePath = pFileObjectPath, .FilePath = pFileObjectPath,
.pIDB_OBJ_ID = pObjectId, .ObjectId = pObjectId,
.pObjectStoreID = pObjectStoreID .ObjectStoreType = pObjectStoreType
} }
Dim oResponse = Await _channel.ImportFileIntoFileObjectAsync(oData) Dim oResponse = Await _channel.ImportFileIntoFileObjectAsync(oData)

View File

@ -264,10 +264,10 @@
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
<xs:element minOccurs="0" name="Contents" nillable="true" type="xs:base64Binary" /> <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="FilePath" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="pIDB_OBJ_ID" type="xs:long" /> <xs:element minOccurs="0" name="ObjectId" type="xs:long" />
<xs:element minOccurs="0" name="pObjectStoreID" type="xs:int" /> <xs:element minOccurs="0" name="ObjectStoreType" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="pWho" nillable="true" type="xs:string" /> <xs:element minOccurs="0" name="Who" nillable="true" type="xs:string" />
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>

View File

@ -755,176 +755,176 @@ Namespace EDMIServiceReference
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=0)> _ <System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=0)> _
Public Contents() As Byte Public Contents() As Byte
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=1)> _ <System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=1)>
Public pIDBFilePath As String Public FilePath As String
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=2)> _ <System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=2)>
Public pIDB_OBJ_ID As Long Public ObjectId As Long
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=3)> _ <System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=3)>
Public pObjectStoreID As Integer Public ObjectStoreType As String
<System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=4)> _ <System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="http://DigitalData.Services.EDMIService", Order:=4)>
Public pWho As String Public Who As String
Public Sub New() Public Sub New()
MyBase.New MyBase.New
End Sub 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 MyBase.New
Me.Contents = Contents Me.Contents = Contents
Me.pIDBFilePath = pIDBFilePath Me.FilePath = FilePath
Me.pIDB_OBJ_ID = pIDB_OBJ_ID Me.ObjectId = ObjectId
Me.pObjectStoreID = pObjectStoreID Me.ObjectStoreType = ObjectStoreType
Me.pWho = pWho Me.Who = Who
End Sub End Sub
End Class End Class
<System.Diagnostics.DebuggerStepThroughAttribute(), _ <System.Diagnostics.DebuggerStepThroughAttribute(),
System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0"), _ System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0"),
System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced), _ System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced),
System.ServiceModel.MessageContractAttribute(WrapperName:="ImportFileIntoFileObjectResponse", WrapperNamespace:="http://DigitalData.Services.EDMIService", IsWrapped:=true)> _ System.ServiceModel.MessageContractAttribute(WrapperName:="ImportFileIntoFileObjectResponse", WrapperNamespace:="http://DigitalData.Services.EDMIService", IsWrapped:=True)>
Partial Public Class ImportFileIntoFileObjectResponse 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 Result As Boolean
Public Sub New() Public Sub New()
MyBase.New MyBase.New
End Sub End Sub
Public Sub New(ByVal Result As Boolean) Public Sub New(ByVal Result As Boolean)
MyBase.New MyBase.New
Me.Result = Result Me.Result = Result
End Sub End Sub
End Class 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 Public Interface IEDMIServiceChannel
Inherits EDMIServiceReference.IEDMIService, System.ServiceModel.IClientChannel Inherits EDMIServiceReference.IEDMIService, System.ServiceModel.IClientChannel
End Interface End Interface
<System.Diagnostics.DebuggerStepThroughAttribute(), _ <System.Diagnostics.DebuggerStepThroughAttribute(),
System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")> _ System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")>
Partial Public Class EDMIServiceClient Partial Public Class EDMIServiceClient
Inherits System.ServiceModel.ClientBase(Of EDMIServiceReference.IEDMIService) Inherits System.ServiceModel.ClientBase(Of EDMIServiceReference.IEDMIService)
Implements EDMIServiceReference.IEDMIService Implements EDMIServiceReference.IEDMIService
Public Sub New() Public Sub New()
MyBase.New MyBase.New
End Sub End Sub
Public Sub New(ByVal endpointConfigurationName As String) Public Sub New(ByVal endpointConfigurationName As String)
MyBase.New(endpointConfigurationName) MyBase.New(endpointConfigurationName)
End Sub End Sub
Public Sub New(ByVal endpointConfigurationName As String, ByVal remoteAddress As String) Public Sub New(ByVal endpointConfigurationName As String, ByVal remoteAddress As String)
MyBase.New(endpointConfigurationName, remoteAddress) MyBase.New(endpointConfigurationName, remoteAddress)
End Sub End Sub
Public Sub New(ByVal endpointConfigurationName As String, ByVal remoteAddress As System.ServiceModel.EndpointAddress) Public Sub New(ByVal endpointConfigurationName As String, ByVal remoteAddress As System.ServiceModel.EndpointAddress)
MyBase.New(endpointConfigurationName, remoteAddress) MyBase.New(endpointConfigurationName, remoteAddress)
End Sub End Sub
Public Sub New(ByVal binding As System.ServiceModel.Channels.Binding, ByVal remoteAddress As System.ServiceModel.EndpointAddress) Public Sub New(ByVal binding As System.ServiceModel.Channels.Binding, ByVal remoteAddress As System.ServiceModel.EndpointAddress)
MyBase.New(binding, remoteAddress) MyBase.New(binding, remoteAddress)
End Sub End Sub
Public Function Heartbeat() As Boolean Implements EDMIServiceReference.IEDMIService.Heartbeat Public Function Heartbeat() As Boolean Implements EDMIServiceReference.IEDMIService.Heartbeat
Return MyBase.Channel.Heartbeat Return MyBase.Channel.Heartbeat
End Function End Function
Public Function HeartbeatAsync() As System.Threading.Tasks.Task(Of Boolean) Implements EDMIServiceReference.IEDMIService.HeartbeatAsync Public Function HeartbeatAsync() As System.Threading.Tasks.Task(Of Boolean) Implements EDMIServiceReference.IEDMIService.HeartbeatAsync
Return MyBase.Channel.HeartbeatAsync Return MyBase.Channel.HeartbeatAsync
End Function End Function
Public Function ReturnDatatableFromCache(ByVal Name As String, ByVal FilterExpression As String, ByVal SortByColumn As String) As EDMIServiceReference.TableResult Implements EDMIServiceReference.IEDMIService.ReturnDatatableFromCache 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) Return MyBase.Channel.ReturnDatatableFromCache(Name, FilterExpression, SortByColumn)
End Function 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 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) Return MyBase.Channel.ReturnDatatableFromCacheAsync(Name, FilterExpression, SortByColumn)
End Function End Function
Public Function ReturnDatatable_Firebird(ByVal SQL As String) As EDMIServiceReference.TableResult Implements EDMIServiceReference.IEDMIService.ReturnDatatable_Firebird Public Function ReturnDatatable_Firebird(ByVal SQL As String) As EDMIServiceReference.TableResult Implements EDMIServiceReference.IEDMIService.ReturnDatatable_Firebird
Return MyBase.Channel.ReturnDatatable_Firebird(SQL) Return MyBase.Channel.ReturnDatatable_Firebird(SQL)
End Function End Function
Public Function ReturnDatatable_FirebirdAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.TableResult) Implements EDMIServiceReference.IEDMIService.ReturnDatatable_FirebirdAsync 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) Return MyBase.Channel.ReturnDatatable_FirebirdAsync(SQL)
End Function End Function
Public Function ReturnScalar_Firebird(ByVal SQL As String) As EDMIServiceReference.ScalarResult Implements EDMIServiceReference.IEDMIService.ReturnScalar_Firebird Public Function ReturnScalar_Firebird(ByVal SQL As String) As EDMIServiceReference.ScalarResult Implements EDMIServiceReference.IEDMIService.ReturnScalar_Firebird
Return MyBase.Channel.ReturnScalar_Firebird(SQL) Return MyBase.Channel.ReturnScalar_Firebird(SQL)
End Function End Function
Public Function ReturnScalar_FirebirdAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.ScalarResult) Implements EDMIServiceReference.IEDMIService.ReturnScalar_FirebirdAsync 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) Return MyBase.Channel.ReturnScalar_FirebirdAsync(SQL)
End Function End Function
Public Function ExecuteNonQuery_Firebird(ByVal SQL As String) As EDMIServiceReference.NonQueryResult Implements EDMIServiceReference.IEDMIService.ExecuteNonQuery_Firebird Public Function ExecuteNonQuery_Firebird(ByVal SQL As String) As EDMIServiceReference.NonQueryResult Implements EDMIServiceReference.IEDMIService.ExecuteNonQuery_Firebird
Return MyBase.Channel.ExecuteNonQuery_Firebird(SQL) Return MyBase.Channel.ExecuteNonQuery_Firebird(SQL)
End Function End Function
Public Function ExecuteNonQuery_FirebirdAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.NonQueryResult) Implements EDMIServiceReference.IEDMIService.ExecuteNonQuery_FirebirdAsync 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) Return MyBase.Channel.ExecuteNonQuery_FirebirdAsync(SQL)
End Function End Function
Public Function ReturnDatatable_MSSQL_IDB(ByVal SQL As String) As EDMIServiceReference.TableResult Implements EDMIServiceReference.IEDMIService.ReturnDatatable_MSSQL_IDB 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) Return MyBase.Channel.ReturnDatatable_MSSQL_IDB(SQL)
End Function 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 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) Return MyBase.Channel.ReturnDatatable_MSSQL_IDBAsync(SQL)
End Function End Function
Public Function ReturnScalar_MSSQL_IDB(ByVal SQL As String) As EDMIServiceReference.ScalarResult Implements EDMIServiceReference.IEDMIService.ReturnScalar_MSSQL_IDB 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) Return MyBase.Channel.ReturnScalar_MSSQL_IDB(SQL)
End Function 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 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) Return MyBase.Channel.ReturnScalar_MSSQL_IDBAsync(SQL)
End Function End Function
Public Function ExecuteNonQuery_MSSQL_IDB(ByVal SQL As String) As EDMIServiceReference.NonQueryResult Implements EDMIServiceReference.IEDMIService.ExecuteNonQuery_MSSQL_IDB 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) Return MyBase.Channel.ExecuteNonQuery_MSSQL_IDB(SQL)
End Function 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 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) Return MyBase.Channel.ExecuteNonQuery_MSSQL_IDBAsync(SQL)
End Function End Function
Public Function ReturnDatatable_MSSQL_ECM(ByVal SQL As String) As EDMIServiceReference.TableResult Implements EDMIServiceReference.IEDMIService.ReturnDatatable_MSSQL_ECM 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) Return MyBase.Channel.ReturnDatatable_MSSQL_ECM(SQL)
End Function 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 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) Return MyBase.Channel.ReturnDatatable_MSSQL_ECMAsync(SQL)
End Function End Function
Public Function ReturnScalar_MSSQL_ECM(ByVal SQL As String) As EDMIServiceReference.ScalarResult Implements EDMIServiceReference.IEDMIService.ReturnScalar_MSSQL_ECM 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) Return MyBase.Channel.ReturnScalar_MSSQL_ECM(SQL)
End Function 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 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) Return MyBase.Channel.ReturnScalar_MSSQL_ECMAsync(SQL)
End Function End Function
Public Function ExecuteNonQuery_MSSQL_ECM(ByVal SQL As String) As EDMIServiceReference.NonQueryResult Implements EDMIServiceReference.IEDMIService.ExecuteNonQuery_MSSQL_ECM 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) Return MyBase.Channel.ExecuteNonQuery_MSSQL_ECM(SQL)
End Function 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 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) Return MyBase.Channel.ExecuteNonQuery_MSSQL_ECMAsync(SQL)
End Function 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 Function EDMIServiceReference_IEDMIService_ImportFile(ByVal request As EDMIServiceReference.DocumentImportRequest) As EDMIServiceReference.DocumentImportResponse Implements EDMIServiceReference.IEDMIService.ImportFile
Return MyBase.Channel.ImportFile(request) Return MyBase.Channel.ImportFile(request)
End Function 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 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() Dim inValue As EDMIServiceReference.DocumentImportRequest = New EDMIServiceReference.DocumentImportRequest()
inValue.Contents = Contents inValue.Contents = Contents
@ -932,15 +932,15 @@ Namespace EDMIServiceReference
inValue.FileName = FileName inValue.FileName = FileName
inValue.ObjectStoreId = ObjectStoreId inValue.ObjectStoreId = ObjectStoreId
inValue.RetentionDays = RetentionDays 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 Return retVal.ObjectId
End Function 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 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) Return MyBase.Channel.ImportFileAsync(request)
End Function 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) 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() Dim inValue As EDMIServiceReference.DocumentImportRequest = New EDMIServiceReference.DocumentImportRequest()
inValue.Contents = Contents inValue.Contents = Contents
@ -948,104 +948,104 @@ Namespace EDMIServiceReference
inValue.FileName = FileName inValue.FileName = FileName
inValue.ObjectStoreId = ObjectStoreId inValue.ObjectStoreId = ObjectStoreId
inValue.RetentionDays = RetentionDays inValue.RetentionDays = RetentionDays
Return CType(Me,EDMIServiceReference.IEDMIService).ImportFileAsync(inValue) Return CType(Me, EDMIServiceReference.IEDMIService).ImportFileAsync(inValue)
End Function 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 Function EDMIServiceReference_IEDMIService_GetFileByObjectId(ByVal request As EDMIServiceReference.DocumentStreamRequest) As EDMIServiceReference.DocumentStreamResponse Implements EDMIServiceReference.IEDMIService.GetFileByObjectId
Return MyBase.Channel.GetFileByObjectId(request) Return MyBase.Channel.GetFileByObjectId(request)
End Function End Function
Public Function GetFileByObjectId(ByVal ObjectId As Long, <System.Runtime.InteropServices.OutAttribute()> ByRef FileContents As System.IO.Stream) As String 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() Dim inValue As EDMIServiceReference.DocumentStreamRequest = New EDMIServiceReference.DocumentStreamRequest()
inValue.ObjectId = ObjectId 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 FileContents = retVal.FileContents
Return retVal.FileName Return retVal.FileName
End Function 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 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) Return MyBase.Channel.GetFileByObjectIdAsync(request)
End Function End Function
Public Function GetFileByObjectIdAsync(ByVal ObjectId As Long) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentStreamResponse) Public Function GetFileByObjectIdAsync(ByVal ObjectId As Long) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentStreamResponse)
Dim inValue As EDMIServiceReference.DocumentStreamRequest = New EDMIServiceReference.DocumentStreamRequest() Dim inValue As EDMIServiceReference.DocumentStreamRequest = New EDMIServiceReference.DocumentStreamRequest()
inValue.ObjectId = ObjectId inValue.ObjectId = ObjectId
Return CType(Me,EDMIServiceReference.IEDMIService).GetFileByObjectIdAsync(inValue) Return CType(Me, EDMIServiceReference.IEDMIService).GetFileByObjectIdAsync(inValue)
End Function 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 Function EDMIServiceReference_IEDMIService_GetFileInfoByObjectId(ByVal request As EDMIServiceReference.DocumentInfoRequest) As EDMIServiceReference.DocumentInfoResponse Implements EDMIServiceReference.IEDMIService.GetFileInfoByObjectId
Return MyBase.Channel.GetFileInfoByObjectId(request) Return MyBase.Channel.GetFileInfoByObjectId(request)
End Function End Function
Public Function GetFileInfoByObjectId(ByVal ObjectId As Long, ByVal UserId As Long, <System.Runtime.InteropServices.OutAttribute()> ByRef FullPath As String) As EDMIServiceReference.RightsAccessRight 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() Dim inValue As EDMIServiceReference.DocumentInfoRequest = New EDMIServiceReference.DocumentInfoRequest()
inValue.ObjectId = ObjectId inValue.ObjectId = ObjectId
inValue.UserId = UserId 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 FullPath = retVal.FullPath
Return retVal.FileRight Return retVal.FileRight
End Function End Function
Public Function GetFileInfoByObjectIdAsync(ByVal request As EDMIServiceReference.DocumentInfoRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentInfoResponse) Implements EDMIServiceReference.IEDMIService.GetFileInfoByObjectIdAsync 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) Return MyBase.Channel.GetFileInfoByObjectIdAsync(request)
End Function 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 Function EDMIServiceReference_IEDMIService_ListFilesForUser(ByVal request As EDMIServiceReference.ListFilesForUserRequest) As EDMIServiceReference.DocumentListResponse Implements EDMIServiceReference.IEDMIService.ListFilesForUser
Return MyBase.Channel.ListFilesForUser(request) Return MyBase.Channel.ListFilesForUser(request)
End Function End Function
Public Function ListFilesForUser() As System.Data.DataTable Public Function ListFilesForUser() As System.Data.DataTable
Dim inValue As EDMIServiceReference.ListFilesForUserRequest = New EDMIServiceReference.ListFilesForUserRequest() 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 Return retVal.Datatable
End Function 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 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) Return MyBase.Channel.ListFilesForUserAsync(request)
End Function End Function
Public Function ListFilesForUserAsync() As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentListResponse) Public Function ListFilesForUserAsync() As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentListResponse)
Dim inValue As EDMIServiceReference.ListFilesForUserRequest = New EDMIServiceReference.ListFilesForUserRequest() Dim inValue As EDMIServiceReference.ListFilesForUserRequest = New EDMIServiceReference.ListFilesForUserRequest()
Return CType(Me,EDMIServiceReference.IEDMIService).ListFilesForUserAsync(inValue) Return CType(Me, EDMIServiceReference.IEDMIService).ListFilesForUserAsync(inValue)
End Function 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 Function EDMIServiceReference_IEDMIService_NewObjectId(ByVal request As EDMIServiceReference.NewObjectIdRequest) As EDMIServiceReference.NewObjectIdResponse Implements EDMIServiceReference.IEDMIService.NewObjectId
Return MyBase.Channel.NewObjectId(request) Return MyBase.Channel.NewObjectId(request)
End Function End Function
Public Function NewObjectId(ByVal BusinessEntity As String, ByVal KindType As String, ByVal Who As String) As Long 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() Dim inValue As EDMIServiceReference.NewObjectIdRequest = New EDMIServiceReference.NewObjectIdRequest()
inValue.BusinessEntity = BusinessEntity inValue.BusinessEntity = BusinessEntity
inValue.KindType = KindType inValue.KindType = KindType
inValue.Who = Who 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 Return retVal.ObjectId
End Function 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 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) Return MyBase.Channel.NewObjectIdAsync(request)
End Function 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) 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() Dim inValue As EDMIServiceReference.NewObjectIdRequest = New EDMIServiceReference.NewObjectIdRequest()
inValue.BusinessEntity = BusinessEntity inValue.BusinessEntity = BusinessEntity
inValue.KindType = KindType inValue.KindType = KindType
inValue.Who = Who inValue.Who = Who
Return CType(Me,EDMIServiceReference.IEDMIService).NewObjectIdAsync(inValue) Return CType(Me, EDMIServiceReference.IEDMIService).NewObjectIdAsync(inValue)
End Function 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 Function EDMIServiceReference_IEDMIService_NewFileObject(ByVal request As EDMIServiceReference.NewFileObjectRequest) As EDMIServiceReference.NewFileObjectResponse Implements EDMIServiceReference.IEDMIService.NewFileObject
Return MyBase.Channel.NewFileObject(request) Return MyBase.Channel.NewFileObject(request)
End Function 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 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() Dim inValue As EDMIServiceReference.NewFileObjectRequest = New EDMIServiceReference.NewFileObjectRequest()
inValue.DateImported = DateImported inValue.DateImported = DateImported
@ -1053,15 +1053,15 @@ Namespace EDMIServiceReference
inValue.KeepExtension = KeepExtension inValue.KeepExtension = KeepExtension
inValue.ObjectId = ObjectId inValue.ObjectId = ObjectId
inValue.StoreType = StoreType 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 Return retVal.FileObjectPath
End Function 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 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) Return MyBase.Channel.NewFileObjectAsync(request)
End Function 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) 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() Dim inValue As EDMIServiceReference.NewFileObjectRequest = New EDMIServiceReference.NewFileObjectRequest()
inValue.DateImported = DateImported inValue.DateImported = DateImported
@ -1069,37 +1069,37 @@ Namespace EDMIServiceReference
inValue.KeepExtension = KeepExtension inValue.KeepExtension = KeepExtension
inValue.ObjectId = ObjectId inValue.ObjectId = ObjectId
inValue.StoreType = StoreType inValue.StoreType = StoreType
Return CType(Me,EDMIServiceReference.IEDMIService).NewFileObjectAsync(inValue) Return CType(Me, EDMIServiceReference.IEDMIService).NewFileObjectAsync(inValue)
End Function 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 Function EDMIServiceReference_IEDMIService_ImportFileIntoFileObject(ByVal request As EDMIServiceReference.ImportFileIntoFileObjectRequest) As EDMIServiceReference.ImportFileIntoFileObjectResponse Implements EDMIServiceReference.IEDMIService.ImportFileIntoFileObject
Return MyBase.Channel.ImportFileIntoFileObject(request) Return MyBase.Channel.ImportFileIntoFileObject(request)
End Function 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() Dim inValue As EDMIServiceReference.ImportFileIntoFileObjectRequest = New EDMIServiceReference.ImportFileIntoFileObjectRequest()
inValue.Contents = Contents inValue.Contents = Contents
inValue.pIDBFilePath = pIDBFilePath inValue.FilePath = FilePath
inValue.pIDB_OBJ_ID = pIDB_OBJ_ID inValue.ObjectId = ObjectId
inValue.pObjectStoreID = pObjectStoreID inValue.ObjectStoreType = ObjectStoreType
inValue.pWho = pWho inValue.Who = Who
Dim retVal As EDMIServiceReference.ImportFileIntoFileObjectResponse = CType(Me,EDMIServiceReference.IEDMIService).ImportFileIntoFileObject(inValue) Dim retVal As EDMIServiceReference.ImportFileIntoFileObjectResponse = CType(Me, EDMIServiceReference.IEDMIService).ImportFileIntoFileObject(inValue)
Return retVal.Result Return retVal.Result
End Function 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 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) Return MyBase.Channel.ImportFileIntoFileObjectAsync(request)
End Function 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() Dim inValue As EDMIServiceReference.ImportFileIntoFileObjectRequest = New EDMIServiceReference.ImportFileIntoFileObjectRequest()
inValue.Contents = Contents inValue.Contents = Contents
inValue.pIDBFilePath = pIDBFilePath inValue.FilePath = FilePath
inValue.pIDB_OBJ_ID = pIDB_OBJ_ID inValue.ObjectId = ObjectId
inValue.pObjectStoreID = pObjectStoreID inValue.ObjectStoreType = ObjectStoreType
inValue.pWho = pWho inValue.Who = Who
Return CType(Me,EDMIServiceReference.IEDMIService).ImportFileIntoFileObjectAsync(inValue) Return CType(Me,EDMIServiceReference.IEDMIService).ImportFileIntoFileObjectAsync(inValue)
End Function End Function
End Class End Class

View File

@ -0,0 +1,6 @@
Public Class Constants
Public Enum DatabaseType
ECM
IDB
End Enum
End Class

View File

@ -1,20 +1,15 @@
Imports DigitalData.Modules.Database Imports DigitalData.Modules.Database
Imports DigitalData.Modules.EDMI.API Imports DigitalData.Modules.EDMI.API
Imports DigitalData.Modules.EDMI.API.Constants
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Language.Utils Imports DigitalData.Modules.Language.Utils
Public Class DataWithFallback Public Class DatabaseWithFallback
Private _Logger As Logger Private ReadOnly _Logger As Logger
Private _Client As Client Private ReadOnly _Client As Client
Private _DatabaseEDM As MSSQLServer Private ReadOnly _DatabaseEDM As MSSQLServer
Private _DatabaseIDB As MSSQLServer Private ReadOnly _DatabaseIDB As MSSQLServer
Private _Type As DatabaseType
Public Enum DatabaseType
ECM
IDB
End Enum
Public Sub New(LogConfig As LogConfig, Client As Client, DatabaseECM As MSSQLServer, DatabaseIDB As MSSQLServer) Public Sub New(LogConfig As LogConfig, Client As Client, DatabaseECM As MSSQLServer, DatabaseIDB As MSSQLServer)
_Logger = LogConfig.GetLogger() _Logger = LogConfig.GetLogger()
@ -23,7 +18,7 @@ Public Class DataWithFallback
_DatabaseIDB = DatabaseIDB _DatabaseIDB = DatabaseIDB
End Sub End Sub
Public Function GetDatatable(DataTable As String, FilterExpression As String, SortByColumn As String, FallbackSQL As String, FallbackType As DatabaseType, Optional ForceFallback As Boolean = False) As DataTable Public Function GetDatatable(DataTable As String, FallbackSQL As String, FallbackType As Constants.DatabaseType, Optional FilterExpression As String = "", Optional SortByColumn As String = "", Optional ForceFallback As Boolean = False) As DataTable
Try Try
Dim oResult As DataTable = Nothing Dim oResult As DataTable = Nothing
@ -65,27 +60,29 @@ Public Class DataWithFallback
End Function End Function
Public Function GetUserData(UserName As String, ModuleCode As String, Client As Integer) As UserData Public Function GetUserData(UserName As String, ModuleCode As String, Client As Integer) As UserData
Dim oSQL = $"SELECT * FROM FNDD_CHECK_USER_MODULE('{UserName}','{ModuleCode}',{Client})" 'Dim oSQL = $"SELECT * FROM FNDD_CHECK_USER_MODULE('{UserName}','{ModuleCode}',{Client})"
Dim oTable As DataTable = GetDatatable("TBDD_USER_MODULE", $"USERNAME = '{UserName.ToLower}' AND MODULE_SHORT = '{ModuleCode}'", "", oSQL, DatabaseType.ECM) 'Dim oTable As DataTable = GetDatatable("TBDD_USER_MODULE", $"USERNAME = '{UserName.ToLower}' AND MODULE_SHORT = '{ModuleCode}'", "", oSQL, DatabaseType.ECM)
If oTable Is Nothing Then 'If oTable Is Nothing Then
Return Nothing ' Return Nothing
End If 'End If
If oTable.Rows.Count = 0 Then 'If oTable.Rows.Count = 0 Then
Return Nothing ' Return Nothing
End If 'End If
Dim oRow As DataRow = oTable.Rows.Item(0) 'Dim oRow As DataRow = oTable.Rows.Item(0)
Dim oUserData As New UserData With { 'Dim oUserData As New UserData With {
.Id = NotNull(oRow, "USER_ID", -1), ' .Id = NotNull(oRow, "USER_ID", -1),
.Surname = NotNull(oRow, "USER_SURNAME", String.Empty), ' .Surname = NotNull(oRow, "USER_SURNAME", String.Empty),
.Prename = NotNull(oRow, "USER_PRENAME", String.Empty), ' .Prename = NotNull(oRow, "USER_PRENAME", String.Empty),
.Shortname = NotNull(oRow, "USER_SHORTNAME", String.Empty), ' .Shortname = NotNull(oRow, "USER_SHORTNAME", String.Empty),
.Email = NotNull(oRow, "USER_EMAIL", String.Empty), ' .Email = NotNull(oRow, "USER_EMAIL", String.Empty),
.Language = NotNull(oRow, "USER_LANGUAGE", "de-DE"), ' .Language = NotNull(oRow, "USER_LANGUAGE", "de-DE"),
.DateFormat = NotNull(oRow, "USER_DATE_FORMAT", "dd.MM.yyyy") ' .DateFormat = NotNull(oRow, "USER_DATE_FORMAT", "dd.MM.yyyy")
} '}
Throw New NotImplementedException()
End Function End Function
End Class End Class

View File

@ -80,7 +80,8 @@
<DependentUpon>Reference.svcmap</DependentUpon> <DependentUpon>Reference.svcmap</DependentUpon>
</Compile> </Compile>
<Compile Include="Client.vb" /> <Compile Include="Client.vb" />
<Compile Include="DataWithFallback.vb" /> <Compile Include="Constants.vb" />
<Compile Include="DatabaseWithFallback.vb" />
<Compile Include="My Project\AssemblyInfo.vb" /> <Compile Include="My Project\AssemblyInfo.vb" />
<Compile Include="My Project\Application.Designer.vb"> <Compile Include="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
@ -96,7 +97,7 @@
<DependentUpon>Settings.settings</DependentUpon> <DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput> <DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile> </Compile>
<Compile Include="DataWithFallback\UserData.vb" /> <Compile Include="DatabaseWithFallback\UserData.vb" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="My Project\Resources.resx"> <EmbeddedResource Include="My Project\Resources.resx">

View File

@ -346,7 +346,7 @@ Public Class LogConfig
Public Function GetLogger(ClassName As String, ModuleName As String) As Logger Public Function GetLogger(ClassName As String, ModuleName As String) As Logger
Dim oLogger = LogFactory.GetLogger(Of Logger)(ClassName) 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}") Return oLogger.WithProperty("ModuleName", $"-{ModuleName}")
End If End If

View File

@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben: ' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.4.0.0")> <Assembly: AssemblyVersion("2.4.1.0")>
<Assembly: AssemblyFileVersion("2.4.0.0")> <Assembly: AssemblyFileVersion("2.4.1.0")>

View File

@ -445,65 +445,6 @@ Public Class EDMIService
Return Nothing Return Nothing
End Try End Try
End Function End Function
Private Function GetFullPathForObjectId(ObjectId As Long) As String
Try
If Not GlobalState.TableStore.Tables.Contains(TBIDB_DOC_INFO) Then
_Logger.Warn("GetFullPathForObjectId: Document info table does not exist!")
Return String.Empty
End If
Dim oTable As DataTable = GlobalState.TableStore.Tables.Item(TBIDB_DOC_INFO)
Dim oRows As List(Of DataRow) = oTable.Select($"IDB_OBJ_ID = {ObjectId}").ToList()
Dim oFullPath As String
If oRows.Count = 0 Then
_Logger.Warn("GetFullPathForObjectId: Full path does not exist for object [{0}]", ObjectId)
oFullPath = String.Empty
Else
Dim oRow As DataRow = oRows.First()
oFullPath = oRow.Item("FULL_PATH")
End If
Return oFullPath
Catch ex As Exception
_Logger.Warn("GetFullPathForObjectId: Unexpected Error while getting full path for object [{0}].", ObjectId)
_Logger.Error(ex)
Return String.Empty
End Try
End Function
Private Function GetAccessRightForObjectId(UserId As Long, ObjectId As Long) As AccessRight
Try
If Not GlobalState.TableStore.Tables.Contains(TBIDB_ACCESSRIGHT) Then
_Logger.Warn("GetAccessRightForObjectId: Access right table does not exist!")
Return AccessRight.VIEW_ONLY
End If
Dim oTable As DataTable = GlobalState.TableStore.Tables.Item(TBIDB_ACCESSRIGHT)
Dim oRows As List(Of DataRow) = oTable.Select($"IDB_OBJ_ID = {ObjectId} AND USR_ID = {UserId}").ToList()
Dim oRight As AccessRight
If oRows.Count = 0 Then
_Logger.Warn("GetAccessRightForObjectId: Access right assignment does not exist for user [{0}] on object [{1}]", UserId, ObjectId)
Return AccessRight.VIEW_ONLY
Else
If oRows.Count > 1 Then
_Logger.Warn("GetAccessRightForObjectId: More than one access right assignment found for user [{0}] on object [{1}]", UserId, ObjectId)
End If
Dim oRow As DataRow = oRows.First()
Dim oRightAsInt = oRow.Item("ACCESSRIGHT")
oRight = Utils.ToEnum(Of AccessRight)(oRightAsInt)
End If
Return oRight
Catch ex As Exception
_Logger.Warn("GetAccessRightForObjectId: Unexpected Error while getting access right for object [{0}].", ObjectId)
_Logger.Error(ex)
Return AccessRight.VIEW_ONLY
End Try
End Function
Public Function NewObjectId(Data As NewObjectIdRequest) As NewObjectIdResponse Implements IEDMIService.NewObjectId Public Function NewObjectId(Data As NewObjectIdRequest) As NewObjectIdResponse Implements IEDMIService.NewObjectId
Try Try
@ -580,12 +521,14 @@ Public Class EDMIService
End Function End Function
Public Function ImportFileIntoFileObject(Data As ImportFileIntoFileObjectRequest) As ImportFileIntoFileObjectResponse Implements IEDMIService.ImportFileIntoFileObject 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 Try
Using oStream = New FileStream(Data.pIDBFilePath, FileMode.Create, FileAccess.Write) Dim oObjectStore = GlobalState.GetObjectStore(Data.ObjectStoreType)
_Logger.Info("ImportFile: Saving file to path [{0}]", Data.pIDBFilePath) 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) _Logger.Info("ImportFile: Content Length: {0}", Data.Contents.Length)
oStream.Write(Data.Contents, 0, Data.Contents.Length) oStream.Write(Data.Contents, 0, Data.Contents.Length)
@ -594,7 +537,7 @@ Public Class EDMIService
End Using End Using
' insert into db ' 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) Dim oResult As Boolean = MSSQL_IDB.ExecuteNonQuery(oSQL)
Return New ImportFileIntoFileObjectResponse() With {.Result = oResult} Return New ImportFileIntoFileObjectResponse() With {.Result = oResult}
@ -611,6 +554,7 @@ Public Class EDMIService
End Function End Function
#End Region #End Region
#Region "=== Private ==="
Private Function GetFileObjectFileName(IDB_OBJ_ID As Long, pExtension As String, pKeepExtension As Boolean) As String Private Function GetFileObjectFileName(IDB_OBJ_ID As Long, pExtension As String, pKeepExtension As Boolean) As String
If Not pExtension.StartsWith("."c) Then If Not pExtension.StartsWith("."c) Then
pExtension &= "."c pExtension &= "."c
@ -650,4 +594,67 @@ Public Class EDMIService
Return New FaultException(Of UnexpectedErrorFault)(oFault, New FaultReason(oFault.InnerException.Message)) Return New FaultException(Of UnexpectedErrorFault)(oFault, New FaultReason(oFault.InnerException.Message))
End Function End Function
Private Function GetFullPathForObjectId(ObjectId As Long) As String
Try
If Not GlobalState.TableStore.Tables.Contains(TBIDB_DOC_INFO) Then
_Logger.Warn("GetFullPathForObjectId: Document info table does not exist!")
Return String.Empty
End If
Dim oTable As DataTable = GlobalState.TableStore.Tables.Item(TBIDB_DOC_INFO)
Dim oRows As List(Of DataRow) = oTable.Select($"IDB_OBJ_ID = {ObjectId}").ToList()
Dim oFullPath As String
If oRows.Count = 0 Then
_Logger.Warn("GetFullPathForObjectId: Full path does not exist for object [{0}]", ObjectId)
oFullPath = String.Empty
Else
Dim oRow As DataRow = oRows.First()
oFullPath = oRow.Item("FULL_PATH")
End If
Return oFullPath
Catch ex As Exception
_Logger.Warn("GetFullPathForObjectId: Unexpected Error while getting full path for object [{0}].", ObjectId)
_Logger.Error(ex)
Return String.Empty
End Try
End Function
Private Function GetAccessRightForObjectId(UserId As Long, ObjectId As Long) As AccessRight
Try
If Not GlobalState.TableStore.Tables.Contains(TBIDB_ACCESSRIGHT) Then
_Logger.Warn("GetAccessRightForObjectId: Access right table does not exist!")
Return AccessRight.VIEW_ONLY
End If
Dim oTable As DataTable = GlobalState.TableStore.Tables.Item(TBIDB_ACCESSRIGHT)
Dim oRows As List(Of DataRow) = oTable.Select($"IDB_OBJ_ID = {ObjectId} AND USR_ID = {UserId}").ToList()
Dim oRight As AccessRight
If oRows.Count = 0 Then
_Logger.Warn("GetAccessRightForObjectId: Access right assignment does not exist for user [{0}] on object [{1}]", UserId, ObjectId)
Return AccessRight.VIEW_ONLY
Else
If oRows.Count > 1 Then
_Logger.Warn("GetAccessRightForObjectId: More than one access right assignment found for user [{0}] on object [{1}]", UserId, ObjectId)
End If
Dim oRow As DataRow = oRows.First()
Dim oRightAsInt = oRow.Item("ACCESSRIGHT")
oRight = Utils.ToEnum(Of AccessRight)(oRightAsInt)
End If
Return oRight
Catch ex As Exception
_Logger.Warn("GetAccessRightForObjectId: Unexpected Error while getting access right for object [{0}].", ObjectId)
_Logger.Error(ex)
Return AccessRight.VIEW_ONLY
End Try
End Function
#End Region
End Class End Class

View File

@ -43,6 +43,12 @@ Public Class GlobalState
End Try End Try
End Sub End Sub
Public Function GetObjectStore(Name As String) As ObjectStore
Return ObjectStores.
Where(Function(o) o.Title.ToUpper = Name.ToUpper).
FirstOrDefault()
End Function
Class ObjectStore Class ObjectStore
Public Id As Long Public Id As Long
Public Title As String Public Title As String

View File

@ -32,13 +32,13 @@ Namespace Messages
<MessageBodyMember> <MessageBodyMember>
Public Contents() As Byte Public Contents() As Byte
<MessageBodyMember> <MessageBodyMember>
Public pWho As String Public Who As String
<MessageBodyMember> <MessageBodyMember>
Public pIDBFilePath As String Public FilePath As String
<MessageBodyMember> <MessageBodyMember>
Public pIDB_OBJ_ID As Long Public ObjectId As Long
<MessageBodyMember> <MessageBodyMember>
Public pObjectStoreID As Integer Public ObjectStoreType As String
End Class End Class
<MessageContract> <MessageContract>

View File

@ -18,7 +18,7 @@ Public Class DatatableJob
Dim oLogConfig As LogConfig = oJobData.Item("LogConfig") Dim oLogConfig As LogConfig = oJobData.Item("LogConfig")
Dim oCronJobId As Integer = oJobData.Item("CronJobId") Dim oCronJobId As Integer = oJobData.Item("CronJobId")
Dim oCronJobTitle As String = oJobData.Item("CronJobTitle") 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() Dim oResult As New JobResult()

View File

@ -21,7 +21,7 @@ Public Class JobListener
MyBase.New() MyBase.New()
_LogConfig = LogConfig _LogConfig = LogConfig
_Logger = LogConfig.GetLogger() _Logger = LogConfig.GetLoggerFor("Scheduler")
_MSSQL = MSSQL _MSSQL = MSSQL
Dataset = ResultDataSet Dataset = ResultDataSet
End Sub End Sub

View File

@ -108,8 +108,6 @@ Public Class Scheduler
End Sub End Sub
Public Async Function GetCronJobs() As Task(Of DataTable) Public Async Function GetCronJobs() As Task(Of DataTable)
Try Try
Dim oSQL As String = "SELECT * FROM TBAPPSERV_CRON_JOB WHERE ACTIVE = 1" Dim oSQL As String = "SELECT * FROM TBAPPSERV_CRON_JOB WHERE ACTIVE = 1"