5 Commits

Author SHA1 Message Date
Jonathan Jenne
a69f973a98 Merge branch 'master' of http://dd-vmp07-com04:3000/AppStd/Monorepo 2023-12-18 11:55:28 +01:00
Jonathan Jenne
b17e9135bd clean up 2023-12-18 11:54:59 +01:00
Jonathan Jenne
386ccb7ce4 fix tabindex for documentviewer 2023-12-18 11:54:10 +01:00
Jonathan Jenne
afccfd15f4 Email Service: Remove unused references 2023-11-16 08:30:52 +01:00
Jonathan Jenne
0bf0f21f66 Fix TestFileChecksumExists to check for deleted files 2023-11-14 09:56:11 +01:00
12 changed files with 84 additions and 56 deletions

View File

@@ -160,7 +160,7 @@ Partial Class DocumentViewer
Me.RichEditControl1.Options.VerticalRuler.Visibility = DevExpress.XtraRichEdit.RichEditRulerVisibility.Hidden
Me.RichEditControl1.ReadOnly = True
Me.RichEditControl1.Size = New System.Drawing.Size(249, 161)
Me.RichEditControl1.TabIndex = 8
Me.RichEditControl1.TabIndex = 0
Me.RichEditControl1.Visible = False
'
'BarManager1
@@ -437,7 +437,7 @@ Partial Class DocumentViewer
Me.SpreadsheetControl1.Name = "SpreadsheetControl1"
Me.SpreadsheetControl1.ReadOnly = True
Me.SpreadsheetControl1.Size = New System.Drawing.Size(268, 161)
Me.SpreadsheetControl1.TabIndex = 9
Me.SpreadsheetControl1.TabIndex = 0
Me.SpreadsheetControl1.Text = "SpreadsheetControl1"
Me.SpreadsheetControl1.Visible = False
'
@@ -455,7 +455,7 @@ Partial Class DocumentViewer
Me.lbFileNotLoaded.Location = New System.Drawing.Point(3, 74)
Me.lbFileNotLoaded.Name = "lbFileNotLoaded"
Me.lbFileNotLoaded.Size = New System.Drawing.Size(1006, 72)
Me.lbFileNotLoaded.TabIndex = 14
Me.lbFileNotLoaded.TabIndex = 0
Me.lbFileNotLoaded.Tag = ""
Me.lbFileNotLoaded.Text = "Die Datei konnte nicht geladen werden"
Me.lbFileNotLoaded.Visible = False

View File

@@ -0,0 +1 @@
DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a

View File

@@ -5,7 +5,6 @@ Imports System.Windows.Forms
Imports DevExpress.XtraEditors
Imports DigitalData.GUIs.Common
Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Language
Imports DigitalData.Modules.ZooFlow
Imports DigitalData.Modules.ZooFlow.Params
Imports DigitalData.Modules.ZooFlow.Constants

View File

@@ -225,9 +225,12 @@ Public Class frmDocumentResultList
SwitchDetailContainerHorizontal.Visibility = BarItemVisibility.Never
End If
If OperationMode = OperationMode.NoAppServer Then
panelContainerStatus.Visibility = Docking.DockVisibility.Hidden
End If
' 31.10.23 / JJ
' Hide panelContainerStatus in all cases
panelContainerStatus.Visibility = Docking.DockVisibility.Hidden
'If OperationMode = OperationMode.NoAppServer Then
' panelContainerStatus.Visibility = Docking.DockVisibility.Hidden
'End If
UpdateTotalResults()
LoadGridDataAndLayout()

View File

