diff --git a/EDMI.File/Path.vb b/EDMI.File/Path.vb index e8b904b0..ce701e4f 100644 --- a/EDMI.File/Path.vb +++ b/EDMI.File/Path.vb @@ -16,18 +16,42 @@ Public Class Path _BasePath = DatastoreBasePath End Sub - Public Function GetActivePath(DocumentType As String) - Dim oPathParts As New List(Of String) From {_BasePath, PATH_EDMI, PATH_ACTIVE, DocumentType} - oPathParts.AddRange(GetDatePath()) + Public Function GetActivePath(DocumentType As String, Optional FileName As String = "") As String + Dim oParts = New List(Of String) From {_BasePath, PATH_EDMI, PATH_ACTIVE} + oParts.AddRange(Do_GetRelativePath(DocumentType, FileName)) - Return IO.Path.Combine(oPathParts.ToArray()) + Return IO.Path.Combine(oParts.ToArray()) End Function - Public Function GetArchivePath(DocumentType As String) - Dim oPathParts As New List(Of String) From {_BasePath, PATH_EDMI, PATH_ARCHIVE, DocumentType} - oPathParts.AddRange(GetDatePath()) + Public Function GetActivePathFromRelativePath(RelativePath As String) As String + Dim oParts = New List(Of String) From {_BasePath, PATH_EDMI, PATH_ACTIVE} + oParts.Add(RelativePath) + Return IO.Path.Combine(oParts.ToArray) + End Function - Return IO.Path.Combine(oPathParts.ToArray()) + Public Function GetArchivePath(DocumentType As String, Optional FileName As String = "") As String + Dim oParts = New List(Of String) From {_BasePath, PATH_EDMI, PATH_ARCHIVE} + oParts.AddRange(Do_GetRelativePath(DocumentType, FileName)) + + Return IO.Path.Combine(oParts.ToArray()) + End Function + + Public Function GetArchivePathFromRelativePath(RelativePath As String) As String + Dim oParts = New List(Of String) From {_BasePath, PATH_EDMI, PATH_ARCHIVE} + oParts.Add(RelativePath) + Return IO.Path.Combine(oParts.ToArray) + End Function + + Public Function GetRelativePath(DocumentType As String, Optional FileName As String = "") As String + Return IO.Path.Combine(Do_GetRelativePath(DocumentType, FileName).ToArray) + End Function + + Private Function Do_GetRelativePath(DocumentType As String, Optional FileName As String = "") As List(Of String) + Dim oPathParts As New List(Of String) From {DocumentType} + oPathParts.AddRange(GetDatePath()) + oPathParts.Add(FileName) + + Return oPathParts End Function Private Function GetDatePath() As List(Of String) diff --git a/GUIs.Test.EDMIBenchmark/Form1.Designer.vb b/GUIs.Test.EDMIBenchmark/Form1.Designer.vb index c05e79ed..b5a6d6f6 100644 --- a/GUIs.Test.EDMIBenchmark/Form1.Designer.vb +++ b/GUIs.Test.EDMIBenchmark/Form1.Designer.vb @@ -1,9 +1,9 @@ - _ + Partial Class Form1 Inherits DevExpress.XtraBars.Ribbon.RibbonForm 'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen. - _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) Try If disposing AndAlso components IsNot Nothing Then @@ -20,56 +20,104 @@ Partial Class Form1 'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich. 'Das Bearbeiten ist mit dem Windows Form-Designer möglich. 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. - _ + Private Sub InitializeComponent() + Me.components = New System.ComponentModel.Container() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Form1)) - Me.listboxFiles = New DevExpress.XtraEditors.ListBoxControl() + Dim DockingContainer3 As DevExpress.XtraBars.Docking2010.Views.Tabbed.DockingContainer = New DevExpress.XtraBars.Docking2010.Views.Tabbed.DockingContainer() + Me.DocumentGroup1 = New DevExpress.XtraBars.Docking2010.Views.Tabbed.DocumentGroup(Me.components) + Me.Document1 = New DevExpress.XtraBars.Docking2010.Views.Tabbed.Document(Me.components) Me.RibbonControl1 = New DevExpress.XtraBars.Ribbon.RibbonControl() Me.ButtonSelectFiles = New DevExpress.XtraBars.BarButtonItem() Me.ButtonImportFiles = New DevExpress.XtraBars.BarButtonItem() Me.buttonClearLog = New DevExpress.XtraBars.BarButtonItem() Me.buttonClearFiles = New DevExpress.XtraBars.BarButtonItem() + Me.TextboxObejctId = New DevExpress.XtraBars.BarEditItem() + Me.RepositoryItemTextEdit1 = New DevExpress.XtraEditors.Repository.RepositoryItemTextEdit() + Me.ButtonLoadFile = New DevExpress.XtraBars.BarButtonItem() + Me.BarListItem1 = New DevExpress.XtraBars.BarListItem() + Me.BarButtonItem2 = New DevExpress.XtraBars.BarButtonItem() + Me.BarToggleSwitchItem1 = New DevExpress.XtraBars.BarToggleSwitchItem() Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage() Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() - Me.RibbonPageGroup2 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() + Me.RibbonPageGroup4 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonPageGroup3 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar() Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage() - Me.SplitContainerControl1 = New DevExpress.XtraEditors.SplitContainerControl() + Me.DocumentManager1 = New DevExpress.XtraBars.Docking2010.DocumentManager(Me.components) + Me.TabbedView1 = New DevExpress.XtraBars.Docking2010.Views.Tabbed.TabbedView(Me.components) + Me.DockManager1 = New DevExpress.XtraBars.Docking.DockManager(Me.components) + Me.hideContainerBottom = New DevExpress.XtraBars.Docking.AutoHideContainer() + Me.DockPanel3 = New DevExpress.XtraBars.Docking.DockPanel() + Me.DockPanel3_Container = New DevExpress.XtraBars.Docking.ControlContainer() Me.listboxLog = New DevExpress.XtraEditors.ListBoxControl() - Me.XtraTabControl1 = New DevExpress.XtraTab.XtraTabControl() - Me.XtraTabPage1 = New DevExpress.XtraTab.XtraTabPage() - Me.XtraTabPage2 = New DevExpress.XtraTab.XtraTabPage() - Me.listboxFileids = New DevExpress.XtraEditors.ListBoxControl() - CType(Me.listboxFiles, System.ComponentModel.ISupportInitialize).BeginInit() + Me.panelContainer1 = New DevExpress.XtraBars.Docking.DockPanel() + Me.DockPanel4 = New DevExpress.XtraBars.Docking.DockPanel() + Me.DockPanel4_Container = New DevExpress.XtraBars.Docking.ControlContainer() + Me.GridControl1 = New DevExpress.XtraGrid.GridControl() + Me.BindingSource1 = New System.Windows.Forms.BindingSource(Me.components) + Me.GridView1 = New DevExpress.XtraGrid.Views.Grid.GridView() + Me.GridColumn1 = New DevExpress.XtraGrid.Columns.GridColumn() + Me.GridColumn2 = New DevExpress.XtraGrid.Columns.GridColumn() + Me.DockPanel1 = New DevExpress.XtraBars.Docking.DockPanel() + Me.DockPanel1_Container = New DevExpress.XtraBars.Docking.ControlContainer() + Me.listboxFiles = New DevExpress.XtraEditors.ListBoxControl() + Me.DockPanel2 = New DevExpress.XtraBars.Docking.DockPanel() + Me.DockPanel2_Container = New DevExpress.XtraBars.Docking.ControlContainer() + Me.DocumentViewer1 = New DigitalData.Controls.DocumentViewer.DocumentViewer() + Me.Timer1 = New System.Windows.Forms.Timer(Me.components) + Me.BarDockingMenuItem1 = New DevExpress.XtraBars.BarDockingMenuItem() + Me.BarMdiChildrenListItem1 = New DevExpress.XtraBars.BarMdiChildrenListItem() + CType(Me.DocumentGroup1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.Document1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).BeginInit() - Me.SplitContainerControl1.SuspendLayout() + CType(Me.RepositoryItemTextEdit1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.DocumentManager1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.TabbedView1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.DockManager1, System.ComponentModel.ISupportInitialize).BeginInit() + Me.hideContainerBottom.SuspendLayout() + Me.DockPanel3.SuspendLayout() + Me.DockPanel3_Container.SuspendLayout() CType(Me.listboxLog, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.XtraTabControl1, System.ComponentModel.ISupportInitialize).BeginInit() - Me.XtraTabControl1.SuspendLayout() - Me.XtraTabPage1.SuspendLayout() - Me.XtraTabPage2.SuspendLayout() - CType(Me.listboxFileids, System.ComponentModel.ISupportInitialize).BeginInit() + Me.panelContainer1.SuspendLayout() + Me.DockPanel4.SuspendLayout() + Me.DockPanel4_Container.SuspendLayout() + CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.BindingSource1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.GridView1, System.ComponentModel.ISupportInitialize).BeginInit() + Me.DockPanel1.SuspendLayout() + Me.DockPanel1_Container.SuspendLayout() + CType(Me.listboxFiles, System.ComponentModel.ISupportInitialize).BeginInit() + Me.DockPanel2.SuspendLayout() + Me.DockPanel2_Container.SuspendLayout() Me.SuspendLayout() ' - 'listboxFiles + 'DocumentGroup1 ' - Me.listboxFiles.Dock = System.Windows.Forms.DockStyle.Fill - Me.listboxFiles.Location = New System.Drawing.Point(0, 0) - Me.listboxFiles.Name = "listboxFiles" - Me.listboxFiles.Size = New System.Drawing.Size(536, 270) - Me.listboxFiles.TabIndex = 1 + Me.DocumentGroup1.Items.AddRange(New DevExpress.XtraBars.Docking2010.Views.Tabbed.Document() {Me.Document1}) + ' + 'Document1 + ' + Me.Document1.Caption = "Document Viewer" + Me.Document1.ControlName = "DockPanel2" + 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] ' 'RibbonControl1 ' Me.RibbonControl1.ExpandCollapseItem.Id = 0 - Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.ButtonSelectFiles, Me.ButtonImportFiles, Me.buttonClearLog, Me.buttonClearFiles}) + Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.ButtonSelectFiles, Me.ButtonImportFiles, Me.buttonClearLog, Me.buttonClearFiles, Me.TextboxObejctId, Me.ButtonLoadFile, Me.BarListItem1, Me.BarButtonItem2, Me.BarToggleSwitchItem1, Me.BarDockingMenuItem1, Me.BarMdiChildrenListItem1}) Me.RibbonControl1.Location = New System.Drawing.Point(0, 0) - Me.RibbonControl1.MaxItemId = 5 + Me.RibbonControl1.MaxItemId = 13 Me.RibbonControl1.Name = "RibbonControl1" + Me.RibbonControl1.PageHeaderItemLinks.Add(Me.BarDockingMenuItem1) + Me.RibbonControl1.PageHeaderItemLinks.Add(Me.BarMdiChildrenListItem1) Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1}) - Me.RibbonControl1.Size = New System.Drawing.Size(1145, 158) + Me.RibbonControl1.RepositoryItems.AddRange(New DevExpress.XtraEditors.Repository.RepositoryItem() {Me.RepositoryItemTextEdit1}) + Me.RibbonControl1.Size = New System.Drawing.Size(1310, 158) Me.RibbonControl1.StatusBar = Me.RibbonStatusBar1 ' 'ButtonSelectFiles @@ -100,138 +148,379 @@ Partial Class Form1 Me.buttonClearFiles.ImageOptions.SvgImage = CType(resources.GetObject("buttonClearFiles.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) Me.buttonClearFiles.Name = "buttonClearFiles" ' + 'TextboxObejctId + ' + Me.TextboxObejctId.Caption = "Document Id" + Me.TextboxObejctId.Edit = Me.RepositoryItemTextEdit1 + Me.TextboxObejctId.EditWidth = 100 + Me.TextboxObejctId.Id = 5 + Me.TextboxObejctId.ImageOptions.SvgImage = CType(resources.GetObject("TextboxObejctId.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) + Me.TextboxObejctId.Name = "TextboxObejctId" + ' + 'RepositoryItemTextEdit1 + ' + Me.RepositoryItemTextEdit1.AutoHeight = False + Me.RepositoryItemTextEdit1.Name = "RepositoryItemTextEdit1" + ' + 'ButtonLoadFile + ' + Me.ButtonLoadFile.Caption = "Load File" + Me.ButtonLoadFile.Id = 6 + Me.ButtonLoadFile.ImageOptions.SvgImage = CType(resources.GetObject("ButtonLoadFile.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) + Me.ButtonLoadFile.Name = "ButtonLoadFile" + ' + 'BarListItem1 + ' + Me.BarListItem1.Caption = "Strategy" + Me.BarListItem1.Id = 7 + Me.BarListItem1.ImageOptions.SvgImage = CType(resources.GetObject("BarListItem1.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) + Me.BarListItem1.Name = "BarListItem1" + Me.BarListItem1.Strings.AddRange(New Object() {"Small Files", "Big Files", "Mixed Files"}) + ' + 'BarButtonItem2 + ' + Me.BarButtonItem2.Caption = "List Files" + Me.BarButtonItem2.Id = 9 + Me.BarButtonItem2.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonItem2.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) + Me.BarButtonItem2.Name = "BarButtonItem2" + ' + 'BarToggleSwitchItem1 + ' + Me.BarToggleSwitchItem1.Caption = "Load File every 3 Seconds" + Me.BarToggleSwitchItem1.Id = 10 + Me.BarToggleSwitchItem1.Name = "BarToggleSwitchItem1" + ' 'RibbonPage1 ' - Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1, Me.RibbonPageGroup2, Me.RibbonPageGroup3}) + Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1, Me.RibbonPageGroup4, Me.RibbonPageGroup3}) Me.RibbonPage1.Name = "RibbonPage1" - Me.RibbonPage1.Text = "Import Files" + Me.RibbonPage1.Text = "Start" ' 'RibbonPageGroup1 ' Me.RibbonPageGroup1.ItemLinks.Add(Me.ButtonSelectFiles) + Me.RibbonPageGroup1.ItemLinks.Add(Me.ButtonImportFiles) Me.RibbonPageGroup1.Name = "RibbonPageGroup1" - Me.RibbonPageGroup1.Text = "RibbonPageGroup1" + Me.RibbonPageGroup1.Text = "Import" ' - 'RibbonPageGroup2 + 'RibbonPageGroup4 ' - Me.RibbonPageGroup2.ItemLinks.Add(Me.ButtonImportFiles) - Me.RibbonPageGroup2.Name = "RibbonPageGroup2" - Me.RibbonPageGroup2.Text = "RibbonPageGroup2" + Me.RibbonPageGroup4.ItemLinks.Add(Me.TextboxObejctId) + Me.RibbonPageGroup4.ItemLinks.Add(Me.BarToggleSwitchItem1) + Me.RibbonPageGroup4.ItemLinks.Add(Me.ButtonLoadFile) + Me.RibbonPageGroup4.ItemLinks.Add(Me.BarButtonItem2) + Me.RibbonPageGroup4.Name = "RibbonPageGroup4" + Me.RibbonPageGroup4.Text = "Retrieve" ' 'RibbonPageGroup3 ' - Me.RibbonPageGroup3.ItemLinks.Add(Me.buttonClearLog) + Me.RibbonPageGroup3.ItemLinks.Add(Me.buttonClearLog, True) Me.RibbonPageGroup3.ItemLinks.Add(Me.buttonClearFiles) Me.RibbonPageGroup3.Name = "RibbonPageGroup3" - Me.RibbonPageGroup3.Text = "RibbonPageGroup3" + Me.RibbonPageGroup3.Text = "Utils" ' 'RibbonStatusBar1 ' - Me.RibbonStatusBar1.Location = New System.Drawing.Point(0, 453) + Me.RibbonStatusBar1.Location = New System.Drawing.Point(0, 640) Me.RibbonStatusBar1.Name = "RibbonStatusBar1" Me.RibbonStatusBar1.Ribbon = Me.RibbonControl1 - Me.RibbonStatusBar1.Size = New System.Drawing.Size(1145, 24) + Me.RibbonStatusBar1.Size = New System.Drawing.Size(1310, 24) ' 'RibbonPage2 ' Me.RibbonPage2.Name = "RibbonPage2" Me.RibbonPage2.Text = "RibbonPage2" ' - 'SplitContainerControl1 + 'DocumentManager1 ' - Me.SplitContainerControl1.Dock = System.Windows.Forms.DockStyle.Fill - Me.SplitContainerControl1.Location = New System.Drawing.Point(0, 0) - Me.SplitContainerControl1.Name = "SplitContainerControl1" - Me.SplitContainerControl1.Panel1.Controls.Add(Me.listboxFiles) - Me.SplitContainerControl1.Panel1.Text = "Panel1" - Me.SplitContainerControl1.Panel2.Controls.Add(Me.listboxLog) - Me.SplitContainerControl1.Panel2.Text = "Panel2" - Me.SplitContainerControl1.Size = New System.Drawing.Size(1143, 270) - Me.SplitContainerControl1.SplitterPosition = 536 - Me.SplitContainerControl1.TabIndex = 4 + Me.DocumentManager1.ContainerControl = Me + Me.DocumentManager1.MenuManager = Me.RibbonControl1 + 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}) + DockingContainer3.Element = Me.DocumentGroup1 + Me.TabbedView1.RootContainer.Nodes.AddRange(New DevExpress.XtraBars.Docking2010.Views.Tabbed.DockingContainer() {DockingContainer3}) + ' + 'DockManager1 + ' + Me.DockManager1.AutoHideContainers.AddRange(New DevExpress.XtraBars.Docking.AutoHideContainer() {Me.hideContainerBottom}) + Me.DockManager1.Form = Me + Me.DockManager1.RootPanels.AddRange(New DevExpress.XtraBars.Docking.DockPanel() {Me.panelContainer1, Me.DockPanel2}) + 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"}) + ' + 'hideContainerBottom + ' + Me.hideContainerBottom.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(240, Byte), Integer), CType(CType(240, Byte), Integer)) + Me.hideContainerBottom.Controls.Add(Me.DockPanel3) + Me.hideContainerBottom.Dock = System.Windows.Forms.DockStyle.Bottom + Me.hideContainerBottom.Location = New System.Drawing.Point(0, 619) + Me.hideContainerBottom.Name = "hideContainerBottom" + Me.hideContainerBottom.Size = New System.Drawing.Size(1310, 21) + ' + 'DockPanel3 + ' + Me.DockPanel3.Controls.Add(Me.DockPanel3_Container) + Me.DockPanel3.Dock = DevExpress.XtraBars.Docking.DockingStyle.Bottom + Me.DockPanel3.FloatVertical = True + Me.DockPanel3.ID = New System.Guid("b0b62b80-3cf3-4f78-a50d-4a79b9cabc39") + Me.DockPanel3.Location = New System.Drawing.Point(0, 0) + Me.DockPanel3.Name = "DockPanel3" + Me.DockPanel3.Options.ShowCloseButton = False + Me.DockPanel3.OriginalSize = New System.Drawing.Size(200, 119) + Me.DockPanel3.SavedDock = DevExpress.XtraBars.Docking.DockingStyle.Bottom + Me.DockPanel3.SavedIndex = 0 + Me.DockPanel3.Size = New System.Drawing.Size(1310, 119) + Me.DockPanel3.Text = "Log" + Me.DockPanel3.Visibility = DevExpress.XtraBars.Docking.DockVisibility.AutoHide + ' + 'DockPanel3_Container + ' + Me.DockPanel3_Container.Controls.Add(Me.listboxLog) + Me.DockPanel3_Container.Location = New System.Drawing.Point(3, 27) + Me.DockPanel3_Container.Name = "DockPanel3_Container" + Me.DockPanel3_Container.Size = New System.Drawing.Size(1304, 89) + Me.DockPanel3_Container.TabIndex = 0 ' 'listboxLog ' Me.listboxLog.Dock = System.Windows.Forms.DockStyle.Fill Me.listboxLog.Location = New System.Drawing.Point(0, 0) Me.listboxLog.Name = "listboxLog" - Me.listboxLog.Size = New System.Drawing.Size(597, 270) + Me.listboxLog.Size = New System.Drawing.Size(1304, 89) Me.listboxLog.TabIndex = 0 ' - 'XtraTabControl1 + 'panelContainer1 ' - Me.XtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill - Me.XtraTabControl1.Location = New System.Drawing.Point(0, 158) - Me.XtraTabControl1.Name = "XtraTabControl1" - Me.XtraTabControl1.SelectedTabPage = Me.XtraTabPage1 - Me.XtraTabControl1.Size = New System.Drawing.Size(1145, 295) - Me.XtraTabControl1.TabIndex = 7 - Me.XtraTabControl1.TabPages.AddRange(New DevExpress.XtraTab.XtraTabPage() {Me.XtraTabPage1, Me.XtraTabPage2}) + Me.panelContainer1.ActiveChild = Me.DockPanel4 + Me.panelContainer1.Controls.Add(Me.DockPanel4) + Me.panelContainer1.Controls.Add(Me.DockPanel1) + Me.panelContainer1.Dock = DevExpress.XtraBars.Docking.DockingStyle.Left + Me.panelContainer1.ID = New System.Guid("17067a8c-1b48-4d4a-b383-b7f8d5a8be59") + Me.panelContainer1.Location = New System.Drawing.Point(0, 158) + Me.panelContainer1.Name = "panelContainer1" + Me.panelContainer1.Options.ShowCloseButton = False + Me.panelContainer1.OriginalSize = New System.Drawing.Size(451, 200) + Me.panelContainer1.Size = New System.Drawing.Size(451, 461) + Me.panelContainer1.Tabbed = True + Me.panelContainer1.Text = "panelContainer1" ' - 'XtraTabPage1 + 'DockPanel4 ' - Me.XtraTabPage1.Controls.Add(Me.SplitContainerControl1) - Me.XtraTabPage1.Name = "XtraTabPage1" - Me.XtraTabPage1.Size = New System.Drawing.Size(1143, 270) - Me.XtraTabPage1.Text = "XtraTabPage1" + Me.DockPanel4.Controls.Add(Me.DockPanel4_Container) + Me.DockPanel4.Dock = DevExpress.XtraBars.Docking.DockingStyle.Fill + Me.DockPanel4.ID = New System.Guid("bddc849b-1066-4d2f-8fd3-9bc377a2bd74") + Me.DockPanel4.Location = New System.Drawing.Point(3, 26) + Me.DockPanel4.Name = "DockPanel4" + Me.DockPanel4.Options.ShowCloseButton = False + Me.DockPanel4.OriginalSize = New System.Drawing.Size(200, 200) + Me.DockPanel4.Size = New System.Drawing.Size(444, 406) + Me.DockPanel4.Text = "List Files" ' - 'XtraTabPage2 + 'DockPanel4_Container ' - Me.XtraTabPage2.Controls.Add(Me.listboxFileids) - Me.XtraTabPage2.Name = "XtraTabPage2" - Me.XtraTabPage2.Size = New System.Drawing.Size(1143, 270) - Me.XtraTabPage2.Text = "XtraTabPage2" + Me.DockPanel4_Container.Controls.Add(Me.GridControl1) + Me.DockPanel4_Container.Location = New System.Drawing.Point(0, 0) + Me.DockPanel4_Container.Name = "DockPanel4_Container" + Me.DockPanel4_Container.Size = New System.Drawing.Size(444, 406) + Me.DockPanel4_Container.TabIndex = 0 ' - 'listboxFileids + 'GridControl1 ' - Me.listboxFileids.Dock = System.Windows.Forms.DockStyle.Left - Me.listboxFileids.Location = New System.Drawing.Point(0, 0) - Me.listboxFileids.Name = "listboxFileids" - Me.listboxFileids.Size = New System.Drawing.Size(278, 270) - Me.listboxFileids.TabIndex = 0 + Me.GridControl1.DataSource = Me.BindingSource1 + Me.GridControl1.Dock = System.Windows.Forms.DockStyle.Fill + Me.GridControl1.Location = New System.Drawing.Point(0, 0) + Me.GridControl1.MainView = Me.GridView1 + Me.GridControl1.MenuManager = Me.RibbonControl1 + Me.GridControl1.Name = "GridControl1" + Me.GridControl1.Size = New System.Drawing.Size(444, 406) + Me.GridControl1.TabIndex = 0 + Me.GridControl1.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView1}) + ' + 'BindingSource1 + ' + ' + 'GridView1 + ' + Me.GridView1.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.GridColumn1, Me.GridColumn2}) + Me.GridView1.GridControl = Me.GridControl1 + Me.GridView1.Name = "GridView1" + Me.GridView1.OptionsBehavior.Editable = False + Me.GridView1.OptionsBehavior.ReadOnly = True + ' + 'GridColumn1 + ' + Me.GridColumn1.Caption = "Object Id" + Me.GridColumn1.FieldName = "IDB_OBJ_ID" + Me.GridColumn1.MaxWidth = 100 + Me.GridColumn1.MinWidth = 100 + Me.GridColumn1.Name = "GridColumn1" + Me.GridColumn1.Visible = True + Me.GridColumn1.VisibleIndex = 0 + Me.GridColumn1.Width = 100 + ' + 'GridColumn2 + ' + Me.GridColumn2.Caption = "Document Name" + Me.GridColumn2.FieldName = "DocName" + Me.GridColumn2.Name = "GridColumn2" + Me.GridColumn2.Visible = True + Me.GridColumn2.VisibleIndex = 1 + Me.GridColumn2.Width = 409 + ' + 'DockPanel1 + ' + Me.DockPanel1.Controls.Add(Me.DockPanel1_Container) + Me.DockPanel1.Dock = DevExpress.XtraBars.Docking.DockingStyle.Fill + Me.DockPanel1.ID = New System.Guid("12b5eead-07cc-48c6-93a4-85cd0b4b82ce") + Me.DockPanel1.Location = New System.Drawing.Point(3, 26) + Me.DockPanel1.Name = "DockPanel1" + Me.DockPanel1.Options.ShowCloseButton = False + Me.DockPanel1.OriginalSize = New System.Drawing.Size(200, 200) + Me.DockPanel1.Size = New System.Drawing.Size(444, 406) + Me.DockPanel1.Text = "Files to Upload" + ' + 'DockPanel1_Container + ' + Me.DockPanel1_Container.Controls.Add(Me.listboxFiles) + Me.DockPanel1_Container.Location = New System.Drawing.Point(0, 0) + Me.DockPanel1_Container.Name = "DockPanel1_Container" + Me.DockPanel1_Container.Size = New System.Drawing.Size(444, 406) + Me.DockPanel1_Container.TabIndex = 0 + ' + 'listboxFiles + ' + Me.listboxFiles.Dock = System.Windows.Forms.DockStyle.Fill + Me.listboxFiles.Location = New System.Drawing.Point(0, 0) + Me.listboxFiles.Name = "listboxFiles" + Me.listboxFiles.Size = New System.Drawing.Size(444, 406) + Me.listboxFiles.TabIndex = 1 + ' + 'DockPanel2 + ' + Me.DockPanel2.Controls.Add(Me.DockPanel2_Container) + Me.DockPanel2.DockedAsTabbedDocument = True + Me.DockPanel2.ID = New System.Guid("e82850af-b594-49e9-ae83-36d4bf007da5") + Me.DockPanel2.Name = "DockPanel2" + Me.DockPanel2.Options.ShowCloseButton = False + Me.DockPanel2.OriginalSize = New System.Drawing.Size(200, 200) + Me.DockPanel2.Text = "Document Viewer" + ' + 'DockPanel2_Container + ' + Me.DockPanel2_Container.Controls.Add(Me.DocumentViewer1) + Me.DockPanel2_Container.Location = New System.Drawing.Point(0, 0) + Me.DockPanel2_Container.Name = "DockPanel2_Container" + Me.DockPanel2_Container.Size = New System.Drawing.Size(853, 432) + Me.DockPanel2_Container.TabIndex = 0 + ' + 'DocumentViewer1 + ' + Me.DocumentViewer1.Dock = System.Windows.Forms.DockStyle.Fill + Me.DocumentViewer1.Location = New System.Drawing.Point(0, 0) + Me.DocumentViewer1.Name = "DocumentViewer1" + Me.DocumentViewer1.Size = New System.Drawing.Size(853, 432) + Me.DocumentViewer1.TabIndex = 0 + ' + 'Timer1 + ' + Me.Timer1.Interval = 3000 + ' + 'BarDockingMenuItem1 + ' + Me.BarDockingMenuItem1.Caption = "BarDockingMenuItem1" + Me.BarDockingMenuItem1.Id = 11 + Me.BarDockingMenuItem1.Name = "BarDockingMenuItem1" + ' + 'BarMdiChildrenListItem1 + ' + Me.BarMdiChildrenListItem1.Caption = "BarMdiChildrenListItem1" + Me.BarMdiChildrenListItem1.Id = 12 + Me.BarMdiChildrenListItem1.Name = "BarMdiChildrenListItem1" ' 'Form1 ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(1145, 477) - Me.Controls.Add(Me.XtraTabControl1) + Me.ClientSize = New System.Drawing.Size(1310, 664) + Me.Controls.Add(Me.panelContainer1) + Me.Controls.Add(Me.hideContainerBottom) Me.Controls.Add(Me.RibbonStatusBar1) Me.Controls.Add(Me.RibbonControl1) Me.Name = "Form1" Me.Ribbon = Me.RibbonControl1 Me.StatusBar = Me.RibbonStatusBar1 Me.Text = "Form1" - CType(Me.listboxFiles, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.DocumentGroup1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.Document1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).EndInit() - Me.SplitContainerControl1.ResumeLayout(False) + CType(Me.RepositoryItemTextEdit1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.DocumentManager1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.TabbedView1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.DockManager1, System.ComponentModel.ISupportInitialize).EndInit() + Me.hideContainerBottom.ResumeLayout(False) + Me.DockPanel3.ResumeLayout(False) + Me.DockPanel3_Container.ResumeLayout(False) CType(Me.listboxLog, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.XtraTabControl1, System.ComponentModel.ISupportInitialize).EndInit() - Me.XtraTabControl1.ResumeLayout(False) - Me.XtraTabPage1.ResumeLayout(False) - Me.XtraTabPage2.ResumeLayout(False) - CType(Me.listboxFileids, System.ComponentModel.ISupportInitialize).EndInit() + Me.panelContainer1.ResumeLayout(False) + Me.DockPanel4.ResumeLayout(False) + Me.DockPanel4_Container.ResumeLayout(False) + CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.BindingSource1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.GridView1, System.ComponentModel.ISupportInitialize).EndInit() + Me.DockPanel1.ResumeLayout(False) + Me.DockPanel1_Container.ResumeLayout(False) + CType(Me.listboxFiles, System.ComponentModel.ISupportInitialize).EndInit() + Me.DockPanel2.ResumeLayout(False) + Me.DockPanel2_Container.ResumeLayout(False) Me.ResumeLayout(False) Me.PerformLayout() End Sub - Friend WithEvents listboxFiles As DevExpress.XtraEditors.ListBoxControl 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 ButtonSelectFiles As DevExpress.XtraBars.BarButtonItem - Friend WithEvents SplitContainerControl1 As DevExpress.XtraEditors.SplitContainerControl - Friend WithEvents listboxLog As DevExpress.XtraEditors.ListBoxControl Friend WithEvents ButtonImportFiles As DevExpress.XtraBars.BarButtonItem Friend WithEvents buttonClearLog As DevExpress.XtraBars.BarButtonItem Friend WithEvents RibbonPageGroup3 As DevExpress.XtraBars.Ribbon.RibbonPageGroup Friend WithEvents buttonClearFiles As DevExpress.XtraBars.BarButtonItem - Friend WithEvents XtraTabControl1 As DevExpress.XtraTab.XtraTabControl - Friend WithEvents XtraTabPage1 As DevExpress.XtraTab.XtraTabPage - Friend WithEvents XtraTabPage2 As DevExpress.XtraTab.XtraTabPage - Friend WithEvents listboxFileids As DevExpress.XtraEditors.ListBoxControl + Friend WithEvents TextboxObejctId As DevExpress.XtraBars.BarEditItem + Friend WithEvents RepositoryItemTextEdit1 As DevExpress.XtraEditors.Repository.RepositoryItemTextEdit + Friend WithEvents ButtonLoadFile As DevExpress.XtraBars.BarButtonItem + Friend WithEvents RibbonPageGroup4 As DevExpress.XtraBars.Ribbon.RibbonPageGroup + Friend WithEvents BarListItem1 As DevExpress.XtraBars.BarListItem + Friend WithEvents DocumentManager1 As DevExpress.XtraBars.Docking2010.DocumentManager + Friend WithEvents DockPanel1 As DevExpress.XtraBars.Docking.DockPanel + Friend WithEvents DockPanel1_Container As DevExpress.XtraBars.Docking.ControlContainer + Friend WithEvents listboxFiles As DevExpress.XtraEditors.ListBoxControl + Friend WithEvents listboxLog As DevExpress.XtraEditors.ListBoxControl + Friend WithEvents DocumentViewer1 As DigitalData.Controls.DocumentViewer.DocumentViewer + Friend WithEvents TabbedView1 As DevExpress.XtraBars.Docking2010.Views.Tabbed.TabbedView + Friend WithEvents DockManager1 As DevExpress.XtraBars.Docking.DockManager + Friend WithEvents DockPanel3 As DevExpress.XtraBars.Docking.DockPanel + Friend WithEvents DockPanel3_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 DockPanel2 As DevExpress.XtraBars.Docking.DockPanel + Friend WithEvents DockPanel2_Container As DevExpress.XtraBars.Docking.ControlContainer + Friend WithEvents RibbonStatusBar1 As DevExpress.XtraBars.Ribbon.RibbonStatusBar + Friend WithEvents panelContainer1 As DevExpress.XtraBars.Docking.DockPanel + Friend WithEvents DockPanel4 As DevExpress.XtraBars.Docking.DockPanel + Friend WithEvents DockPanel4_Container As DevExpress.XtraBars.Docking.ControlContainer + Friend WithEvents GridControl1 As DevExpress.XtraGrid.GridControl + Friend WithEvents GridView1 As DevExpress.XtraGrid.Views.Grid.GridView + Friend WithEvents hideContainerBottom As DevExpress.XtraBars.Docking.AutoHideContainer + Friend WithEvents BarButtonItem2 As DevExpress.XtraBars.BarButtonItem + Friend WithEvents GridColumn1 As DevExpress.XtraGrid.Columns.GridColumn + Friend WithEvents GridColumn2 As DevExpress.XtraGrid.Columns.GridColumn + Friend WithEvents BindingSource1 As BindingSource + Friend WithEvents BarToggleSwitchItem1 As DevExpress.XtraBars.BarToggleSwitchItem + Friend WithEvents Timer1 As Timer + Friend WithEvents BarDockingMenuItem1 As DevExpress.XtraBars.BarDockingMenuItem + Friend WithEvents BarMdiChildrenListItem1 As DevExpress.XtraBars.BarMdiChildrenListItem End Class diff --git a/GUIs.Test.EDMIBenchmark/Form1.resx b/GUIs.Test.EDMIBenchmark/Form1.resx index 2bbe4509..3d74ebd0 100644 --- a/GUIs.Test.EDMIBenchmark/Form1.resx +++ b/GUIs.Test.EDMIBenchmark/Form1.resx @@ -196,4 +196,106 @@ Ny41LDExLjh6IiBjbGFzcz0iUmVkIiAvPg0KPC9zdmc+Cw== + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAGkEAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAxNiAxNiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MTYgMTYiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9Cgku + R3JlZW57ZmlsbDojMDM5QzIzO30KCS5XaGl0ZXtmaWxsOiNGRkZGRkY7fQoJLnN0MHtvcGFjaXR5OjAu + Njt9Cgkuc3Qxe29wYWNpdHk6MC41O30KPC9zdHlsZT4NCiAgPHBhdGggZD0iTTE1LDFIMUMwLjUsMSww + LDEuNSwwLDJ2MTJjMCwwLjUsMC41LDEsMSwxaDE0YzAuNSwwLDEtMC41LDEtMVYyQzE2LDEuNSwxNS41 + LDEsMTUsMXogTTE1LDE0SDFWMmgxNFYxNHoiIGNsYXNzPSJCbGFjayIgLz4NCiAgPHBhdGggZD0iTTAs + NVYyYzAtMC41LDAuNS0xLDEtMWgxNGMwLjYsMCwxLDAuNSwxLDF2M0gweiIgY2xhc3M9IkdyZWVuIiAv + Pg0KICA8ZyBpZD0iTGF5ZXJfMiIgY2xhc3M9InN0MCI+DQogICAgPHJlY3QgeD0iMSIgeT0iMiIgd2lk + dGg9IjE0IiBoZWlnaHQ9IjIiIHJ4PSIwIiByeT0iMCIgY2xhc3M9IldoaXRlIiAvPg0KICA8L2c+DQog + IDxyZWN0IHg9IjEiIHk9IjUiIHdpZHRoPSIxNCIgaGVpZ2h0PSI5IiByeD0iMCIgcnk9IjAiIGNsYXNz + PSJXaGl0ZSIgLz4NCiAgPHBhdGggZD0iTTUsMTJWN2gxdjVINXoiIGNsYXNzPSJCbGFjayIgLz4NCiAg + PHBhdGggZD0iTTExLDEyaC0xbDAtMC42QzkuOCwxMS42LDkuNSwxMiw4LjcsMTJjLTAuNSwwLTAuOS0w + LjItMS4yLTAuNUM3LjIsMTEuMiw3LDEwLjcsNywxMC4xQzcsOS41LDcuMiw5LDcuNSw4LjcgIGMwLjMt + MC4zLDAuNy0wLjUsMS4yLTAuNXMwLjksMC4yLDEuMiwwLjVWN0gxMVYxMnogTTguMSwxMC4xYzAsMC40 + LDAsMS4yLDAuOSwxLjJjMC44LDAsMC45LTAuOCwwLjktMS4xQzkuOSw5LjgsOS44LDksOSw5ICBDOC4z + LDksOC4xLDkuNyw4LjEsMTAuMXoiIGNsYXNzPSJCbGFjayIgLz4NCjwvc3ZnPgs= + + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAFcCAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJ + LlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5HcmVlbntmaWxsOiMwMzlD + MjM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjc1O30KPC9zdHlsZT4NCiAgPGcgaWQ9Ik5leHQiPg0KICAgIDxwYXRoIGQ9Ik0xNiwyQzgu + MywyLDIsOC4zLDIsMTZzNi4zLDE0LDE0LDE0czE0LTYuMywxNC0xNFMyMy43LDIsMTYsMnogTTE2LDI0 + bC04LThoNlY4aDR2OGg2TDE2LDI0eiIgY2xhc3M9IkdyZWVuIiAvPg0KICA8L2c+DQo8L3N2Zz4L + + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAMMDAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z + ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5SZWR7ZmlsbDojRDExQzFDO30KCS5HcmVlbntmaWxsOiMwMzlD + MjM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQoJLnN0MntkaXNwbGF5Om5vbmU7fQoJLnN0M3tk + aXNwbGF5OmlubGluZTtmaWxsOiNGRkIxMTU7fQoJLnN0NHtkaXNwbGF5OmlubGluZTt9Cgkuc3Q1e2Rp + c3BsYXk6aW5saW5lO29wYWNpdHk6MC43NTt9Cgkuc3Q2e2Rpc3BsYXk6aW5saW5lO29wYWNpdHk6MC41 + O30KCS5zdDd7ZGlzcGxheTppbmxpbmU7ZmlsbDojMDM5QzIzO30KCS5zdDh7ZGlzcGxheTppbmxpbmU7 + ZmlsbDojRDExQzFDO30KCS5zdDl7ZGlzcGxheTppbmxpbmU7ZmlsbDojMTE3N0Q3O30KCS5zdDEwe2Rp + c3BsYXk6aW5saW5lO2ZpbGw6I0ZGRkZGRjt9Cjwvc3R5bGU+DQogIDxnIGlkPSJLUElfeDVGX0RlZmlu + aXRpb24iPg0KICAgIDxwb2x5Z29uIHBvaW50cz0iMjYsOS4yIDI2LDAgMTIsMTQgOCwxMCAyLDE2IDIs + MjQgMTEuMiwyNCAgIiBjbGFzcz0iR3JlZW4iIC8+DQogICAgPHBhdGggZD0iTTYsMzJoMjZWNkw2LDMy + eiBNMjYsMjZoLTUuNWw1LjUtNS41VjI2eiIgY2xhc3M9IlllbGxvdyIgLz4NCiAgPC9nPg0KPC9zdmc+ + Cw== + + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAMEDAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAxNiAxNiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MTYgMTYiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9Cgku + V2hpdGV7ZmlsbDojRkZGRkZGO30KCS5HcmVlbntmaWxsOiMwMzlDMjM7fQoJLnN0MHtvcGFjaXR5OjAu + Njt9Cgkuc3Qxe29wYWNpdHk6MC41O30KPC9zdHlsZT4NCiAgPHBhdGggZD0iTTE1LDFIMUMwLjUsMSww + LDEuNSwwLDJ2MTFjMCwwLjUsMC41LDEsMSwxaDE0YzAuNSwwLDEtMC41LDEtMVYyQzE2LDEuNSwxNS41 + LDEsMTUsMXogTTE1LDEzSDFWMmgxNFYxM3oiIGNsYXNzPSJCbGFjayIgLz4NCiAgPHBhdGggZD0iTTAs + NVYyYzAtMC41LDAuNS0xLDEtMWgxNGMwLjYsMCwxLDAuNSwxLDF2M0gweiIgY2xhc3M9IkdyZWVuIiAv + Pg0KICA8ZyBpZD0iTGF5ZXJfMiIgY2xhc3M9InN0MCI+DQogICAgPHJlY3QgeD0iMSIgeT0iMiIgd2lk + dGg9IjE0IiBoZWlnaHQ9IjIiIHJ4PSIwIiByeT0iMCIgY2xhc3M9IldoaXRlIiAvPg0KICA8L2c+DQog + IDxyZWN0IHg9IjEiIHk9IjUiIHdpZHRoPSIxNCIgaGVpZ2h0PSI4IiByeD0iMCIgcnk9IjAiIGNsYXNz + PSJXaGl0ZSIgLz4NCiAgPGcgaWQ9IkxheWVyXzMiIGNsYXNzPSJzdDAiPg0KICAgIDxwYXRoIGQ9Ik0x + NSw4VjdoLTNWNWgtMXYySDVWNUg0djJIMXYxaDN2MkgxdjFoM3YyaDF2LTJoNnYyaDF2LTJoM3YtMWgt + M1Y4SDE1eiBNMTEsMTBINVY4aDZWMTB6IiBjbGFzcz0iQmxhY2siIC8+DQogIDwvZz4NCjwvc3ZnPgs= + + + + 17, 17 + + + 181, 17 + + + 316, 17 + + + 453, 17 + \ No newline at end of file diff --git a/GUIs.Test.EDMIBenchmark/Form1.vb b/GUIs.Test.EDMIBenchmark/Form1.vb index 1080747a..c117e859 100644 --- a/GUIs.Test.EDMIBenchmark/Form1.vb +++ b/GUIs.Test.EDMIBenchmark/Form1.vb @@ -15,6 +15,13 @@ Public Class Form1 "net.tcp://172.24.12.39:9000/DigitalData/Services/Main") _Channel = oChannelFactory.CreateChannel() _Channel.Open() + + DocumentViewer1.Init(oLogConfig, "21182889975216572111813147150675976632") + End Sub + + Private Sub AddLogMessage(Message As String) + listboxLog.Items.Add(Message) + listboxLog.MakeItemVisible(listboxLog.Items.Count - 1) End Sub Private Sub ButtonSelectFiles_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles ButtonSelectFiles.ItemClick @@ -42,7 +49,7 @@ Public Class Form1 Dim oFileName As String = oItem Dim oFileInfo As New FileInfo(oFileName) - listboxLog.Items.Add($"Importing {oFileInfo.Name}... ({FormatBytes(oFileInfo.Length)})") + AddLogMessage($"Importing {oFileInfo.Name}... ({FormatBytes(oFileInfo.Length)})") Dim oContents As Byte() = New Byte(oFileInfo.Length) {} @@ -50,21 +57,19 @@ Public Class Form1 Await oStream.ReadAsync(oContents, 0, oFileInfo.Length) End Using - Dim oResult As EDMIServiceReference.DocumentResult2 = Await _Channel.ImportFileAsync(oFileInfo, oContents, False, 0) + Dim oResult As EDMIServiceReference.DocumentResult = Await _Channel.ImportFileAsync(oFileInfo.Name, oContents, Environment.UserName) If oResult.OK Then - listboxLog.Items.Add($"File {oFileInfo.Name} imported!") - listboxFileids.Items.Add(oResult.Document.FileId) + AddLogMessage($"File [{oFileInfo.Name}] with Id [{oResult.Document.FileId}] imported!") Else - listboxLog.Items.Add($"Import Error: {oResult.ErrorMessage}") + AddLogMessage($"Import Error: {oResult.ErrorMessage}") End If oSW.Stop() - listboxLog.Items.Add($"Import Time: {FormatTime(oSW.ElapsedMilliseconds)}") - listboxLog.Items.Add("") + AddLogMessage($"Import Time: {FormatTime(oSW.ElapsedMilliseconds)}") + AddLogMessage("") Next oSWTotal.Stop() - listboxLog.Items.Add($"Total Time: {FormatTime(oSWTotal.ElapsedMilliseconds)}") - listboxLog.MakeItemVisible(listboxLog.Items.Count - 1) + AddLogMessage($"Total Time: {FormatTime(oSWTotal.ElapsedMilliseconds)}") End Sub Private Sub buttonClearLog_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles buttonClearLog.ItemClick @@ -111,4 +116,104 @@ Public Class Form1 End Try End Function + + Private Async Sub ButtonLoadFile_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles ButtonLoadFile.ItemClick + Try + Dim oSWTotal As New Stopwatch() + oSWTotal.Start() + + If TextboxObejctId.EditValue = "" Then + MsgBox("Please enter an object id!", MsgBoxStyle.Exclamation, "Uh oh!") + End If + + Dim oObjectId As Integer = TextboxObejctId.EditValue + + Dim oResponse = Await _Channel.GetFileByObjectIdAsync(New EDMIServiceReference.DocumentStreamRequest() With {.ObjectId = oObjectId}) + Dim oMemoryStream As New MemoryStream() + oResponse.FileContents.CopyTo(oMemoryStream) + oMemoryStream.Position = 0 + + DocumentViewer1.LoadFile(oResponse.FileName, oMemoryStream) + + oSWTotal.Stop() + AddLogMessage($"File [{oResponse.FileName}] loaded: [{FormatTime(oSWTotal.ElapsedMilliseconds)}]") + Catch ex As FaultException + MsgBox(ex.Reason.ToString, MsgBoxStyle.Critical, "Error from Service") + Catch ex As Exception + MsgBox(ex.Message, MsgBoxStyle.Critical, "Uh oh!") + End Try + End Sub + + Private Async Sub BarButtonItem2_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem2.ItemClick + Try + Dim oResult = Await _Channel.ListFilesForUserAsync() + BindingSource1.DataSource = oResult.Datatable + Catch ex As Exception + MsgBox(ex.Message, MsgBoxStyle.Critical, "Uh oh!") + End Try + End Sub + + Private Async Sub BindingSource1_CurrentChanged(sender As Object, e As EventArgs) Handles BindingSource1.CurrentChanged + Dim oRow As DataRow = GridView1.GetFocusedDataRow() + + If oRow Is Nothing Then + Exit Sub + End If + + Try + Dim oSWTotal As New Stopwatch() + oSWTotal.Start() + + Dim oObjectId As Int64 = oRow.Item("IDB_OBJ_ID") + Dim oResponse = Await _Channel.GetFileByObjectIdAsync(New EDMIServiceReference.DocumentStreamRequest() With {.ObjectId = oObjectId}) + Dim oMemoryStream As New MemoryStream() + oResponse.FileContents.CopyTo(oMemoryStream) + oMemoryStream.Position = 0 + + DocumentViewer1.LoadFile(oResponse.FileName, oMemoryStream) + + oSWTotal.Stop() + AddLogMessage($"File [{oResponse.FileName}] loaded: [{FormatTime(oSWTotal.ElapsedMilliseconds)}]") + Catch ex As FaultException + MsgBox(ex.Reason.ToString, MsgBoxStyle.Critical, "Error from Service") + Catch ex As Exception + MsgBox(ex.Message, MsgBoxStyle.Critical, "Uh oh!") + End Try + End Sub + + Private Async Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick + Try + Dim oSWTotal As New Stopwatch() + oSWTotal.Start() + + Dim oObjectId As Integer = TextboxObejctId.EditValue + + Dim oResponse = Await _Channel.GetFileByObjectIdAsync(New EDMIServiceReference.DocumentStreamRequest() With {.ObjectId = oObjectId}) + Dim oMemoryStream As New MemoryStream() + oResponse.FileContents.CopyTo(oMemoryStream) + oMemoryStream.Position = 0 + + DocumentViewer1.LoadFile(oResponse.FileName, oMemoryStream) + + oSWTotal.Stop() + AddLogMessage($"File [{oResponse.FileName}] loaded: [{FormatTime(oSWTotal.ElapsedMilliseconds)}]") + Catch ex As Exception + AddLogMessage($"Error while getting file: [{ex.Message}]") + End Try + End Sub + + Private Sub BarToggleSwitchItem1_CheckedChanged(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarToggleSwitchItem1.CheckedChanged + If BarToggleSwitchItem1.Checked Then + If TextboxObejctId.EditValue = "" Then + Timer1.Stop() + MsgBox("Please set a ObjectId!", MsgBoxStyle.Critical, Text) + Else + Timer1.Start() + AddLogMessage("Timer Started!") + End If + Else + Timer1.Stop() + AddLogMessage("Timer Stopped!") + End If + End Sub End Class diff --git a/GUIs.Test.EDMIBenchmark/GUIs.Test.EDMIBenchmark.vbproj b/GUIs.Test.EDMIBenchmark/GUIs.Test.EDMIBenchmark.vbproj index 7b567b30..c159aa05 100644 --- a/GUIs.Test.EDMIBenchmark/GUIs.Test.EDMIBenchmark.vbproj +++ b/GUIs.Test.EDMIBenchmark/GUIs.Test.EDMIBenchmark.vbproj @@ -54,9 +54,19 @@ + ..\Controls.DocumentViewer\obj\Debug\DigitalData.Controls.DocumentViewer.dll + + ..\Controls.LookupGrid\obj\Debug\DigitalData.Controls.LookupGrid.dll + + + D:\ProgramFiles\GdPicture.NET 14\Redist\GdPicture.NET (.NET Framework 4.5)\GdPicture.NET.14.dll + + + P:\Visual Studio Projekte\Bibliotheken\MSG .NET\Bin\22_11_19\Independentsoft.Msg.dll + ..\packages\NLog.4.7.0\lib\net45\NLog.dll @@ -142,6 +152,10 @@ + + {0958cddf-4a16-41f6-8837-8335f71d599c} + DocumentViewer + {25017513-0d97-49d3-98d7-ba76d9b251b0} EDMI.API diff --git a/GUIs.Test.EDMIBenchmark/My Project/licenses.licx b/GUIs.Test.EDMIBenchmark/My Project/licenses.licx index 3f51afe8..e1f672e4 100644 --- a/GUIs.Test.EDMIBenchmark/My Project/licenses.licx +++ b/GUIs.Test.EDMIBenchmark/My Project/licenses.licx @@ -1 +1,5 @@ +DevExpress.XtraEditors.Repository.RepositoryItemTextEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraBars.Docking2010.DocumentManager, DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraBars.Docking.DockManager, DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a diff --git a/Modules.Database/Database.vbproj b/Modules.Database/Database.vbproj index 01a2e276..46730ac9 100644 --- a/Modules.Database/Database.vbproj +++ b/Modules.Database/Database.vbproj @@ -93,6 +93,7 @@ + diff --git a/Modules.Database/IDatabase.vb b/Modules.Database/IDatabase.vb new file mode 100644 index 00000000..b9c5420f --- /dev/null +++ b/Modules.Database/IDatabase.vb @@ -0,0 +1,12 @@ +Imports System.Data.Common + +Public Interface IDatabase + Function GetDatatable(SqlCommand As String, Timeout As Integer) As DataTable + Function GetDatatable(SqlCommand As String) As DataTable + + Function ExecuteNonQuery(SQLCommand As String, Timeout As Integer) As Boolean + Function ExecuteNonQuery(SQLCommand As String) As Boolean + + Function GetScalarValue(SQLQuery As String, Timeout As Integer) As Object + Function GetScalarValue(SQLQuery As String) As Object +End Interface diff --git a/Modules.Database/MSSQLServer.vb b/Modules.Database/MSSQLServer.vb index 6a9a8ae9..d335ce07 100644 --- a/Modules.Database/MSSQLServer.vb +++ b/Modules.Database/MSSQLServer.vb @@ -1,7 +1,10 @@ -Imports System.Data.SqlClient +Imports System.Data.Common +Imports System.Data.SqlClient Imports DigitalData.Modules.Logging Public Class MSSQLServer + Implements IDatabase + Public DBInitialized As Boolean = False Public CurrentSQLConnectionString As String = "" @@ -40,7 +43,7 @@ Public Class MSSQLServer Dim oConnectionStringBuilder As New SqlConnectionStringBuilder() With { .DataSource = Server, .InitialCatalog = Database, - .UserId = UserId, + .UserID = UserId, .Password = Password } @@ -89,7 +92,7 @@ Public Class MSSQLServer ''' ''' sqlcommand for datatable (select XYZ from TableORView) ''' Returns a datatable - Public Function GetDatatable(SqlCommand As String, Timeout As Integer) As DataTable + Public Function GetDatatable(SqlCommand As String, Timeout As Integer) As DataTable Implements IDatabase.GetDatatable Try If TestCanConnect() = False Then Return Nothing @@ -113,7 +116,7 @@ Public Class MSSQLServer End Try End Function - Public Function GetDatatable(SqlCommand As String) As DataTable + Public Function GetDatatable(SqlCommand As String) As DataTable Implements IDatabase.GetDatatable Return GetDatatable(SqlCommand, _Timeout) End Function @@ -128,7 +131,7 @@ Public Class MSSQLServer Return ExecuteNonQuery(executeStatement) End Function - Public Function ExecuteNonQuery(SQLCommand As String, Timeout As Integer) As Boolean + Public Function ExecuteNonQuery(SQLCommand As String, Timeout As Integer) As Boolean Implements IDatabase.ExecuteNonQuery Try If TestCanConnect() = False Then Return Nothing @@ -149,7 +152,7 @@ Public Class MSSQLServer End Try End Function - Public Function ExecuteNonQuery(SQLCommand As String) As Boolean + Public Function ExecuteNonQuery(SQLCommand As String) As Boolean Implements IDatabase.ExecuteNonQuery Return ExecuteNonQuery(SQLCommand, _Timeout) End Function @@ -163,7 +166,7 @@ Public Class MSSQLServer Return GetScalarValue(ScalarSQL) End Function - Public Function GetScalarValue(SQLQuery As String, Timeout As Integer) As Object + Public Function GetScalarValue(SQLQuery As String, Timeout As Integer) As Object Implements IDatabase.GetScalarValue Try If TestCanConnect() = False Then Return Nothing @@ -184,10 +187,43 @@ Public Class MSSQLServer End Try End Function - Public Function GetScalarValue(SQLQuery As String) As Object + Public Function GetScalarValue(SQLQuery As String) As Object Implements IDatabase.GetScalarValue Return GetScalarValue(SQLQuery, _Timeout) End Function + Public Function GetScalarValue(SQLCommand As SqlCommand, OutputParameter As String, Timeout As Integer) As Object + Try + If TestCanConnect() = False Then + Return Nothing + End If + + If SQLCommand.CommandText.Contains(" ") Then + SQLCommand.CommandType = CommandType.Text + Else + SQLCommand.CommandType = CommandType.StoredProcedure + End If + + Using oConnection As SqlConnection = GetSQLConnection() + + SQLCommand.Connection = oConnection + SQLCommand.Parameters(OutputParameter).Direction = ParameterDirection.Output + SQLCommand.CommandTimeout = Timeout + SQLCommand.ExecuteNonQuery() + oConnection.Close() + + Return SQLCommand.Parameters(OutputParameter).Value + End Using + Catch ex As Exception + _Logger.Error(ex) + _Logger.Warn("SQLQuery: " & SQLCommand.CommandText) + Return Nothing + End Try + End Function + + Public Function GetScalarValue(SQLCommand As SqlCommand, OutputParameter As String) As Object + Return GetScalarValue(SQLCommand, OutputParameter, _Timeout) + End Function + ''' ''' Executes the passed sql-statement in asyncmode ''' diff --git a/Modules.EDMIAPI/Channel.vb b/Modules.EDMIAPI/Channel.vb index 21022dcd..8520bc60 100644 --- a/Modules.EDMIAPI/Channel.vb +++ b/Modules.EDMIAPI/Channel.vb @@ -8,7 +8,7 @@ Public Class Channel .MaxBufferSize = Constants.MAX_BUFFER_SIZE, .MaxBufferPoolSize = Constants.MAX_BUFFER_POOL_SIZE, .MaxConnections = Constants.MAX_CONNECTIONS, - .TransferMode = TransferMode.Buffered, + .TransferMode = TransferMode.Streamed, .Security = New NetTcpSecurity() With { .Mode = SecurityMode.Transport, .Transport = New TcpTransportSecurity() With { diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentListResponse.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentListResponse.datasource new file mode 100644 index 00000000..ba63f700 --- /dev/null +++ b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentListResponse.datasource @@ -0,0 +1,10 @@ + + + + DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentListResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentResult2.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentResultOld.datasource similarity index 57% rename from Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentResult2.datasource rename to Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentResultOld.datasource index e6f36b46..3c56e249 100644 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentResult2.datasource +++ b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentResultOld.datasource @@ -5,6 +5,6 @@ Renaming the file extension or editing the content of this file may cause the file to be unrecognizable by the program. --> - - DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentResult2, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + + DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentResultOld, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentStreamResponse.datasource b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentStreamResponse.datasource new file mode 100644 index 00000000..9c6b26fa --- /dev/null +++ b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentStreamResponse.datasource @@ -0,0 +1,10 @@ + + + + DigitalData.Modules.EDMI.API.EDMIServiceReference.DocumentStreamResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Messages.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Messages.xsd new file mode 100644 index 00000000..00e7f568 --- /dev/null +++ b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.Messages.xsd @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.wsdl b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.wsdl index 4c17fb89..886341bc 100644 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.wsdl +++ b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.wsdl @@ -8,7 +8,8 @@ - + + @@ -89,6 +90,21 @@ + + + + + + + + + + + + + + + @@ -148,6 +164,14 @@ + + + + + + + + diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.xsd index 51c95fc6..97097dc5 100644 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.xsd +++ b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService.xsd @@ -2,7 +2,8 @@ - + + @@ -93,7 +94,7 @@ - + @@ -108,7 +109,7 @@ - + @@ -122,7 +123,7 @@ - + @@ -150,7 +151,7 @@ - + @@ -164,31 +165,57 @@ - + - + - - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -198,7 +225,7 @@ - + diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService1.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService1.xsd index 3fc9564a..0c04d9a3 100644 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService1.xsd +++ b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/DigitalData.Services.EDMIService1.xsd @@ -49,7 +49,7 @@ - + @@ -60,26 +60,26 @@ - - + + - + - - + + - + diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Message.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Message.xsd new file mode 100644 index 00000000..6a19fc3f --- /dev/null +++ b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Message.xsd @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.svcmap b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.svcmap index 93c22c81..43899f29 100644 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.svcmap +++ b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.svcmap @@ -30,7 +30,8 @@ - + + diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.vb b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.vb index 08fa4b87..8a43f979 100644 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.vb +++ b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/Reference.vb @@ -22,8 +22,8 @@ Namespace EDMIServiceReference System.SerializableAttribute(), _ System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.ScalarResult)), _ System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.NonQueryResult)), _ + System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.DocumentResultOld)), _ System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.DocumentResult)), _ - System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.DocumentResult2)), _ System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.IndexResult)), _ System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.TableResult))> _ Partial Public Class BaseResult @@ -92,14 +92,14 @@ Namespace EDMIServiceReference System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.TableResult)), _ System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.BaseResult)), _ System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.NonQueryResult)), _ + System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.DocumentResultOld)), _ System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.DocumentResult)), _ - System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.DocumentResult2)), _ - System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.DocumentResult2.DocumentObject)), _ + System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.DocumentResult.DocumentObject)), _ System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.IndexResult)), _ System.Runtime.Serialization.KnownTypeAttribute(GetType(System.DBNull)), _ System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.DocumentObject)), _ - System.Runtime.Serialization.KnownTypeAttribute(GetType(System.IO.FileInfo)), _ - System.Runtime.Serialization.KnownTypeAttribute(GetType(System.IO.FileSystemInfo))> _ + System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.DocumentListResponse)), _ + System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.BaseResponse))> _ Partial Public Class ScalarResult Inherits EDMIServiceReference.BaseResult @@ -130,9 +130,9 @@ Namespace EDMIServiceReference _ - Partial Public Class DocumentResult + Partial Public Class DocumentResultOld Inherits EDMIServiceReference.BaseResult Private ContentsField() As Byte @@ -183,14 +183,14 @@ Namespace EDMIServiceReference _ - Partial Public Class DocumentResult2 + Partial Public Class DocumentResult Inherits EDMIServiceReference.BaseResult Private ContentsField() As Byte - Private DocumentField As EDMIServiceReference.DocumentResult2.DocumentObject + Private DocumentField As EDMIServiceReference.DocumentResult.DocumentObject Private HasContentsField As Boolean @@ -208,7 +208,7 @@ Namespace EDMIServiceReference End Property _ - Public Property Document() As EDMIServiceReference.DocumentResult2.DocumentObject + Public Property Document() As EDMIServiceReference.DocumentResult.DocumentObject Get Return Me.DocumentField End Get @@ -235,7 +235,7 @@ Namespace EDMIServiceReference _ Partial Public Class DocumentObject Inherits Object @@ -419,6 +419,96 @@ Namespace EDMIServiceReference End Sub End Class + _ + Partial Public Class DocumentListResponse + Inherits EDMIServiceReference.BaseResponse + + _ + Private DatatableField As System.Data.DataTable + + _ + Public Property Datatable() As System.Data.DataTable + Get + Return Me.DatatableField + End Get + Set + If (Object.ReferenceEquals(Me.DatatableField, value) <> true) Then + Me.DatatableField = value + Me.RaisePropertyChanged("Datatable") + End If + End Set + End Property + End Class + + _ + Partial Public Class BaseResponse + Inherits Object + Implements System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged + + _ + Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject + + _ + Private ErrorMessageField As String + + _ + Private OKField As Boolean + + _ + Public Property ExtensionData() As System.Runtime.Serialization.ExtensionDataObject Implements System.Runtime.Serialization.IExtensibleDataObject.ExtensionData + Get + Return Me.extensionDataField + End Get + Set + Me.extensionDataField = value + End Set + End Property + + _ + Public Property ErrorMessage() As String + Get + Return Me.ErrorMessageField + End Get + Set + If (Object.ReferenceEquals(Me.ErrorMessageField, value) <> true) Then + Me.ErrorMessageField = value + Me.RaisePropertyChanged("ErrorMessage") + End If + End Set + End Property + + _ + Public Property OK() As Boolean + Get + Return Me.OKField + End Get + Set + If (Me.OKField.Equals(value) <> true) Then + Me.OKField = value + Me.RaisePropertyChanged("OK") + End If + End Set + End Property + + Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged + + Protected Sub RaisePropertyChanged(ByVal propertyName As String) + Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent + If (Not (propertyChanged) Is Nothing) Then + propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName)) + End If + End Sub + End Class + _ Public Interface IEDMIService @@ -464,22 +554,22 @@ Namespace EDMIServiceReference Function ExecuteNonQueryAsync(ByVal SQL As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.NonQueryResult) _ - Function NewFile(ByVal FileName As String, ByVal Contents() As Byte) As EDMIServiceReference.DocumentResult + Function NewFile(ByVal FileName As String, ByVal Contents() As Byte) As EDMIServiceReference.DocumentResultOld _ - Function NewFileAsync(ByVal FileName As String, ByVal Contents() As Byte) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentResult) + Function NewFileAsync(ByVal FileName As String, ByVal Contents() As Byte) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentResultOld) _ - Function UpdateFile(ByVal DocObject As EDMIServiceReference.DocumentObject, ByVal Contents() As Byte) As EDMIServiceReference.DocumentResult + Function UpdateFile(ByVal DocObject As EDMIServiceReference.DocumentObject, ByVal Contents() As Byte) As EDMIServiceReference.DocumentResultOld _ - Function UpdateFileAsync(ByVal DocObject As EDMIServiceReference.DocumentObject, ByVal Contents() As Byte) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentResult) + Function UpdateFileAsync(ByVal DocObject As EDMIServiceReference.DocumentObject, ByVal Contents() As Byte) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentResultOld) _ - Function GetFile(ByVal DocObject As EDMIServiceReference.DocumentObject) As EDMIServiceReference.DocumentResult + Function GetFile(ByVal DocObject As EDMIServiceReference.DocumentObject) As EDMIServiceReference.DocumentResultOld _ - Function GetFileAsync(ByVal DocObject As EDMIServiceReference.DocumentObject) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentResult) + Function GetFileAsync(ByVal DocObject As EDMIServiceReference.DocumentObject) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentResultOld) _ Function DeleteFile(ByVal DocObject As EDMIServiceReference.DocumentObject) As Boolean @@ -489,25 +579,38 @@ Namespace EDMIServiceReference _ - Function GetDocumentByDocumentId(ByVal DocumentId As Long) As EDMIServiceReference.DocumentResult + Function GetDocumentByDocumentId(ByVal DocumentId As Long) As EDMIServiceReference.DocumentResultOld _ - Function GetDocumentByDocumentIdAsync(ByVal DocumentId As Long) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentResult) + Function GetDocumentByDocumentIdAsync(ByVal DocumentId As Long) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentResultOld) _ - Function GetDocumentByContainerId(ByVal ContainerId As String) As EDMIServiceReference.DocumentResult + Function GetDocumentByContainerId(ByVal ContainerId As String) As EDMIServiceReference.DocumentResultOld _ - Function GetDocumentByContainerIdAsync(ByVal ContainerId As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentResult) + Function GetDocumentByContainerIdAsync(ByVal ContainerId As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentResultOld) _ - Function ImportFile(ByVal FileInfo As System.IO.FileInfo, ByVal Contents() As Byte, ByVal [ReadOnly] As Boolean, ByVal RetentionTime As Integer) As EDMIServiceReference.DocumentResult2 + Function ImportFile(ByVal FileName As String, ByVal Contents() As Byte, ByVal AddedWho As String) As EDMIServiceReference.DocumentResult _ - Function ImportFileAsync(ByVal FileInfo As System.IO.FileInfo, ByVal Contents() As Byte, ByVal [ReadOnly] As Boolean, ByVal RetentionTime As Integer) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentResult2) + Function ImportFileAsync(ByVal FileName As String, ByVal Contents() As Byte, ByVal AddedWho As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentResult) + + 'CODEGEN: Der Nachrichtenvertrag wird generiert, da der Wrappername (DocumentStreamRequest) von Nachricht "DocumentStreamRequest" nicht mit dem Standardwert (GetFileByObjectId) übereinstimmt. + _ + Function GetFileByObjectId(ByVal request As EDMIServiceReference.DocumentStreamRequest) As EDMIServiceReference.DocumentStreamResponse + + _ + Function GetFileByObjectIdAsync(ByVal request As EDMIServiceReference.DocumentStreamRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentStreamResponse) + + _ + Function ListFilesForUser() As EDMIServiceReference.DocumentListResponse + + _ + Function ListFilesForUserAsync() As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentListResponse) _ Function NewFileIndex(ByVal DocObject As EDMIServiceReference.DocumentObject, ByVal Syskey As String, ByVal LanguageCode As String, ByVal Value As String) As EDMIServiceReference.IndexResult @@ -516,6 +619,48 @@ Namespace EDMIServiceReference Function NewFileIndexAsync(ByVal DocObject As EDMIServiceReference.DocumentObject, ByVal Syskey As String, ByVal LanguageCode As String, ByVal Value As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.IndexResult) End Interface + _ + Partial Public Class DocumentStreamRequest + + _ + Public ObjectId As Long + + Public Sub New() + MyBase.New + End Sub + + Public Sub New(ByVal ObjectId As Long) + MyBase.New + Me.ObjectId = ObjectId + End Sub + End Class + + _ + Partial Public Class DocumentStreamResponse + + _ + Public FileName As String + + _ + Public FileContents As System.IO.Stream + + Public Sub New() + MyBase.New + End Sub + + Public Sub New(ByVal FileName As String, ByVal FileContents As System.IO.Stream) + MyBase.New + Me.FileName = FileName + Me.FileContents = FileContents + End Sub + End Class + _ Public Interface IEDMIServiceChannel Inherits EDMIServiceReference.IEDMIService, System.ServiceModel.IClientChannel @@ -595,27 +740,27 @@ Namespace EDMIServiceReference Return MyBase.Channel.ExecuteNonQueryAsync(SQL) End Function - Public Function NewFile(ByVal FileName As String, ByVal Contents() As Byte) As EDMIServiceReference.DocumentResult Implements EDMIServiceReference.IEDMIService.NewFile + Public Function NewFile(ByVal FileName As String, ByVal Contents() As Byte) As EDMIServiceReference.DocumentResultOld Implements EDMIServiceReference.IEDMIService.NewFile Return MyBase.Channel.NewFile(FileName, Contents) End Function - Public Function NewFileAsync(ByVal FileName As String, ByVal Contents() As Byte) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentResult) Implements EDMIServiceReference.IEDMIService.NewFileAsync + Public Function NewFileAsync(ByVal FileName As String, ByVal Contents() As Byte) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentResultOld) Implements EDMIServiceReference.IEDMIService.NewFileAsync Return MyBase.Channel.NewFileAsync(FileName, Contents) End Function - Public Function UpdateFile(ByVal DocObject As EDMIServiceReference.DocumentObject, ByVal Contents() As Byte) As EDMIServiceReference.DocumentResult Implements EDMIServiceReference.IEDMIService.UpdateFile + Public Function UpdateFile(ByVal DocObject As EDMIServiceReference.DocumentObject, ByVal Contents() As Byte) As EDMIServiceReference.DocumentResultOld Implements EDMIServiceReference.IEDMIService.UpdateFile Return MyBase.Channel.UpdateFile(DocObject, Contents) End Function - Public Function UpdateFileAsync(ByVal DocObject As EDMIServiceReference.DocumentObject, ByVal Contents() As Byte) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentResult) Implements EDMIServiceReference.IEDMIService.UpdateFileAsync + Public Function UpdateFileAsync(ByVal DocObject As EDMIServiceReference.DocumentObject, ByVal Contents() As Byte) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentResultOld) Implements EDMIServiceReference.IEDMIService.UpdateFileAsync Return MyBase.Channel.UpdateFileAsync(DocObject, Contents) End Function - Public Function GetFile(ByVal DocObject As EDMIServiceReference.DocumentObject) As EDMIServiceReference.DocumentResult Implements EDMIServiceReference.IEDMIService.GetFile + Public Function GetFile(ByVal DocObject As EDMIServiceReference.DocumentObject) As EDMIServiceReference.DocumentResultOld Implements EDMIServiceReference.IEDMIService.GetFile Return MyBase.Channel.GetFile(DocObject) End Function - Public Function GetFileAsync(ByVal DocObject As EDMIServiceReference.DocumentObject) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentResult) Implements EDMIServiceReference.IEDMIService.GetFileAsync + Public Function GetFileAsync(ByVal DocObject As EDMIServiceReference.DocumentObject) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentResultOld) Implements EDMIServiceReference.IEDMIService.GetFileAsync Return MyBase.Channel.GetFileAsync(DocObject) End Function @@ -627,28 +772,60 @@ Namespace EDMIServiceReference Return MyBase.Channel.DeleteFileAsync(DocObject) End Function - Public Function GetDocumentByDocumentId(ByVal DocumentId As Long) As EDMIServiceReference.DocumentResult Implements EDMIServiceReference.IEDMIService.GetDocumentByDocumentId + Public Function GetDocumentByDocumentId(ByVal DocumentId As Long) As EDMIServiceReference.DocumentResultOld Implements EDMIServiceReference.IEDMIService.GetDocumentByDocumentId Return MyBase.Channel.GetDocumentByDocumentId(DocumentId) End Function - Public Function GetDocumentByDocumentIdAsync(ByVal DocumentId As Long) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentResult) Implements EDMIServiceReference.IEDMIService.GetDocumentByDocumentIdAsync + Public Function GetDocumentByDocumentIdAsync(ByVal DocumentId As Long) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentResultOld) Implements EDMIServiceReference.IEDMIService.GetDocumentByDocumentIdAsync Return MyBase.Channel.GetDocumentByDocumentIdAsync(DocumentId) End Function - Public Function GetDocumentByContainerId(ByVal ContainerId As String) As EDMIServiceReference.DocumentResult Implements EDMIServiceReference.IEDMIService.GetDocumentByContainerId + Public Function GetDocumentByContainerId(ByVal ContainerId As String) As EDMIServiceReference.DocumentResultOld Implements EDMIServiceReference.IEDMIService.GetDocumentByContainerId Return MyBase.Channel.GetDocumentByContainerId(ContainerId) End Function - Public Function GetDocumentByContainerIdAsync(ByVal ContainerId As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentResult) Implements EDMIServiceReference.IEDMIService.GetDocumentByContainerIdAsync + Public Function GetDocumentByContainerIdAsync(ByVal ContainerId As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentResultOld) Implements EDMIServiceReference.IEDMIService.GetDocumentByContainerIdAsync Return MyBase.Channel.GetDocumentByContainerIdAsync(ContainerId) End Function - Public Function ImportFile(ByVal FileInfo As System.IO.FileInfo, ByVal Contents() As Byte, ByVal [ReadOnly] As Boolean, ByVal RetentionTime As Integer) As EDMIServiceReference.DocumentResult2 Implements EDMIServiceReference.IEDMIService.ImportFile - Return MyBase.Channel.ImportFile(FileInfo, Contents, [ReadOnly], RetentionTime) + Public Function ImportFile(ByVal FileName As String, ByVal Contents() As Byte, ByVal AddedWho As String) As EDMIServiceReference.DocumentResult Implements EDMIServiceReference.IEDMIService.ImportFile + Return MyBase.Channel.ImportFile(FileName, Contents, AddedWho) End Function - Public Function ImportFileAsync(ByVal FileInfo As System.IO.FileInfo, ByVal Contents() As Byte, ByVal [ReadOnly] As Boolean, ByVal RetentionTime As Integer) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentResult2) Implements EDMIServiceReference.IEDMIService.ImportFileAsync - Return MyBase.Channel.ImportFileAsync(FileInfo, Contents, [ReadOnly], RetentionTime) + Public Function ImportFileAsync(ByVal FileName As String, ByVal Contents() As Byte, ByVal AddedWho As String) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentResult) Implements EDMIServiceReference.IEDMIService.ImportFileAsync + Return MyBase.Channel.ImportFileAsync(FileName, Contents, AddedWho) + End Function + + _ + Function EDMIServiceReference_IEDMIService_GetFileByObjectId(ByVal request As EDMIServiceReference.DocumentStreamRequest) As EDMIServiceReference.DocumentStreamResponse Implements EDMIServiceReference.IEDMIService.GetFileByObjectId + Return MyBase.Channel.GetFileByObjectId(request) + End Function + + Public Function GetFileByObjectId(ByVal ObjectId As Long, ByRef FileContents As System.IO.Stream) As String + Dim inValue As EDMIServiceReference.DocumentStreamRequest = New EDMIServiceReference.DocumentStreamRequest() + inValue.ObjectId = ObjectId + Dim retVal As EDMIServiceReference.DocumentStreamResponse = CType(Me,EDMIServiceReference.IEDMIService).GetFileByObjectId(inValue) + FileContents = retVal.FileContents + Return retVal.FileName + End Function + + _ + Function EDMIServiceReference_IEDMIService_GetFileByObjectIdAsync(ByVal request As EDMIServiceReference.DocumentStreamRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentStreamResponse) Implements EDMIServiceReference.IEDMIService.GetFileByObjectIdAsync + Return MyBase.Channel.GetFileByObjectIdAsync(request) + End Function + + Public Function GetFileByObjectIdAsync(ByVal ObjectId As Long) As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentStreamResponse) + Dim inValue As EDMIServiceReference.DocumentStreamRequest = New EDMIServiceReference.DocumentStreamRequest() + inValue.ObjectId = ObjectId + Return CType(Me,EDMIServiceReference.IEDMIService).GetFileByObjectIdAsync(inValue) + End Function + + Public Function ListFilesForUser() As EDMIServiceReference.DocumentListResponse Implements EDMIServiceReference.IEDMIService.ListFilesForUser + Return MyBase.Channel.ListFilesForUser + End Function + + Public Function ListFilesForUserAsync() As System.Threading.Tasks.Task(Of EDMIServiceReference.DocumentListResponse) Implements EDMIServiceReference.IEDMIService.ListFilesForUserAsync + Return MyBase.Channel.ListFilesForUserAsync End Function Public Function NewFileIndex(ByVal DocObject As EDMIServiceReference.DocumentObject, ByVal Syskey As String, ByVal LanguageCode As String, ByVal Value As String) As EDMIServiceReference.IndexResult Implements EDMIServiceReference.IEDMIService.NewFileIndex diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/System.IO.xsd b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/System.IO.xsd deleted file mode 100644 index 68a2b9b7..00000000 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/System.IO.xsd +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/configuration.svcinfo b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/configuration.svcinfo index 7ea472c2..4dc839d7 100644 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/configuration.svcinfo +++ b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/configuration.svcinfo @@ -2,7 +2,7 @@ - + diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/configuration91.svcinfo b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/configuration91.svcinfo index 84310bc2..12c40947 100644 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/configuration91.svcinfo +++ b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/configuration91.svcinfo @@ -1,5 +1,5 @@ - + @@ -21,8 +21,8 @@ False - - Buffered + + Streamed OleTransactions diff --git a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/service.wsdl b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/service.wsdl index 1c267d7c..b8d866c0 100644 --- a/Modules.EDMIAPI/Connected Services/EDMIServiceReference/service.wsdl +++ b/Modules.EDMIAPI/Connected Services/EDMIServiceReference/service.wsdl @@ -28,6 +28,8 @@ + + @@ -156,6 +158,25 @@ + + + + + + + + + + + + + + + + + + + diff --git a/Modules.EDMIAPI/Document.vb b/Modules.EDMIAPI/Document.vb index 21121216..cec2d1d5 100644 --- a/Modules.EDMIAPI/Document.vb +++ b/Modules.EDMIAPI/Document.vb @@ -53,14 +53,12 @@ Public Class Document ''' ''' The filename to import ''' A document object - Public Async Function ImportFileAsync(FilePath As String, Optional [ReadOnly] As Boolean = False, Optional RetentionPeriod As Integer = 0) As Task(Of DocumentResult2) + Public Async Function ImportFileAsync(FilePath As String, Optional [ReadOnly] As Boolean = False, Optional RetentionPeriod As Integer = 0) As Task(Of DocumentResult) Try - Dim oInfo As New FileInfo(FilePath) - Using oStream As New FileStream(FilePath, FileMode.Open) Dim oContents As Byte() = {} Dim oBytesRead = Await oStream.ReadAsync(oContents, 0, oStream.Length) - Dim oResult = Await _channel.ImportFileAsync(oInfo, oContents, [ReadOnly], RetentionPeriod) + Dim oResult = Await _channel.ImportFileAsync(FilePath, oContents, Environment.UserName) Return oResult End Using @@ -75,11 +73,11 @@ Public Class Document ''' ''' The filename to import ''' A document object - Public Function ImportFile(FilePath As String, Optional [ReadOnly] As Boolean = False, Optional RetentionPeriod As Integer = 0) As DocumentResult2 + Public Function ImportFile(FilePath As String) As DocumentResult Try Dim oContents As Byte() = File.ReadAllBytes(FilePath) Dim oInfo As New FileInfo(FilePath) - Dim oDocObject = _channel.ImportFile(oInfo, oContents, [ReadOnly], RetentionPeriod) + Dim oDocObject = _channel.ImportFile(FilePath, oContents, Environment.UserName) Return oDocObject Catch ex As Exception _logger.Error(ex) diff --git a/Modules.EDMIAPI/EDMI.API.vbproj b/Modules.EDMIAPI/EDMI.API.vbproj index c390ee95..a9808632 100644 --- a/Modules.EDMIAPI/EDMI.API.vbproj +++ b/Modules.EDMIAPI/EDMI.API.vbproj @@ -106,10 +106,16 @@ + + Reference.svcmap + Reference.svcmap - + + Reference.svcmap + + Reference.svcmap @@ -127,6 +133,9 @@ Designer + + Designer + Designer @@ -134,6 +143,9 @@ Designer + + Designer + Designer @@ -141,9 +153,6 @@ Designer - - Designer - Designer diff --git a/Modules.EDMIAPI/app.config b/Modules.EDMIAPI/app.config index 8da9bc40..9de6fa5b 100644 --- a/Modules.EDMIAPI/app.config +++ b/Modules.EDMIAPI/app.config @@ -25,7 +25,7 @@ - + diff --git a/Service.EDMIService/App.config b/Service.EDMIService/App.config index 23db2755..8c1bd90e 100644 --- a/Service.EDMIService/App.config +++ b/Service.EDMIService/App.config @@ -7,6 +7,10 @@ + + + + @@ -46,7 +50,7 @@ diff --git a/Service.EDMIService/AppConfig.vb b/Service.EDMIService/AppConfig.vb index 3172d5d1..e1212b52 100644 --- a/Service.EDMIService/AppConfig.vb +++ b/Service.EDMIService/AppConfig.vb @@ -8,6 +8,7 @@ Public Class AppConfig Public Shared ContainerPath As String Public Shared ContainerPassword As String Public Shared DatastorePath As String + Public Shared MSSQLConnectionString As String Public Shared Sub Load() With ConfigurationManager.AppSettings @@ -15,9 +16,22 @@ Public Class AppConfig FirebirdDatabase = .Item("FIREBIRD_DATABASE_NAME") FirebirdUser = .Item("FIREBIRD_DATABASE_USER") FirebirdPassword = .Item("FIREBIRD_DATABASE_PASS") + + MSSQLConnectionString = .Item("MSSQL_CONNECTION_STRING") + ContainerPath = .Item("CONTAINER_PATH") ContainerPassword = .Item("CONTAINER_PASSWORD") + DatastorePath = .Item("DATASTORE_PATH") End With End Sub + + Public Shared Function IsFirebirdConfigured() As Boolean + Dim oProps As New List(Of String) From {FirebirdDataSource, FirebirdDatabase, FirebirdUser, FirebirdPassword} + Return Not oProps.Any(Function(Prop) String.IsNullOrWhiteSpace(Prop)) + End Function + + Public Shared Function IsMSSQLConfigured() As Boolean + Return Not String.IsNullOrWhiteSpace(MSSQLConnectionString) + End Function End Class diff --git a/Service.EDMIService/Database/IDatabase.vb b/Service.EDMIService/Database/IDatabase.vb new file mode 100644 index 00000000..0b370d22 --- /dev/null +++ b/Service.EDMIService/Database/IDatabase.vb @@ -0,0 +1,3 @@ +Public Interface IDatabase + Function NewDocument(RelativePath As String, AddedWho As String, ObjectStoreId As Int64, ReferenceId As Int64) As Int64 +End Interface diff --git a/Service.EDMIService/Database/MSSQL.vb b/Service.EDMIService/Database/MSSQL.vb new file mode 100644 index 00000000..3d4153b1 --- /dev/null +++ b/Service.EDMIService/Database/MSSQL.vb @@ -0,0 +1,20 @@ +Imports DigitalData.Modules.Database +Imports DigitalData.Modules.Logging + +Public Class MSSQL + Implements IDatabase + + Private ReadOnly LogConfig As LogConfig + Private ReadOnly Database As MSSQLServer + Private ReadOnly Logger As Logger + + Public Sub New(LogConfig As LogConfig, Database As MSSQLServer) + Me.LogConfig = LogConfig + Me.Database = Database + Me.Logger = LogConfig.GetLogger() + End Sub + + Public Function NewDocument(RelativePath As String, AddedWho As String, ObjectStoreId As Long, ReferenceId As Long) As Long Implements IDatabase.NewDocument + + End Function +End Class diff --git a/Service.EDMIService/EDMIService.vb b/Service.EDMIService/EDMIService.vb index d5c9979e..3a4885fa 100644 --- a/Service.EDMIService/EDMIService.vb +++ b/Service.EDMIService/EDMIService.vb @@ -6,13 +6,15 @@ Imports DigitalData.Modules Imports System.IO Imports System.ServiceModel.Description Imports System.ServiceModel.Channels +Imports System.Data.SqlClient Public Class EDMIService Implements IEDMIService Public Shared LogConfig As LogConfig - Public Shared Database As Firebird + Public Shared MSSQL As MSSQLServer + Public Shared Firebird As Firebird Public Shared AppConfig As AppConfig Public Shared Filesystem As Filesystem.File Public Shared EDMIPath As EDMI.File.Path @@ -28,12 +30,24 @@ Public Class EDMIService Public Sub New() Dim oOperationContext As OperationContext = OperationContext.Current Dim oInstanceContext As InstanceContext = oOperationContext.InstanceContext - Dim oUsername = oOperationContext.ServiceSecurityContext.WindowsIdentity.Name + Dim oUsername = StripDomainFromUsername(oOperationContext.ServiceSecurityContext.WindowsIdentity.Name) _username = oUsername _logger = LogConfig.GetLogger() + + _logger.Debug("New Request by User [{0}]", _username) End Sub + Public Function StripDomainFromUsername(UserName As String) + If UserName.Contains("\") Then + Return UserName.Split("\")(1) + ElseIf UserName.Contains("@") Then + Return UserName.Split("@")(0) + Else + Return UserName + End If + End Function + #Region "Auth" Private Function TestUserAuth() As Boolean Try @@ -54,7 +68,7 @@ Public Class EDMIService #End Region #Region "Request" Public Sub CreateRequest(Name As String, Optional Debug As Boolean = False) - _request = New Request(Name, _username, Database, Debug) + _request = New Request(Name, _username, Firebird, Debug) _debug = Debug _logger.Info("Creating request {0}/{1}", _request.Name, _request.RequestId) @@ -91,7 +105,7 @@ Public Class EDMIService _logger.Info($"ReturnDatatable, SQL: {SQL}") _request.LogDebug($"ReturnDatatable, SQL: {SQL}") - Dim oResult As DataTable = Database.GetDatatableWithConnection(SQL, _request.Connection) + Dim oResult As DataTable = Firebird.GetDatatableWithConnection(SQL, _request.Connection) Return New TableResult(oResult) Catch ex As Exception _logger.Error(ex) @@ -107,7 +121,7 @@ Public Class EDMIService _logger.Info($"ReturnScalar, SQL: {SQL}") _request.LogDebug($"ReturnScalar, SQL: {SQL}") - Dim oResult As Object = Database.GetScalarValueWithConnection(SQL, _request.Connection) + Dim oResult As Object = Firebird.GetScalarValueWithConnection(SQL, _request.Connection) Return New ScalarResult(oResult) Catch ex As Exception _logger.Error(ex) @@ -123,7 +137,7 @@ Public Class EDMIService _logger.Info($"ExecuteNonQuery, SQL: {SQL}") _request.LogDebug($"ExecuteNonQuery, SQL: {SQL}") - Dim oResult As Boolean = Database.ExecuteNonQueryWithConnection(SQL, _request.Connection) + Dim oResult As Boolean = Firebird.ExecuteNonQueryWithConnection(SQL, _request.Connection) Return New NonQueryResult() Catch ex As Exception _logger.Error(ex) @@ -135,7 +149,7 @@ Public Class EDMIService #End Region #Region "Document (with FileContainer)" - Public Function NewFile(FileName As String, Contents() As Byte) As DocumentResult Implements IEDMIService.NewFile + Public Function NewFile(FileName As String, Contents() As Byte) As DocumentResultOld Implements IEDMIService.NewFile Try Dim oContainer As FileContainer Dim oContainerId As String @@ -152,7 +166,7 @@ Public Class EDMIService _logger.Debug("File extension of file {0} is {1}", FileName, oExtension) Dim oSQL = $"SELECT FNICM_NEW_DOC('010', '{oContainerId}', '{GetContainerName(oContainerId)}', '{FileName}', '{oExtension}', '{_username}') FROM RDB$DATABASE;" - Dim oDocId As Int64 = Database.GetScalarValue(oSQL) + Dim oDocId As Int64 = Firebird.GetScalarValue(oSQL) If oDocId = -1 Then _logger.Warn("Database returned -1 while creating Document Entry. File was not saved!") @@ -167,14 +181,14 @@ Public Class EDMIService _logger.Debug("File saved in Container!", FileName) Dim oDocument = New DocumentObject(oContainerId, oDocId, FileName) - Return New DocumentResult(oDocument) + Return New DocumentResultOld(oDocument) Catch ex As Exception _logger.Error(ex) - Return New DocumentResult(ex.Message) + Return New DocumentResultOld(ex.Message) End Try End Function - Public Function UpdateFile(DocObject As DocumentObject, Contents() As Byte) As DocumentResult Implements IEDMIService.UpdateFile + Public Function UpdateFile(DocObject As DocumentObject, Contents() As Byte) As DocumentResultOld Implements IEDMIService.UpdateFile Try TestFileExists(DocObject.ContainerId) @@ -187,14 +201,14 @@ Public Class EDMIService oFileContainer.Save() - Return New DocumentResult(DocObject) + Return New DocumentResultOld(DocObject) Catch ex As Exception _logger.Error(ex) Return Nothing End Try End Function - Public Function GetFile(DocObject As DocumentObject) As DocumentResult Implements IEDMIService.GetFile + Public Function GetFile(DocObject As DocumentObject) As DocumentResultOld Implements IEDMIService.GetFile Try TestFileExists(DocObject.ContainerId) @@ -202,10 +216,10 @@ Public Class EDMIService Dim oContainer As FileContainer = FileContainer.Load(LogConfig, AppConfig.ContainerPassword, oContainerPath) Dim oContents As Byte() = oContainer.GetFile().Contents - Return New DocumentResult(DocObject, oContents) + Return New DocumentResultOld(DocObject, oContents) Catch ex As Exception _logger.Error(ex) - Return New DocumentResult(ex.Message) + Return New DocumentResultOld(ex.Message) End Try End Function @@ -241,13 +255,13 @@ Public Class EDMIService End If End Sub - Public Function GetDocumentByDocumentId(DocumentId As Long) As DocumentResult Implements IEDMIService.GetDocumentByDocumentId + Public Function GetDocumentByDocumentId(DocumentId As Long) As DocumentResultOld Implements IEDMIService.GetDocumentByDocumentId Try Dim oSQL = $"SELECT GUID, CONTAINER_ID, ORIGINAL_FILENAME FROM TBIDB_DOCUMENT WHERE GUID = {DocumentId}" - Dim oTable = Database.GetDatatable(oSQL) + Dim oTable = Firebird.GetDatatable(oSQL) If oTable.Rows.Count = 0 Then - Return New DocumentResult("Document not found") + Return New DocumentResultOld("Document not found") End If Dim oRow As DataRow = oTable.Rows.Item(0) @@ -263,19 +277,19 @@ Public Class EDMIService Dim oContainer As FileContainer = FileContainer.Load(LogConfig, AppConfig.ContainerPassword, oContainerPath) Dim oContents As Byte() = oContainer.GetFile().Contents - Return New DocumentResult(oDocument, oContents) + Return New DocumentResultOld(oDocument, oContents) Catch ex As Exception - Return New DocumentResult(ex.Message) + Return New DocumentResultOld(ex.Message) End Try End Function - Public Function GetDocumentByContainerId(ContainerId As String) As DocumentResult Implements IEDMIService.GetDocumentByContainerId + Public Function GetDocumentByContainerId(ContainerId As String) As DocumentResultOld Implements IEDMIService.GetDocumentByContainerId Try Dim oSQL = $"SELECT GUID, CONTAINER_ID, ORIGINAL_FILENAME FROM TBIDB_DOCUMENT WHERE CONTAINER_ID = '{ContainerId}'" - Dim oTable = Database.GetDatatable(oSQL) + Dim oTable = Firebird.GetDatatable(oSQL) If oTable.Rows.Count = 0 Then - Return New DocumentResult("Document not found") + Return New DocumentResultOld("Document not found") End If Dim oRow As DataRow = oTable.Rows.Item(0) @@ -291,52 +305,133 @@ Public Class EDMIService Dim oContainer As FileContainer = FileContainer.Load(LogConfig, AppConfig.ContainerPassword, oContainerPath) Dim oContents As Byte() = oContainer.GetFile().Contents - Return New DocumentResult(oDocument, oContents) + Return New DocumentResultOld(oDocument, oContents) Catch ex As Exception - Return New DocumentResult(ex.Message) + Return New DocumentResultOld(ex.Message) End Try End Function #End Region #Region "Document" - Public Function ImportFile(FileInfo As FileInfo, Contents() As Byte, [Readonly] As Boolean, RetentionPeriod As Integer) As DocumentResult2 Implements IEDMIService.ImportFile + ''' + ''' Imports a file according to ObjectStoreId + ''' + ''' + ''' + ''' + Public Function ImportFile(FileName As String, Contents() As Byte, ObjectStoreId As Int64, DocumentType As String, Optional RetentionDays As Int64 = Nothing) As DocumentResult Implements IEDMIService.ImportFile + ' TODO: + ' - Get Object Store -> Object Catalog -> Catalog Path + ' - If IS_ARCHIVE = True And RetentionDays <> Nothing: + ' DoArchive! + ' - Refactor EDMIPath to get ObjectStore at service start up + ' and return ObjectStore Path from ObjectStoreId + RelativePath + ' VWIDB_OBJECTSTORE + Dim oDocumentType As String = "DummyDocumentType" + Dim oRelativePath As String = EDMIPath.GetRelativePath(oDocumentType, FileName) + Dim oAbsolutePath As String = EDMIPath.GetActivePath(oDocumentType, FileName) Dim oDirectoryPath = EDMIPath.GetActivePath(oDocumentType) - Dim oFilePath = Path.Combine(oDirectoryPath, FileInfo.Name) - Dim oDocument = New DocumentResult2.DocumentObject() With {.FileName = FileInfo.Name, .FileId = Guid.NewGuid.ToString} + Dim oDocument = New DocumentResult.DocumentObject With {.FileName = FileName} Try Directory.CreateDirectory(oDirectoryPath) Catch ex As Exception _logger.Error(ex) - Return New DocumentResult2(ex.Message) + Return New DocumentResult(ex.Message) End Try Try - Dim oVersionedFileName As String = Filesystem.GetVersionedFilename(oFilePath) + Dim oVersionedFileName As String = Filesystem.GetVersionedFilename(oAbsolutePath) - _logger.Info("Saving file [{0}] to path [{1}]", FileInfo.Name, oVersionedFileName) + _logger.Info("ImportFile: Saving file [{0}] to path [{1}]", FileName, oVersionedFileName) Using oStream = New FileStream(oVersionedFileName, FileMode.CreateNew) oStream.Write(Contents, 0, Contents.Length) oStream.Flush(True) oStream.Close() End Using - EDMIArchive.SetRetention(oVersionedFileName, RetentionPeriod, [Readonly]) + ' insert into db + Dim oCommand As New SqlCommand("PRIDB_NEW_DOCUMENT") + oCommand.Parameters.AddWithValue("@OBJ_ST_ID", 1) + oCommand.Parameters.AddWithValue("@REL_PATH", oRelativePath) + oCommand.Parameters.AddWithValue("@WHO", _username) + oCommand.Parameters.AddWithValue("@REF_DOCID", 0) + oCommand.Parameters.Add(New SqlParameter("@IDB_OBJ_ID", SqlDbType.BigInt)) - Return New DocumentResult2(oDocument) + Dim oObjectId = MSSQL.GetScalarValue(oCommand, "@IDB_OBJ_ID") + + oDocument.FileId = oObjectId + + Return New DocumentResult(oDocument) Catch ex As Exception _logger.Error(ex) - Return New DocumentResult2(ex.Message) + Return New DocumentResult(ex.Message) End Try End Function + + Public Function GetFileByObjectId(Data As Messages.DocumentStreamRequest) As Messages.DocumentStreamResponse Implements IEDMIService.GetFileByObjectId + Try + Dim oSQL As String = $"SELECT DocRelativePath FROM VWIDB_DOC_DATA WHERE IDB_OBJ_ID = {Data.ObjectId}" + Dim oPath As String = MSSQL.GetScalarValue(oSQL) + + If IsNothing(oPath) Then + Throw New FaultException($"Object [{Data.ObjectId}] does not exist in database!") + End If + + Dim oFullPath = EDMIPath.GetActivePathFromRelativePath(oPath) + + _logger.Debug("GetFileByObjectId: Loading file [{0}]", oFullPath) + + Dim oFileInfo As New FileInfo(oFullPath) + + If Not oFileInfo.Exists Then + Throw New FaultException($"Object [{Data.ObjectId}] does not exist on filesystem!") + End If + + Dim oDestination As New MemoryStream() + Using oSource As FileStream = IO.File.OpenRead(oFullPath) + oSource.CopyTo(oDestination) + End Using + + oDestination.Seek(0, SeekOrigin.Begin) + Dim oMessage As New Messages.DocumentStreamResponse() With { + .FileName = oFileInfo.Name, + .FileContents = oDestination + } + + Return oMessage + Catch ex As IOException + _logger.Error(ex) + Throw New FaultException($"Object [{Data.ObjectId}] could not be streamed!") + Catch ex As Exception + _logger.Error(ex) + Throw New FaultException(ex.Message) + End Try + End Function + + Public Function ListFilesForUser() As Messages.DocumentListResponse Implements IEDMIService.ListFilesForUser + Try + Dim oSQL = $"SELECT * FROM VWIDB_DOC_DATA WHERE ADDED_WHO = UPPER('{_username}')" + Dim oDatatable As DataTable = MSSQL.GetDatatable(oSQL) + oDatatable.TableName = "DocumentList" + + Return New Messages.DocumentListResponse() With { + .Datatable = oDatatable + } + Catch ex As Exception + _logger.Error(ex) + Throw New FaultException(ex.Message) + End Try + End Function + #End Region #Region "Index" Public Function NewFileIndex(DocObject As DocumentObject, Syskey As String, LanguageCode As String, Value As String) As IndexResult Implements IEDMIService.NewFileIndex Try Dim oSQL = $"SELECT FNIDB_NEW_DOC_VALUE({DocObject.DocumentId},'{Syskey}','{LanguageCode}','{Value}','{_username}') FROM RDB$DATABASE;" - Dim oIndexId As Int64 = Database.GetScalarValue(oSQL) + Dim oIndexId As Int64 = Firebird.GetScalarValue(oSQL) Return New IndexResult(oIndexId) Catch ex As Exception diff --git a/Service.EDMIService/EDMIService.vbproj b/Service.EDMIService/EDMIService.vbproj index db351beb..316648f8 100644 --- a/Service.EDMIService/EDMIService.vbproj +++ b/Service.EDMIService/EDMIService.vbproj @@ -71,6 +71,7 @@ ..\packages\NLog.4.7.0\lib\net45\NLog.dll + @@ -101,13 +102,16 @@ + + + - + - + Component diff --git a/Service.EDMIService/IEDMIService.vb b/Service.EDMIService/IEDMIService.vb index 0acc56b9..9df8a652 100644 --- a/Service.EDMIService/IEDMIService.vb +++ b/Service.EDMIService/IEDMIService.vb @@ -29,27 +29,33 @@ Interface IEDMIService #Region "Document (with FileContainer)" - Function NewFile(FileName As String, Contents As Byte()) As DocumentResult + Function NewFile(FileName As String, Contents As Byte()) As DocumentResultOld - Function UpdateFile(DocObject As DocumentObject, Contents As Byte()) As DocumentResult + Function UpdateFile(DocObject As DocumentObject, Contents As Byte()) As DocumentResultOld - Function GetFile(DocObject As DocumentObject) As DocumentResult + Function GetFile(DocObject As DocumentObject) As DocumentResultOld Function DeleteFile(DocObject As DocumentObject) As Boolean - Function GetDocumentByDocumentId(DocumentId As Int64) As DocumentResult + Function GetDocumentByDocumentId(DocumentId As Int64) As DocumentResultOld - Function GetDocumentByContainerId(ContainerId As String) As DocumentResult + Function GetDocumentByContainerId(ContainerId As String) As DocumentResultOld #End Region #Region "Document (New)" - Function ImportFile(FileInfo As FileInfo, Contents As Byte(), [ReadOnly] As Boolean, RetentionTime As Integer) As DocumentResult2 + Function ImportFile(FileName As String, Contents As Byte(), ObjectStoreId As Int64, DocumentType As String, Optional RetentionDays As Int64 = Nothing) As DocumentResult + + + Function GetFileByObjectId(Data As Messages.DocumentStreamRequest) As Messages.DocumentStreamResponse + + + Function ListFilesForUser() As Messages.DocumentListResponse #End Region #Region "Index" diff --git a/Service.EDMIService/Messages.vb b/Service.EDMIService/Messages.vb new file mode 100644 index 00000000..4ce640fa --- /dev/null +++ b/Service.EDMIService/Messages.vb @@ -0,0 +1,49 @@ +Imports System.IO +Imports System.Runtime.Serialization +Imports System.ServiceModel + +Namespace Messages + + + + Public MustInherit Class BaseResponse + + Public Property OK As Boolean + + Public Property ErrorMessage As String + + Public Sub New() + OK = True + End Sub + + Public Sub New(ErrorMessage As String) + OK = False + Me.ErrorMessage = ErrorMessage + End Sub + End Class + + + Public Class DocumentStreamRequest + + Public ObjectId As Int64 + End Class + + + Public Class DocumentStreamResponse + + Public FileName As String + + + Public FileContents As Stream + End Class + + Public Class DocumentListResponse + Inherits BaseResponse + + Public Datatable As DataTable + End Class + +End Namespace + + + diff --git a/Service.EDMIService/Results/DocumentResult.vb b/Service.EDMIService/Results/DocumentResult.vb index c9d6f3c3..11332187 100644 --- a/Service.EDMIService/Results/DocumentResult.vb +++ b/Service.EDMIService/Results/DocumentResult.vb @@ -1,4 +1,4 @@ -Imports DigitalData.Modules.Filesystem +Imports System.Xml.Serialization Public Class DocumentResult @@ -23,4 +23,9 @@ Public Class DocumentResult Public Sub New(ErrorMessage As String) MyBase.New(ErrorMessage) End Sub + + Public Class DocumentObject + Public FileName As String + Public FileId As String + End Class End Class diff --git a/Service.EDMIService/Results/DocumentResult2.vb b/Service.EDMIService/Results/DocumentResultOld.vb similarity index 77% rename from Service.EDMIService/Results/DocumentResult2.vb rename to Service.EDMIService/Results/DocumentResultOld.vb index f2ad596d..02202516 100644 --- a/Service.EDMIService/Results/DocumentResult2.vb +++ b/Service.EDMIService/Results/DocumentResultOld.vb @@ -1,5 +1,7 @@ - -Public Class DocumentResult2 +Imports DigitalData.Modules.Filesystem + + +Public Class DocumentResultOld Inherits BaseResult Public Document As DocumentObject @@ -21,9 +23,4 @@ Public Class DocumentResult2 Public Sub New(ErrorMessage As String) MyBase.New(ErrorMessage) End Sub - - Public Class DocumentObject - Public FileName As String - Public FileId As String - End Class End Class diff --git a/Service.EDMIService/WindowsService.vb b/Service.EDMIService/WindowsService.vb index 60ef89a2..067b315e 100644 --- a/Service.EDMIService/WindowsService.vb +++ b/Service.EDMIService/WindowsService.vb @@ -13,8 +13,10 @@ Public Class WindowsService Private _logConfig As LogConfig Private _logger As Logger - Private _db As Firebird - Private _clientsConnected As Integer = 0 + + Private _firebird As Firebird + Private _mssql As MSSQLServer + Private _config As AppConfig Private _Path As EDMI.File.Path Private _Archive As EDMI.File.Archive @@ -39,17 +41,28 @@ Public Class WindowsService _logger = _logConfig.GetLogger() _logger.Info("Service {0} is starting...", SERVICE_DISPLAY_NAME) - _logger.Debug("Connecting to database...") - _db = New Firebird( - _logConfig, - AppConfig.FirebirdDataSource, - AppConfig.FirebirdDatabase, - AppConfig.FirebirdUser, - AppConfig.FirebirdPassword - ) + If AppConfig.IsFirebirdConfigured() Then + _logger.Debug("Connecting to Firebird...") + _firebird = New Firebird( + _logConfig, + AppConfig.FirebirdDataSource, + AppConfig.FirebirdDatabase, + AppConfig.FirebirdUser, + AppConfig.FirebirdPassword + ) + _logger.Info("Database connection established.") + Else + _logger.Info("Firebird is not configured, will not be used!") + End If - _logger.Info("Database connection established.") + If AppConfig.IsMSSQLConfigured() Then + _logger.Debug("Connecting to MSSQL...") + _mssql = New MSSQLServer(_logConfig, AppConfig.MSSQLConnectionString) + _logger.Info("Database connection established.") + Else + _logger.Info("MSSQL is not configured, will not be used!") + End If _logger.Debug("Initializing EDMI Functions") @@ -57,9 +70,10 @@ Public Class WindowsService _Archive = New EDMI.File.Archive(_logConfig) _filesystem = New Filesystem.File(_logConfig) - _logger.Debug("EDMI Functions initialized.") + _logger.Info("EDMI Functions initialized.") - EDMIService.Database = _db + EDMIService.MSSQL = _mssql + EDMIService.Firebird = _firebird EDMIService.LogConfig = _logConfig EDMIService.AppConfig = _config EDMIService.EDMIArchive = _Archive @@ -71,7 +85,7 @@ Public Class WindowsService _serviceHost = New ServiceHost(GetType(EDMIService)) _serviceHost.Open() - _logger.Debug("WCF ServiceHost started.") + _logger.Info("WCF ServiceHost started.") _logger.Info("Service {0} successfully started.", SERVICE_DISPLAY_NAME) Catch ex As Exception