Update vor Import Gitea
This commit is contained in:
BIN
ImgToBase64ToFile/ImgToFile/.vs/ImgToFile/v16/.suo
Normal file
BIN
ImgToBase64ToFile/ImgToFile/.vs/ImgToFile/v16/.suo
Normal file
Binary file not shown.
25
ImgToBase64ToFile/ImgToFile/ImgToFile.sln
Normal file
25
ImgToBase64ToFile/ImgToFile/ImgToFile.sln
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.31613.86
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ImgToFile", "ImgToFile\ImgToFile.vbproj", "{26B7CBBD-9C07-47F9-A65A-23A89FD0331E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{26B7CBBD-9C07-47F9-A65A-23A89FD0331E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{26B7CBBD-9C07-47F9-A65A-23A89FD0331E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{26B7CBBD-9C07-47F9-A65A-23A89FD0331E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{26B7CBBD-9C07-47F9-A65A-23A89FD0331E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {2ED41448-C42D-41CC-87B3-61A09AC86D11}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
21
ImgToBase64ToFile/ImgToFile/ImgToFile/App.config
Normal file
21
ImgToBase64ToFile/ImgToFile/ImgToFile/App.config
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="ImgToFile.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
|
||||
</startup>
|
||||
<userSettings>
|
||||
<ImgToFile.My.MySettings>
|
||||
<setting name="EDOKA_Connection" serializeAs="String">
|
||||
<value>Data Source=shu00;Initial Catalog=edoka;Persist Security Info=False;workstation id =;packet size=4096;User ID=sa;Password=*shu29</value>
|
||||
</setting>
|
||||
<setting name="FilePath" serializeAs="String">
|
||||
<value>k:\edoka\imgtofile\</value>
|
||||
</setting>
|
||||
</ImgToFile.My.MySettings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
115
ImgToBase64ToFile/ImgToFile/ImgToFile/ImgToFile.vbproj
Normal file
115
ImgToBase64ToFile/ImgToFile/ImgToFile/ImgToFile.vbproj
Normal file
@@ -0,0 +1,115 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{26B7CBBD-9C07-47F9-A65A-23A89FD0331E}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<StartupObject>ImgToFile.Module1</StartupObject>
|
||||
<RootNamespace>ImgToFile</RootNamespace>
|
||||
<AssemblyName>ImgToFile</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>Console</MyType>
|
||||
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>ImgToFile.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>ImgToFile.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Collections.Generic" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Linq" />
|
||||
<Import Include="System.Xml.Linq" />
|
||||
<Import Include="System.Threading.Tasks" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="db\clsConnectionProvider.vb" />
|
||||
<Compile Include="db\clsDBInteractionBase.vb" />
|
||||
<Compile Include="db\clsdbzugriff.vb" />
|
||||
<Compile Include="db\db_connection.vb" />
|
||||
<Compile Include="globals.vb" />
|
||||
<Compile Include="Module1.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Settings.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="My Project\Application.myapp">
|
||||
<Generator>MyApplicationCodeGenerator</Generator>
|
||||
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<CustomToolNamespace>My</CustomToolNamespace>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
</Project>
|
||||
13
ImgToBase64ToFile/ImgToFile/ImgToFile/Module1.vb
Normal file
13
ImgToBase64ToFile/ImgToFile/ImgToFile/Module1.vb
Normal file
@@ -0,0 +1,13 @@
|
||||
Module Module1
|
||||
|
||||
Sub Main()
|
||||
Dim db As New clsDBZugriffe
|
||||
Globals.sConnectionString_edoka = My.Settings.EDOKA_Connection
|
||||
db.Get_doks_to_export()
|
||||
For Each r As DataRow In db.Dokdaten.Rows
|
||||
db.get_dokumnet_from_db(r.Item(1), r.Item(1) + ".pdf")
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
End Module
|
||||
13
ImgToBase64ToFile/ImgToFile/ImgToFile/My Project/Application.Designer.vb
generated
Normal file
13
ImgToBase64ToFile/ImgToFile/ImgToFile/My Project/Application.Designer.vb
generated
Normal file
@@ -0,0 +1,13 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.42000
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<MySubMain>false</MySubMain>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<ApplicationType>2</ApplicationType>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
||||
@@ -0,0 +1,35 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||
' Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||
' die einer Assembly zugeordnet sind.
|
||||
|
||||
' Werte der Assemblyattribute überprüfen
|
||||
|
||||
<Assembly: AssemblyTitle("ImgToFile")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("ImgToFile")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2021")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'Die folgende GUID wird für die typelib-ID verwendet, wenn dieses Projekt für COM verfügbar gemacht wird.
|
||||
<Assembly: Guid("b1d87276-6d7e-4578-a0da-4de7e025ef2b")>
|
||||
|
||||
' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||
'
|
||||
' Hauptversion
|
||||
' Nebenversion
|
||||
' Buildnummer
|
||||
' Revision
|
||||
'
|
||||
' Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
||||
' indem Sie "*" wie unten gezeigt eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||
62
ImgToBase64ToFile/ImgToFile/ImgToFile/My Project/Resources.Designer.vb
generated
Normal file
62
ImgToBase64ToFile/ImgToFile/ImgToFile/My Project/Resources.Designer.vb
generated
Normal file
@@ -0,0 +1,62 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.42000
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My.Resources
|
||||
|
||||
'This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
'class via a tool like ResGen or Visual Studio.
|
||||
'To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
'with the /str option, or rebuild your VS project.
|
||||
'''<summary>
|
||||
''' A strongly-typed resource class, for looking up localized strings, etc.
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||
Friend Module Resources
|
||||
|
||||
Private resourceMan As Global.System.Resources.ResourceManager
|
||||
|
||||
Private resourceCulture As Global.System.Globalization.CultureInfo
|
||||
|
||||
'''<summary>
|
||||
''' Returns the cached ResourceManager instance used by this class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
||||
Get
|
||||
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
||||
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("ImgToFile.Resources", GetType(Resources).Assembly)
|
||||
resourceMan = temp
|
||||
End If
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Overrides the current thread's CurrentUICulture property for all
|
||||
''' resource lookups using this strongly typed resource class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set(ByVal value As Global.System.Globalization.CultureInfo)
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
117
ImgToBase64ToFile/ImgToFile/ImgToFile/My Project/Resources.resx
Normal file
117
ImgToBase64ToFile/ImgToFile/ImgToFile/My Project/Resources.resx
Normal file
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
98
ImgToBase64ToFile/ImgToFile/ImgToFile/My Project/Settings.Designer.vb
generated
Normal file
98
ImgToBase64ToFile/ImgToFile/ImgToFile/My Project/Settings.Designer.vb
generated
Normal file
@@ -0,0 +1,98 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' Dieser Code wurde von einem Tool generiert.
|
||||
' Laufzeitversion:4.0.30319.42000
|
||||
'
|
||||
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
' der Code erneut generiert wird.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
|
||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
|
||||
|
||||
#Region "Automatische My.Settings-Speicherfunktion"
|
||||
#If _MyType = "WindowsForms" Then
|
||||
Private Shared addedHandler As Boolean
|
||||
|
||||
Private Shared addedHandlerLockObject As New Object
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
|
||||
If My.Application.SaveMySettingsOnExit Then
|
||||
My.Settings.Save()
|
||||
End If
|
||||
End Sub
|
||||
#End If
|
||||
#End Region
|
||||
|
||||
Public Shared ReadOnly Property [Default]() As MySettings
|
||||
Get
|
||||
|
||||
#If _MyType = "WindowsForms" Then
|
||||
If Not addedHandler Then
|
||||
SyncLock addedHandlerLockObject
|
||||
If Not addedHandler Then
|
||||
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||
addedHandler = True
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
#End If
|
||||
Return defaultInstance
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.UserScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("Data Source=shu00;Initial Catalog=edoka;Persist Security Info=False;workstation i"& _
|
||||
"d =;packet size=4096;User ID=sa;Password=*shu29")> _
|
||||
Public Property EDOKA_Connection() As String
|
||||
Get
|
||||
Return CType(Me("EDOKA_Connection"),String)
|
||||
End Get
|
||||
Set
|
||||
Me("EDOKA_Connection") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.UserScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("k:\edoka\imgtofile\")> _
|
||||
Public Property FilePath() As String
|
||||
Get
|
||||
Return CType(Me("FilePath"),String)
|
||||
End Get
|
||||
Set
|
||||
Me("FilePath") = value
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||
Friend Module MySettingsProperty
|
||||
|
||||
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||
Friend ReadOnly Property Settings() As Global.ImgToFile.My.MySettings
|
||||
Get
|
||||
Return Global.ImgToFile.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="My" GeneratedClassName="MySettings" UseMySettingsClassName="true">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="EDOKA_Connection" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">Data Source=shu00;Initial Catalog=edoka;Persist Security Info=False;workstation id =;packet size=4096;User ID=sa;Password=*shu29</Value>
|
||||
</Setting>
|
||||
<Setting Name="FilePath" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">k:\edoka\imgtofile\</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
BIN
ImgToBase64ToFile/ImgToFile/ImgToFile/bin/Debug/DokToFile.zip
Normal file
BIN
ImgToBase64ToFile/ImgToFile/ImgToFile/bin/Debug/DokToFile.zip
Normal file
Binary file not shown.
BIN
ImgToBase64ToFile/ImgToFile/ImgToFile/bin/Debug/ImgToFile.exe
Normal file
BIN
ImgToBase64ToFile/ImgToFile/ImgToFile/bin/Debug/ImgToFile.exe
Normal file
Binary file not shown.
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="ImgToFile.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
|
||||
</startup>
|
||||
<userSettings>
|
||||
<ImgToFile.My.MySettings>
|
||||
<setting name="EDOKA_Connection" serializeAs="String">
|
||||
<value>Data Source=shu00;Initial Catalog=edoka;Persist Security Info=False;workstation id =;packet size=4096;User ID=sa;Password=*shu29</value>
|
||||
</setting>
|
||||
<setting name="FilePath" serializeAs="String">
|
||||
<value>k:\edoka\imgtofile\</value>
|
||||
</setting>
|
||||
</ImgToFile.My.MySettings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
BIN
ImgToBase64ToFile/ImgToFile/ImgToFile/bin/Debug/ImgToFile.pdb
Normal file
BIN
ImgToBase64ToFile/ImgToFile/ImgToFile/bin/Debug/ImgToFile.pdb
Normal file
Binary file not shown.
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>
|
||||
ImgToFile
|
||||
</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:ImgToFile.My.Resources.Resources">
|
||||
<summary>
|
||||
A strongly-typed resource class, for looking up localized strings, etc.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ImgToFile.My.Resources.Resources.ResourceManager">
|
||||
<summary>
|
||||
Returns the cached ResourceManager instance used by this class.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ImgToFile.My.Resources.Resources.Culture">
|
||||
<summary>
|
||||
Overrides the current thread's CurrentUICulture property for all
|
||||
resource lookups using this strongly typed resource class.
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
@@ -0,0 +1,289 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Connection Provider class for Database connection sharing
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 18. Mai 2003, 00:06:25
|
||||
' // This class implements IDisposable.
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
Imports System
|
||||
Imports System.Configuration
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Collections
|
||||
|
||||
Namespace edokadb
|
||||
' /// <summary>
|
||||
' /// Purpose: provides a SqlConnection object which can be shared among data-access tier objects
|
||||
' /// to provide a way to do ADO.NET transaction coding without the hassling with SqlConnection objects
|
||||
' /// on a high level.
|
||||
' /// </summary>
|
||||
Public Class clsConnectionProvider
|
||||
Implements IDisposable
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_scoDBConnection As SqlConnection
|
||||
Private m_bIsTransactionPending, m_bIsDisposed As Boolean
|
||||
Private m_stCurrentTransaction As SqlTransaction
|
||||
Private m_alSavePoints As ArrayList
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Public Sub New()
|
||||
' // Init the class
|
||||
InitClass()
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the IDispose' method Dispose.
|
||||
' /// </summary>
|
||||
Overloads Public Sub Dispose() Implements IDisposable.Dispose
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the Dispose functionality.
|
||||
' /// </summary>
|
||||
Overridable Overloads Protected Sub Dispose(ByVal bIsDisposing As Boolean)
|
||||
' // Check to see if Dispose has already been called.
|
||||
If Not m_bIsDisposed Then
|
||||
If bIsDisposing Then
|
||||
' // Dispose managed resources.
|
||||
If Not (m_stCurrentTransaction Is Nothing) Then
|
||||
m_stCurrentTransaction.Dispose()
|
||||
m_stCurrentTransaction = Nothing
|
||||
End If
|
||||
If Not (m_scoDBConnection Is Nothing) Then
|
||||
' // closing the connection will abort (rollback) any pending transactions
|
||||
m_scoDBConnection.Close()
|
||||
m_scoDBConnection.Dispose()
|
||||
m_scoDBConnection = Nothing
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
m_bIsDisposed = True
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Initializes class members.
|
||||
' /// </summary>
|
||||
Private Sub InitClass()
|
||||
' // Create all the objects and initialize other members.
|
||||
m_scoDBConnection = new SqlConnection()
|
||||
m_bIsDisposed = False
|
||||
m_stCurrentTransaction = Nothing
|
||||
m_bIsTransactionPending = False
|
||||
m_alSavePoints = new ArrayList()
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Opens the connection object.
|
||||
' /// </summary>
|
||||
' /// <returns>True, if succeeded, otherwise an Exception exception is thrown.</returns>
|
||||
Public Function OpenConnection() As Boolean
|
||||
Try
|
||||
If (m_scoDBConnection.State And ConnectionState.Open) > 0 Then
|
||||
' // It's already open.
|
||||
Throw New Exception("OpenConnection::Connection is already open.")
|
||||
End If
|
||||
m_scoDBConnection.Open()
|
||||
m_bIsTransactionPending = False
|
||||
m_alSavePoints.Clear()
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // bubble exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Starts a new ADO.NET transaction using the open connection object of this class.
|
||||
' /// </summary>
|
||||
' /// <param name="sTransactionName">Name of the transaction to start</param>
|
||||
' /// <returns>True, if transaction is started correctly, otherwise an Exception exception is thrown</returns>
|
||||
Public Function BeginTransaction(sTransactionName As String) As Boolean
|
||||
Try
|
||||
If m_bIsTransactionPending Then
|
||||
' // no nested transactions allowed.
|
||||
Throw New Exception("BeginTransaction::Already transaction pending. Nesting not allowed")
|
||||
End If
|
||||
If (m_scoDBConnection.State And ConnectionState.Open) = 0 Then
|
||||
' // no open connection
|
||||
Throw New Exception("BeginTransaction::Connection is not open.")
|
||||
End If
|
||||
' // begin the transaction and store the transaction object.
|
||||
m_stCurrentTransaction = m_scoDBConnection.BeginTransaction(IsolationLevel.ReadCommitted, sTransactionName)
|
||||
m_bIsTransactionPending = True
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // bubble exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Commits a pending transaction on the open connection object of this class.
|
||||
' /// </summary>
|
||||
' /// <returns>True, if commit was succesful, or an Exception exception is thrown</returns>
|
||||
Public Function CommitTransaction() As Boolean
|
||||
Try
|
||||
If Not m_bIsTransactionPending Then
|
||||
' // no transaction pending
|
||||
Throw New Exception("CommitTransaction::No transaction pending.")
|
||||
End If
|
||||
If (m_scoDBConnection.State And ConnectionState.Open) = 0 Then
|
||||
' // no open connection
|
||||
Throw New Exception("CommitTransaction::Connection is not open.")
|
||||
End if
|
||||
' // commit the transaction
|
||||
m_stCurrentTransaction.Commit()
|
||||
m_bIsTransactionPending = False
|
||||
m_stCurrentTransaction.Dispose()
|
||||
m_stCurrentTransaction = Nothing
|
||||
m_alSavePoints.Clear()
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // bubble exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Rolls back a pending transaction on the open connection object of this class,
|
||||
' /// or rolls back to the savepoint with the given name. Savepoints are created with SaveTransaction().
|
||||
' /// </summary>
|
||||
' /// <param name="sTransactionToRollback">Name of transaction to roll back. Can be name of savepoint</param>
|
||||
' /// <returns>True, if rollback was succesful, or an Exception exception is thrown</returns>
|
||||
Public Function RollbackTransaction(sTransactionToRollback As String) As Boolean
|
||||
Try
|
||||
If Not m_bIsTransactionPending Then
|
||||
' // no transaction pending
|
||||
Throw New Exception("RollbackTransaction::No transaction pending.")
|
||||
End If
|
||||
If (m_scoDBConnection.State And ConnectionState.Open) = 0 Then
|
||||
' // no open connection
|
||||
Throw New Exception("RollbackTransaction::Connection is not open.")
|
||||
End If
|
||||
' // rollback the transaction
|
||||
m_stCurrentTransaction.Rollback(sTransactionToRollback)
|
||||
' // if this wasn't a savepoint, we've rolled back the complete transaction, so we
|
||||
' // can clean it up.
|
||||
If Not m_alSavePoints.Contains(sTransactionToRollback) Then
|
||||
' // it's not a savepoint
|
||||
m_bIsTransactionPending = False
|
||||
m_stCurrentTransaction.Dispose()
|
||||
m_stCurrentTransaction = Nothing
|
||||
m_alSavePoints.Clear()
|
||||
End If
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // bubble exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Saves a pending transaction on the open connection object of this class to a 'savepoint'
|
||||
' /// with the given name.
|
||||
' /// When a rollback is issued, the caller can rollback to this savepoint or roll back the complete transaction.
|
||||
' /// </summary>
|
||||
' /// <param name="sSavePointName">Name of the savepoint to store the current transaction under.</param>
|
||||
' /// <returns>True, if save was succesful, or an Exception exception is thrown</returns>
|
||||
Public Function SaveTransaction(sSavePointName As String) As Boolean
|
||||
Try
|
||||
If Not m_bIsTransactionPending Then
|
||||
' // no transaction pending
|
||||
Throw New Exception("SaveTransaction::No transaction pending.")
|
||||
End If
|
||||
If (m_scoDBConnection.State And ConnectionState.Open) = 0 Then
|
||||
' // no open connection
|
||||
Throw New Exception("SaveTransaction::Connection is not open.")
|
||||
End If
|
||||
' // save the transaction
|
||||
m_stCurrentTransaction.Save(sSavePointName)
|
||||
' // Store the savepoint in the list.
|
||||
m_alSavePoints.Add(sSavePointName)
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // bubble exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Closes the open connection. Depending on bCommitPendingTransactions, a pending
|
||||
' /// transaction is commited, or aborted.
|
||||
' /// </summary>
|
||||
' /// <param name="bCommitPendingTransaction">Flag for what to do when a transaction is still pending. True
|
||||
' /// will commit the current transaction, False will abort (rollback) the complete current transaction.</param>
|
||||
' /// <returns>True, if close was succesful, False if connection was already closed, or an Exception exception is thrown when
|
||||
' /// an error occurs</returns>
|
||||
Public Function CloseConnection(bCommitPendingTransaction As Boolean) As Boolean
|
||||
Try
|
||||
If (m_scoDBConnection.State And ConnectionState.Open) = 0 Then
|
||||
' // No open connection
|
||||
Return False
|
||||
End If
|
||||
If m_bIsTransactionPending Then
|
||||
If bCommitPendingTransaction Then
|
||||
' // Commit the pending transaction
|
||||
m_stCurrentTransaction.Commit()
|
||||
Else
|
||||
' // Rollback the pending transaction
|
||||
m_stCurrentTransaction.Rollback()
|
||||
End If
|
||||
m_bIsTransactionPending = False
|
||||
m_stCurrentTransaction.Dispose()
|
||||
m_stCurrentTransaction = Nothing
|
||||
m_alSavePoints.Clear()
|
||||
End If
|
||||
' // close the connection
|
||||
m_scoDBConnection.Close()
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // bubble exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
#Region " Class Property Declarations "
|
||||
|
||||
Public ReadOnly Property stCurrentTransaction() As SqlTransaction
|
||||
Get
|
||||
Return m_stCurrentTransaction
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Public ReadOnly Property bIsTransactionPending() As Boolean
|
||||
Get
|
||||
Return m_bIsTransactionPending
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Public ReadOnly Property scoDBConnection() As SqlConnection
|
||||
Get
|
||||
Return m_scoDBConnection
|
||||
End Get
|
||||
End Property
|
||||
Public WriteOnly Property sConnectionString() As String
|
||||
Set (ByVal Value As String)
|
||||
m_scoDBConnection.ConnectionString = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
202
ImgToBase64ToFile/ImgToFile/ImgToFile/db/clsDBInteractionBase.vb
Normal file
202
ImgToBase64ToFile/ImgToFile/ImgToFile/db/clsDBInteractionBase.vb
Normal file
@@ -0,0 +1,202 @@
|
||||
' //////////////////////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Base class for Database Interaction.
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 18. Mai 2003, 00:06:25
|
||||
' // Because this class implements IDisposable, derived classes shouldn't do so.
|
||||
' //////////////////////////////////////////////////////////////////////////////////////////
|
||||
Imports System
|
||||
Imports System.Configuration
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Data.SqlTypes
|
||||
|
||||
Namespace edokadb
|
||||
' /// <summary>
|
||||
' /// Purpose: Error Enums used by this LLBL library.
|
||||
' /// </summary>
|
||||
Public Enum LLBLError
|
||||
AllOk
|
||||
' // Add more here (check the comma's!)
|
||||
End Enum
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: General interface of the API generated. Contains only common methods of all classes.
|
||||
' /// </summary>
|
||||
Public Interface ICommonDBAccess
|
||||
Function Insert() As Boolean
|
||||
Function Update() As Boolean
|
||||
Function Delete() As Boolean
|
||||
Function SelectOne() As DataTable
|
||||
Function SelectAll() As DataTable
|
||||
End Interface
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Abstract base class for Database Interaction classes.
|
||||
' /// </summary>
|
||||
Public MustInherit Class clsDBInteractionBase
|
||||
Implements IDisposable
|
||||
Implements ICommonDBAccess
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Protected m_scoMainConnection As SqlConnection
|
||||
Protected m_iErrorCode As SqlInt32
|
||||
Protected m_bMainConnectionIsCreatedLocal As Boolean
|
||||
Protected m_cpMainConnectionProvider As clsConnectionProvider
|
||||
Private m_sConnectionString As String
|
||||
Private m_bIsDisposed As Boolean
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Class constructor.
|
||||
' /// </summary>
|
||||
Public Sub New()
|
||||
' // Initialize the class' members.
|
||||
InitClass()
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Initializes class members.
|
||||
' /// </summary>
|
||||
Private Sub InitClass()
|
||||
' // create all the objects and initialize other members.
|
||||
m_scoMainConnection = new SqlConnection()
|
||||
m_bMainConnectionIsCreatedLocal = True
|
||||
m_cpMainConnectionProvider = Nothing
|
||||
m_iErrorCode = New SqlInt32(LLBLError.AllOk)
|
||||
m_bIsDisposed = False
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the IDispose' method Dispose.
|
||||
' /// </summary>
|
||||
Overloads Public Sub Dispose() Implements IDisposable.Dispose
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the Dispose functionality.
|
||||
' /// </summary>
|
||||
Overridable Overloads Protected Sub Dispose(ByVal bIsDisposing As Boolean)
|
||||
' // Check to see if Dispose has already been called.
|
||||
If Not m_bIsDisposed Then
|
||||
If bIsDisposing Then
|
||||
' // Dispose managed resources.
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Object is created in this class, so destroy it here.
|
||||
m_scoMainConnection.Close()
|
||||
m_scoMainConnection.Dispose()
|
||||
m_bMainConnectionIsCreatedLocal = True
|
||||
End If
|
||||
m_cpMainConnectionProvider = Nothing
|
||||
m_scoMainConnection = Nothing
|
||||
End If
|
||||
End If
|
||||
m_bIsDisposed = True
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the ICommonDBAccess.Insert() method.
|
||||
' /// </summary>
|
||||
Public Overridable Function Insert() As Boolean Implements ICommonDBAccess.Insert
|
||||
' // No implementation, throw exception
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the ICommonDBAccess.Delete() method.
|
||||
' /// </summary>
|
||||
Public Overridable Function Delete() As Boolean Implements ICommonDBAccess.Delete
|
||||
' // No implementation, throw exception
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the ICommonDBAccess.Update() method.
|
||||
' /// </summary>
|
||||
Public Overridable Function Update() As Boolean Implements ICommonDBAccess.Update
|
||||
' // No implementation, throw exception
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the ICommonDBAccess.SelectOne() method.
|
||||
' /// </summary>
|
||||
Public Overridable Function SelectOne() As DataTable Implements ICommonDBAccess.SelectOne
|
||||
' // No implementation, throw exception
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the ICommonDBAccess.SelectAll() method.
|
||||
' /// </summary>
|
||||
Public Overridable Function SelectAll() As DataTable Implements ICommonDBAccess.SelectAll
|
||||
' // No implementation, throw exception
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
|
||||
#Region " Class Property Declarations "
|
||||
|
||||
Public WriteOnly Property cpMainConnectionProvider() As clsConnectionProvider
|
||||
Set(ByVal Value As clsConnectionProvider)
|
||||
If Value Is Nothing Then
|
||||
' // Invalid value
|
||||
Throw New ArgumentNullException("cpMainConnectionProvider", "Nothing passed as value to this property which is not allowed.")
|
||||
End If
|
||||
|
||||
' // A connection provider object is passed to this class.
|
||||
' // Retrieve the SqlConnection object, if present and create a
|
||||
' // reference to it. If there is already a MainConnection object
|
||||
' // referenced by the membervar, destroy that one or simply
|
||||
' // remove the reference, based on the flag.
|
||||
If Not (m_scoMainConnection Is Nothing) Then
|
||||
' // First get rid of current connection object. Caller is responsible
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Is local created object, close it and dispose it.
|
||||
m_scoMainConnection.Close()
|
||||
m_scoMainConnection.Dispose()
|
||||
End If
|
||||
' // Remove reference.
|
||||
m_scoMainConnection = Nothing
|
||||
End If
|
||||
m_cpMainConnectionProvider = CType(Value, clsConnectionProvider)
|
||||
m_scoMainConnection = m_cpMainConnectionProvider.scoDBConnection
|
||||
m_bMainConnectionIsCreatedLocal = False
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public ReadOnly Property iErrorCode() As SqlInt32
|
||||
Get
|
||||
Return m_iErrorCode
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Public Property sConnectionString() As String
|
||||
Get
|
||||
Return m_sConnectionString
|
||||
End Get
|
||||
Set (ByVal Value As String)
|
||||
m_sConnectionString = Value
|
||||
m_scoMainConnection.ConnectionString = m_sConnectionString
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
370
ImgToBase64ToFile/ImgToFile/ImgToFile/db/clsdbzugriff.vb
Normal file
370
ImgToBase64ToFile/ImgToFile/ImgToFile/db/clsdbzugriff.vb
Normal file
@@ -0,0 +1,370 @@
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
Imports System
|
||||
Imports System.IO
|
||||
|
||||
Public Class clsDBZugriffe
|
||||
|
||||
Dim dbconn As New edokadb.DB_Connection
|
||||
|
||||
Dim m_dokdaten As New DataTable
|
||||
Property Dokdaten As DataTable
|
||||
Get
|
||||
Return m_dokdaten
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
m_dokdaten = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Public Function Get_doks_to_export() As Boolean
|
||||
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
Dim dtToReturn As DataTable = New DataTable()
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
scmCmdToExecute.CommandText = "dbo.sp_admin_doks_to_export"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
conn_edoka.sConnectionString = sConnectionString_edoka
|
||||
scmCmdToExecute.Connection = conn_edoka.scoDBConnection
|
||||
scmCmdToExecute.Connection.ConnectionString = Globals.sConnectionString_edoka
|
||||
Dokdaten.Rows.Clear()
|
||||
|
||||
Try
|
||||
sdaAdapter.Fill(Dokdaten)
|
||||
|
||||
Catch ex As Exception
|
||||
Return False
|
||||
Finally
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
dtToReturn.Dispose()
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
Public Function Set_Status_Dokumente_angefordert(dossiernr As Integer) As Boolean
|
||||
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
Dim dtToReturn As DataTable = New DataTable()
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
scmCmdToExecute.CommandText = "dbo.sp_elektr_dossier"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
conn_edoka.sConnectionString = sConnectionString_edoka
|
||||
scmCmdToExecute.Connection = conn_edoka.scoDBConnection
|
||||
scmCmdToExecute.Connection.ConnectionString = Globals.sConnectionString_edoka
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@fnkt", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, 3))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@param1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, dossiernr))
|
||||
scmCmdToExecute.Connection.Open()
|
||||
|
||||
Try
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
|
||||
Catch ex As Exception
|
||||
Return False
|
||||
Finally
|
||||
scmCmdToExecute.Connection.Close()
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
dtToReturn.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function Set_Status_In_Bearbeitung(dossiernr As Integer) As Boolean
|
||||
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
Dim dtToReturn As DataTable = New DataTable()
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
scmCmdToExecute.CommandText = "dbo.sp_elektr_dossier"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
conn_edoka.sConnectionString = sConnectionString_edoka
|
||||
scmCmdToExecute.Connection = conn_edoka.scoDBConnection
|
||||
scmCmdToExecute.Connection.ConnectionString = Globals.sConnectionString_edoka
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@fnkt", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, 2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@param1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, dossiernr))
|
||||
scmCmdToExecute.Connection.Open()
|
||||
|
||||
Try
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
|
||||
Catch ex As Exception
|
||||
Return False
|
||||
Finally
|
||||
scmCmdToExecute.Connection.Close()
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
dtToReturn.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function Set_Status_Erfolgreich(dossiernr As Integer) As Boolean
|
||||
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
Dim dtToReturn As DataTable = New DataTable()
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
scmCmdToExecute.CommandText = "dbo.sp_elektr_dossier"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
'conn_edoka.sConnectionString = sConnectionString_edoka
|
||||
scmCmdToExecute.Connection = conn_edoka.scoDBConnection
|
||||
scmCmdToExecute.Connection.ConnectionString = Globals.sConnectionString_edoka
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@fnkt", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, 4))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@param1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, dossiernr))
|
||||
scmCmdToExecute.Connection.Open()
|
||||
|
||||
Try
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
|
||||
Catch ex As Exception
|
||||
Return False
|
||||
Finally
|
||||
scmCmdToExecute.Connection.Close()
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
dtToReturn.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function Set_Status_Failed(dossiernr As Integer) As Boolean
|
||||
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
Dim dtToReturn As DataTable = New DataTable()
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
scmCmdToExecute.CommandText = "dbo.sp_elektr_dossier"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
conn_edoka.sConnectionString = sConnectionString_edoka
|
||||
scmCmdToExecute.Connection = conn_edoka.scoDBConnection
|
||||
scmCmdToExecute.Connection.ConnectionString = Globals.sConnectionString_edoka
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@fnkt", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, 5))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@param1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, dossiernr))
|
||||
scmCmdToExecute.Connection.Open()
|
||||
|
||||
Try
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
|
||||
Catch ex As Exception
|
||||
Return False
|
||||
Finally
|
||||
scmCmdToExecute.Connection.Close()
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
dtToReturn.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function Get_Dokumentbezeichnung(dokumentid As String) As DataTable
|
||||
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
Dim dtToReturn As DataTable = New DataTable()
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
scmCmdToExecute.CommandText = "dbo.sp_elektr_dossier"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
'conn_edoka.sConnectionString = sConnectionString_edoka
|
||||
scmCmdToExecute.Connection = conn_edoka.scoDBConnection
|
||||
scmCmdToExecute.Connection.ConnectionString = Globals.sConnectionString_edoka
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@fnkt", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, 12))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@param1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, dokumentid))
|
||||
|
||||
Try
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
Try
|
||||
Return dtToReturn
|
||||
Catch
|
||||
Return Nothing
|
||||
End Try
|
||||
|
||||
Catch ex As Exception
|
||||
Return Nothing
|
||||
Finally
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
dtToReturn.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function get_colddokumentid(ByVal dokumentid As String, ByVal fnkt As Integer) As String
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.sp_get_colddokumentid"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable()
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
scmCmdToExecute.Connection = conn_edoka.scoDBConnection
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentid", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, dokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@fnkt", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, fnkt))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@colddokumentid", SqlDbType.VarChar, 255, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, ""))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@coldpartnernr", SqlDbType.VarChar, 255, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, ""))
|
||||
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
|
||||
get_colddokumentid = scmCmdToExecute.Parameters("@colddokumentid").Value
|
||||
Catch ex As Exception
|
||||
MsgBox("Status Dokumentbearbeitung::" & scmCmdToExecute.CommandText + "::" + ex.Message)
|
||||
Finally
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
dtToReturn.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
Public Function get_dokumnet_from_db(ByVal Dokumentid As String, ByVal dokumentname As String) As String
|
||||
Dim connection As New SqlConnection()
|
||||
Dim da As New SqlDataAdapter("Select * From doks where dokumentid='" + Dokumentid + "'", connection)
|
||||
Dim CB As SqlCommandBuilder = New SqlCommandBuilder(da)
|
||||
Dim ds As New DataSet()
|
||||
Try
|
||||
connection.ConnectionString = Globals.sConnectionString_edoka
|
||||
connection.Open()
|
||||
da.Fill(ds, "docs")
|
||||
Dim myRow As DataRow
|
||||
myRow = ds.Tables(0).Rows(0)
|
||||
Dim MyData() As Byte
|
||||
MyData = myRow.Item(1)
|
||||
Dim K As Long
|
||||
K = UBound(MyData)
|
||||
Dim sdokumentname As String = My.Settings.FilePath + dokumentname
|
||||
|
||||
Dim fs As New FileStream(sdokumentname, FileMode.OpenOrCreate, FileAccess.Write)
|
||||
fs.Write(MyData, 0, K)
|
||||
fs.Close()
|
||||
fs = Nothing
|
||||
Catch ex As Exception
|
||||
Return False
|
||||
End Try
|
||||
CB = Nothing
|
||||
ds = Nothing
|
||||
da = Nothing
|
||||
connection.Close()
|
||||
connection = Nothing
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Public Function Save_ZipFile(ByVal dossiernr As Integer, Filename As String)
|
||||
Dim connection As New SqlConnection()
|
||||
Dim da As New SqlDataAdapter("Select top 1 * from Elektr_Dossier_ZIP where Elektr_Dossier_ZIPnr=-1", connection)
|
||||
Dim CB As SqlCommandBuilder = New SqlCommandBuilder(da)
|
||||
Dim ds As New DataSet()
|
||||
Dim fs As New FileStream(Filename, FileMode.OpenOrCreate, FileAccess.Read)
|
||||
Dim mydata(fs.Length) As Byte
|
||||
fs.Read(mydata, 0, fs.Length)
|
||||
fs.Close()
|
||||
Try
|
||||
connection.ConnectionString = Globals.sConnectionString_edoka
|
||||
connection.Open()
|
||||
da.Fill(ds, "docs")
|
||||
Dim myRow As DataRow
|
||||
|
||||
If ds.Tables(0).Rows.Count = 0 Then
|
||||
myRow = ds.Tables(0).NewRow
|
||||
myRow.Item(1) = dossiernr
|
||||
myRow.Item(2) = mydata
|
||||
myRow.Item(3) = 0
|
||||
myRow.Item(4) = Now
|
||||
myRow.Item(5) = Now
|
||||
myRow.Item(6) = 1
|
||||
myRow.Item(7) = 9999
|
||||
ds.Tables(0).Rows.Add(myRow)
|
||||
da.Update(ds, "docs")
|
||||
Else
|
||||
myRow = ds.Tables(0).Rows(0)
|
||||
myRow.Item(1) = mydata
|
||||
da.Update(ds, "profil")
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Return False
|
||||
End Try
|
||||
CB = Nothing
|
||||
ds = Nothing
|
||||
da = Nothing
|
||||
connection.Close()
|
||||
connection = Nothing
|
||||
Return True
|
||||
End Function
|
||||
|
||||
#Region "Edoka_doc_Retrival"
|
||||
Public dsdaten As New DataSet
|
||||
Public Function Get_Pendente_Jobs() As Object
|
||||
Return Exec_sp_edoka_dok_retrival(11)
|
||||
End Function
|
||||
|
||||
Public Function Get_DokumentIDs_from_Job(ByVal Jobnr As String) As Object
|
||||
Return Exec_sp_edoka_dok_retrival(12, Jobnr)
|
||||
End Function
|
||||
|
||||
Public Function Update_Jobstatus(ByVal Jobnr As String, Status As String)
|
||||
Exec_sp_edoka_dok_retrival(4, Jobnr, Status)
|
||||
End Function
|
||||
Public Function Exec_sp_edoka_dok_retrival(fnkt As Integer, Optional param1 As String = "", Optional param2 As String = "", Optional param3 As String = "", Optional param4 As String = "", Optional param5 As String = "", Optional param6 As String = "", Optional param7 As String = "", Optional param8 As String = "", Optional param9 As String = "") As Object
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
Dim conn As New SqlConnection(Globals.sConnectionString_edoka)
|
||||
scmCmdToExecute.CommandText = "dbo.sp_EDOKA_Dok_Retrival"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable()
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
scmCmdToExecute.Connection = conn
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@fnkt", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, fnkt))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@param1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, param1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@param2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, param2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@param3", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, param3))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@param4", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, param4))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@param5", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, param5))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@param6", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, param6))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@param7", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, param7))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@param8", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, param8))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@param9", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, param9))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@Retvalue", SqlDbType.VarChar, 255, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, ""))
|
||||
conn.Open()
|
||||
|
||||
If fnkt < 10 Then
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
Return scmCmdToExecute.Parameters("@Retvalue").Value.ToString
|
||||
Else
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
Return dtToReturn
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Insert_job::" & scmCmdToExecute.CommandText + "::" + ex.Message)
|
||||
Return ""
|
||||
Finally
|
||||
conn.Close()
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
'dtToReturn.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function Save_ZipFile_Edoka_doc_Retrival(ByVal JobNr As Integer, Filename As String)
|
||||
Dim connection As New SqlConnection()
|
||||
Dim da As New SqlDataAdapter("Select top 1 * from EDOKA_Doc_Retrival_Job where Jobnr=" + JobNr.ToString, connection)
|
||||
Dim CB As SqlCommandBuilder = New SqlCommandBuilder(da)
|
||||
Dim ds As New DataSet()
|
||||
Dim fs As New FileStream(Filename, FileMode.OpenOrCreate, FileAccess.Read)
|
||||
Dim mydata(fs.Length) As Byte
|
||||
fs.Read(mydata, 0, fs.Length)
|
||||
fs.Close()
|
||||
Try
|
||||
connection.ConnectionString = Globals.sConnectionString_edoka
|
||||
connection.Open()
|
||||
da.Fill(ds, "docs")
|
||||
Dim myRow As DataRow
|
||||
|
||||
If ds.Tables(0).Rows.Count = 0 Then
|
||||
Else
|
||||
myRow = ds.Tables(0).Rows(0)
|
||||
myRow.Item(4) = mydata
|
||||
da.Update(ds, "docs")
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Return False
|
||||
End Try
|
||||
CB = Nothing
|
||||
ds = Nothing
|
||||
da = Nothing
|
||||
connection.Close()
|
||||
connection = Nothing
|
||||
Return True
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
19
ImgToBase64ToFile/ImgToFile/ImgToFile/db/db_connection.vb
Normal file
19
ImgToBase64ToFile/ImgToFile/ImgToFile/db/db_connection.vb
Normal file
@@ -0,0 +1,19 @@
|
||||
Imports System.ComponentModel
|
||||
Imports Microsoft.VisualBasic
|
||||
|
||||
Namespace edokadb
|
||||
|
||||
Public Class DB_Connection
|
||||
Shared Sub New()
|
||||
'Edoka
|
||||
|
||||
sConnectionString_edoka = My.Settings.EDOKA_Connection
|
||||
Globals.sConnectionString_edoka = sConnectionString_edoka
|
||||
|
||||
'Journale
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
|
||||
4
ImgToBase64ToFile/ImgToFile/ImgToFile/globals.vb
Normal file
4
ImgToBase64ToFile/ImgToFile/ImgToFile/globals.vb
Normal file
@@ -0,0 +1,4 @@
|
||||
Module Globals
|
||||
Public sConnectionString_edoka As String
|
||||
Public conn_edoka As New edokadb.clsConnectionProvider()
|
||||
End Module
|
||||
@@ -0,0 +1,7 @@
|
||||
' <autogenerated/>
|
||||
Option Strict Off
|
||||
Option Explicit On
|
||||
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
<Assembly: Global.System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6", FrameworkDisplayName:=".NET Framework 4.6")>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
ImgToBase64ToFile/ImgToFile/ImgToFile/obj/Debug/ImgToFile.exe
Normal file
BIN
ImgToBase64ToFile/ImgToFile/ImgToFile/obj/Debug/ImgToFile.exe
Normal file
Binary file not shown.
BIN
ImgToBase64ToFile/ImgToFile/ImgToFile/obj/Debug/ImgToFile.pdb
Normal file
BIN
ImgToBase64ToFile/ImgToFile/ImgToFile/obj/Debug/ImgToFile.pdb
Normal file
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
d1a3d4188cfa3151ff25e5022637869d8ab8f857
|
||||
@@ -0,0 +1,11 @@
|
||||
E:\Software-Projekte\EDOKA\tools\ImgToBase64ToFile\ImgToFile\ImgToFile\obj\Debug\ImgToFile.vbproj.AssemblyReference.cache
|
||||
E:\Software-Projekte\EDOKA\tools\ImgToBase64ToFile\ImgToFile\ImgToFile\obj\Debug\ImgToFile.Resources.resources
|
||||
E:\Software-Projekte\EDOKA\tools\ImgToBase64ToFile\ImgToFile\ImgToFile\obj\Debug\ImgToFile.vbproj.GenerateResource.cache
|
||||
E:\Software-Projekte\EDOKA\tools\ImgToBase64ToFile\ImgToFile\ImgToFile\obj\Debug\ImgToFile.vbproj.CoreCompileInputs.cache
|
||||
E:\Software-Projekte\EDOKA\tools\ImgToBase64ToFile\ImgToFile\ImgToFile\bin\Debug\ImgToFile.exe.config
|
||||
E:\Software-Projekte\EDOKA\tools\ImgToBase64ToFile\ImgToFile\ImgToFile\bin\Debug\ImgToFile.exe
|
||||
E:\Software-Projekte\EDOKA\tools\ImgToBase64ToFile\ImgToFile\ImgToFile\bin\Debug\ImgToFile.pdb
|
||||
E:\Software-Projekte\EDOKA\tools\ImgToBase64ToFile\ImgToFile\ImgToFile\bin\Debug\ImgToFile.xml
|
||||
E:\Software-Projekte\EDOKA\tools\ImgToBase64ToFile\ImgToFile\ImgToFile\obj\Debug\ImgToFile.exe
|
||||
E:\Software-Projekte\EDOKA\tools\ImgToBase64ToFile\ImgToFile\ImgToFile\obj\Debug\ImgToFile.xml
|
||||
E:\Software-Projekte\EDOKA\tools\ImgToBase64ToFile\ImgToFile\ImgToFile\obj\Debug\ImgToFile.pdb
|
||||
Binary file not shown.
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>
|
||||
ImgToFile
|
||||
</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:ImgToFile.My.Resources.Resources">
|
||||
<summary>
|
||||
A strongly-typed resource class, for looking up localized strings, etc.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ImgToFile.My.Resources.Resources.ResourceManager">
|
||||
<summary>
|
||||
Returns the cached ResourceManager instance used by this class.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:ImgToFile.My.Resources.Resources.Culture">
|
||||
<summary>
|
||||
Overrides the current thread's CurrentUICulture property for all
|
||||
resource lookups using this strongly typed resource class.
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
Binary file not shown.
Reference in New Issue
Block a user