@@ -127,7 +127,7 @@ Partial Class frmObjectPropertyDialog
Me.TabFormControl1.Pages.Add(Me.TabPageAttributes)
Me.TabFormControl1.Pages.Add(Me.TabPageObject)
Me.TabFormControl1.Pages.Add(Me.TabPageHistory)
Me.TabFormControl1.SelectedPage = Me.TabPageObject
Me.TabFormControl1.SelectedPage = Me.TabPageAttributes
Me.TabFormControl1.ShowAddPageButton = False
Me.TabFormControl1.ShowTabCloseButtons = False
Me.TabFormControl1.Size = New System.Drawing.Size(572, 71)
@@ -540,7 +540,7 @@ Partial Class frmObjectPropertyDialog
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(572, 605)
Me.Controls.Add(Me.TabFormContentContainer2)
Me.Controls.Add(Me.TabFormContentContainer1)
Me.Controls.Add(Me.TabFormControl1)
Me.IconOptions.SvgImage = CType(resources.GetObject("frmObjectPropertyDialog.IconOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
Me.Name = "frmObjectPropertyDialog"

View File

@@ -82,6 +82,10 @@
<Reference Include="DigitalData.Modules.Filesystem">
<HintPath>..\..\DDModules\Filesystem\bin\Debug\DigitalData.Modules.Filesystem.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Interfaces, Version=1.12.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\DDModules\Interfaces\bin\Debug\DigitalData.Modules.Interfaces.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Logging">
<HintPath>..\..\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
</Reference>

View File

@@ -24,18 +24,20 @@ Partial Class frmDocView
Private Sub InitializeComponent()
Me.Panel1 = New System.Windows.Forms.Panel()
Me.Button2 = New System.Windows.Forms.Button()
Me.Button5 = New System.Windows.Forms.Button()
Me.Button4 = New System.Windows.Forms.Button()
Me.Button3 = New System.Windows.Forms.Button()
Me.Button1 = New System.Windows.Forms.Button()
Me.TextBox1 = New System.Windows.Forms.TextBox()
Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog()
Me.DocumentViewer1 = New DigitalData.Controls.DocumentViewer.DocumentViewer()
Me.Button4 = New System.Windows.Forms.Button()
Me.Panel1.SuspendLayout()
Me.SuspendLayout()
'
'Panel1
'
Me.Panel1.Controls.Add(Me.Button2)
Me.Panel1.Controls.Add(Me.Button5)
Me.Panel1.Controls.Add(Me.Button4)
Me.Panel1.Controls.Add(Me.Button3)
Me.Panel1.Controls.Add(Me.Button1)
@@ -55,6 +57,24 @@ Partial Class frmDocView
Me.Button2.Text = "Unload File"
Me.Button2.UseVisualStyleBackColor = True
'
'Button5
'
Me.Button5.Location = New System.Drawing.Point(749, 10)
Me.Button5.Name = "Button5"
Me.Button5.Size = New System.Drawing.Size(75, 23)
Me.Button5.TabIndex = 1
Me.Button5.Text = "Clone"
Me.Button5.UseVisualStyleBackColor = True
'
'Button4
'
Me.Button4.Location = New System.Drawing.Point(830, 10)
Me.Button4.Name = "Button4"
Me.Button4.Size = New System.Drawing.Size(75, 23)
Me.Button4.TabIndex = 1
Me.Button4.Text = "Save"
Me.Button4.UseVisualStyleBackColor = True
'
'Button3
'
Me.Button3.Location = New System.Drawing.Point(911, 10)
@@ -93,15 +113,6 @@ Partial Class frmDocView
Me.DocumentViewer1.Size = New System.Drawing.Size(1079, 463)
Me.DocumentViewer1.TabIndex = 0
'
'Button4
'
Me.Button4.Location = New System.Drawing.Point(830, 10)
Me.Button4.Name = "Button4"
Me.Button4.Size = New System.Drawing.Size(75, 23)
Me.Button4.TabIndex = 1
Me.Button4.Text = "Save"
Me.Button4.UseVisualStyleBackColor = True
'
'frmDocView
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@@ -125,4 +136,5 @@ Partial Class frmDocView
Friend WithEvents Button2 As Button
Friend WithEvents Button3 As Button
Friend WithEvents Button4 As Button
Friend WithEvents Button5 As Button
End Class

View File

@@ -1,8 +1,12 @@
Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Interfaces
Imports GdPicture14
Public Class frmDocView
Private LogConfig As LogConfig
Private Const GDPICTURE_KEY = "21182889975216572111813147150675976632"
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
If String.IsNullOrEmpty(TextBox1.Text) Then
If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
@@ -17,7 +21,7 @@ Public Class frmDocView
Private Sub frmDocView_Load(sender As Object, e As EventArgs) Handles Me.Load
LogConfig = New LogConfig(LogConfig.PathType.Temp)
DocumentViewer1.Init(LogConfig, "21182889975216572111813147150675976632")
DocumentViewer1.Init(LogConfig, GDPICTURE_KEY)
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
@@ -32,4 +36,16 @@ Public Class frmDocView
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
DocumentViewer1.Save()
End Sub
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
Dim licenseManager As New GdPicture14.LicenseManager()
licenseManager.RegisterKEY(GDPICTURE_KEY)
Dim oPDFConverter = New PDFConverter(LogConfig)
Dim oResult = oPDFConverter.ConvertPDFADocumentToPDFDocument(TextBox1.Text, TextBox1.Text & ".cloned.pdf")
If oResult = True Then
MsgBox("Document was successfully cloned!")
End If
End Sub
End Class

View File

@@ -80,14 +80,20 @@ Namespace IDB
Dim oChecksumSQL = $"SELECT IDB_OBJ_ID FROM TBIDB_FILE_OBJECT WHERE FILE_HASH = '{pChecksum}'"
Dim oExistingObjectId As Long = Database.GetScalarValue(oChecksumSQL)
Dim oChecksumExists = (oExistingObjectId > 0)
If oExistingObjectId > 0 Then
Logger.Info("Returning with ObjectId [{0}] because Checksum [{1}] already exists.", oExistingObjectId, pChecksum)
Return oExistingObjectId
If oChecksumExists AndAlso TestFileDeleted(oExistingObjectId) Then
Logger.Info("Checksum exists on Object [{0}] but the Object was deleted", oExistingObjectId)
Return 0
End If
Logger.Debug("Checksum does not exist.")
Return 0
If Not oChecksumExists Then
Logger.Debug("Checksum does not exist.")
Return 0
End If
Logger.Info("Returning with ObjectId [{0}] because Checksum [{1}] already exists.", oExistingObjectId, pChecksum)
Return oExistingObjectId
Catch ex As Exception
Logger.Error(ex)
@@ -96,6 +102,20 @@ Namespace IDB
End Try
End Function
Public Function TestFileDeleted(pObjectId As Long) As Boolean
Try
Logger.Debug("Checking if Object [{0}] has been deleted", pObjectId)
Dim oObjectSQL = $"SELECT IDB_OBJ_ID FROM TBIDB_OBJECT WHERE IDB_OBJ_ID = {pObjectId} AND DELETED = 1"
Dim oDeletedObjectId As Long = Database.GetScalarValue(oObjectSQL)
Return (oDeletedObjectId > 0)
Catch ex As Exception
Logger.Error(ex)
Return False
End Try
End Function
Public Function NewObjectId(pKindType As String, pBusinessEntity As String, pWho As String) As Long
Try
Dim oNewObjectIdSQL = $"DECLARE @NEW_IDB_OBJ_ID BIGINT

View File

@@ -1,15 +1,6 @@
Imports DigitalData.Modules.Config.ConfigAttributes
Public Class Config
<ConnectionString>
Public Property FirebirdServer As String = ""
<ConnectionString>
Public Property FirebirdDatabase As String = ""
<ConnectionString>
Public Property FirebirdUser As String = ""
<ConnectionString>
Public Property FirebirdPassword As String = ""
<ConnectionString>
Public Property SQLServerConnectionString As String = ""
<ConnectionString>

View File

@@ -62,14 +62,6 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\DDModules\Encryption\bin\Debug\DigitalData.Modules.Encryption.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Filesystem, Version=1.3.1.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\DDModules\Filesystem\bin\Debug\DigitalData.Modules.Filesystem.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Language, Version=1.6.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\DDModules\Language\bin\Debug\DigitalData.Modules.Language.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Logging, Version=2.5.4.2, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>

View File

@@ -59,14 +59,6 @@ Public Class EmailService
_Logger.Info("Inititalize Databases")
If _Config.FirebirdServer <> String.Empty Then
_Firebird = New Firebird(_LogConfig, _Config.FirebirdServer, _Config.FirebirdDatabase, _Config.FirebirdUser, _Config.FirebirdPassword)
If _Firebird._DBInitialized = False Then
_Logger.Warn("Firebird Connection could not be established. Check the Error Log")
End If
End If
If _Config.SQLServerConnectionString <> String.Empty Then
_MSSQL = New MSSQLServer(_LogConfig, _Config.SQLServerConnectionString)
@@ -91,7 +83,6 @@ Public Class EmailService
_Logger.Debug("Inititalize Email")
_limilab = New Limilab(_LogConfig)
_MailSender = New Mail.MailSender(_LogConfig)
' === Initialize Queue ===
@@ -153,11 +144,6 @@ Public Class EmailService
Private Sub EmailQueue_DoWork(sender As Object, e As DoWorkEventArgs)
Try
If _Firebird?._DBInitialized Then
_Logger.Debug("Starting Firebird Sending")
SendEmailFrom(DatabaseType.Firebird, Nothing)
End If
If _MSSQL?.DBInitialized Then
_Logger.Debug("Starting MSSQL Sending")
SendEmailFrom(DatabaseType.MSSQL, _MSSQL)
@@ -345,6 +331,10 @@ Public Class EmailService
_Logger.Debug("Preparing to send [{0}] mails..", oAccountQueue.Count)
' ======= Initialize Sender =======
_MailSender = New Mail.MailSender(_LogConfig)
' ======= Connect to server =======
Dim oOptions As New Mail.MailSession.MailSessionOptions() With {