Get GDPicture Key from Database

This commit is contained in:
Jonathan Jenne
2020-03-10 15:38:03 +01:00
parent 1e02757b22
commit 1c2fb43f6a
9 changed files with 41 additions and 33 deletions

View File

@@ -32,6 +32,9 @@
<setting name="MD5Cheksum" serializeAs="String">
<value />
</setting>
<setting name="MSSQL_CONNECTIONSTRING" serializeAs="String">
<value>Server=SDD-VMP04-SQL17\DD_DEVELOP01;Database=DD_ECM_TEST;User Id=sa;Password=dd</value>
</setting>
</ZUGFeRDTest.My.MySettings>
</userSettings>
<runtime>

View File

@@ -13,6 +13,7 @@ Imports DigitalData.Modules.Logging
Public Class Form1
Private _logConfig As LogConfig
Private _firebird As Firebird
Private _mssql As MSSQLServer
Private _zugferd As ZUGFeRDInterface
Private PropertyMap As New Dictionary(Of String, XmlItemProperty)
@@ -22,6 +23,7 @@ Public Class Form1
_logConfig = New LogConfig(LogConfig.PathType.CurrentDirectory)
_logConfig.Debug = True
_firebird = New Firebird(_logConfig, My.Settings.FB_DATASOURCE, My.Settings.FB_DATABASE, My.Settings.FB_USER, My.Settings.FB_PASS)
_mssql = New MSSQLServer(_logConfig, My.Settings.MSSQL_CONNECTIONSTRING)
_zugferd = New ZUGFeRDInterface(_logConfig)
End Sub
@@ -85,9 +87,8 @@ Public Class Form1
Dim args As New WorkerArgs()
args = LoadFolderConfig(args)
args = LoadPropertyMapFor(args, "DEFAULT")
args.GDPictureKey = "21182889975216572111813147150675976632"
Dim job As New Jobs.ImportZUGFeRDFiles(_logConfig, _firebird)
Dim job As New Jobs.ImportZUGFeRDFiles(_logConfig, _firebird, _mssql)
job.Start(args)
End Sub
@@ -163,13 +164,11 @@ Public Class Form1
End Sub
Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click
Dim oExtractor = New Jobs.PDFAttachments(_logConfig, "21182889975216572111813147150675976632")
Dim oExtractor = New Jobs.PDFAttachments(_logConfig)
Dim oResult = OpenFileDialog1.ShowDialog()
If oResult = DialogResult.OK Then
oExtractor.Extract(OpenFileDialog1.FileName, AllowedExtensions:=New List(Of String) From {"docx", "doc", "pdf", "xls", "xlsx", "ppt", "pptx", "txt"})
End If
End Sub
End Class

View File

@@ -15,7 +15,7 @@ Option Explicit On
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.7.0.0"), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase
@@ -107,6 +107,18 @@ Namespace My
Me("MD5Cheksum") = value
End Set
End Property
<Global.System.Configuration.UserScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("Server=SDD-VMP04-SQL17\DD_DEVELOP01;Database=DD_ECM_TEST;User Id=sa;Password=dd")> _
Public Property MSSQL_CONNECTIONSTRING() As String
Get
Return CType(Me("MSSQL_CONNECTIONSTRING"),String)
End Get
Set
Me("MSSQL_CONNECTIONSTRING") = value
End Set
End Property
End Class
End Namespace

View File

@@ -17,5 +17,8 @@
<Setting Name="MD5Cheksum" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="MSSQL_CONNECTIONSTRING" Type="System.String" Scope="User">
<Value Profile="(Default)">Server=SDD-VMP04-SQL17\DD_DEVELOP01;Database=DD_ECM_TEST;User Id=sa;Password=dd</Value>
</Setting>
</Settings>
</SettingsFile>