Initial commit

This commit is contained in:
2020-10-21 10:43:18 +02:00
commit 56bd02798f
5848 changed files with 2659025 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
Imports PluginContracts
Public Class Class1
Implements PluginContracts.IPlugin
Public ReadOnly Property Name() As String Implements IPlugin.Name
Get
Return "EDOKA_EDKB19_Servicecontroller"
End Get
End Property
Public Function Show(CurrentUser As String, Connectionstring As String, Parentform As Object) As Object Implements IPlugin.Show
Dim f As New Form1
f.MdiParent = Parentform
f.Show()
End Function
End Class

View File

@@ -0,0 +1,34 @@
Module Crypto
Public Function EncryptText(ByVal strText As String, ByVal strPwd As String)
Dim i As Integer, c As Integer
Dim strBuff As String
strPwd = UCase$(strPwd)
If Len(strPwd) Then
For i = 1 To Len(strText)
c = Asc(Mid$(strText, i, 1))
c = c + Asc(Mid$(strPwd, (i Mod Len(strPwd)) + 1, 1))
strBuff = strBuff & Chr(c And &HFF)
Next i
Else
strBuff = strText
End If
EncryptText = strBuff
End Function
Public Function DecryptText(ByVal strText As String, ByVal strPwd As String)
Dim i As Integer, c As Integer
Dim strBuff As String
strPwd = UCase$(strPwd)
If Len(strPwd) Then
For i = 1 To Len(strText)
c = Asc(Mid$(strText, i, 1))
c = c - Asc(Mid$(strPwd, (i Mod Len(strPwd)) + 1, 1))
strBuff = strBuff & Chr(c And &HFF)
Next i
Else
strBuff = strText
End If
DecryptText = strBuff
End Function
End Module

View File

@@ -0,0 +1,14 @@
Imports System.IO
Imports System.Reflection
Module Globals
Public ConnectionFilename As String
Public sConnectionstring As String
Public Mitarbeiternr As Integer
Public Function ApplicationPath() As String
Return Path.GetDirectoryName([Assembly].GetEntryAssembly().Location) + "\"
End Function
End Module

View File

@@ -0,0 +1,96 @@
Imports System.IO
Imports System.Data.Sql
Imports System.Data.SqlClient
Public Class clsDB
Public dsDaten As New DataSet
Public dsdaten1 As New DataSet
Public dsdatendocm As New DataSet
Public dadaten As SqlDataAdapter
Public dadatendocm As SqlDataAdapter
Dim sql As String
Public Sub Get_data()
Try
dsDaten.Clear()
sql = "Select * from edkb19_ServiceController"
dadaten = New SqlDataAdapter(sql, Globals.sConnectionstring)
dadaten.Fill(dsDaten, "Dokumenttypen")
Catch
End Try
End Sub
Sub Update_Daten()
Try
Dim cb As New SqlCommandBuilder(dadaten)
dadaten.Update(dsDaten, dsDaten.Tables(0).TableName)
MsgBox("Änderungen wurden gespeichert")
Catch ex As Exception
MsgBox("Felher: " + ex.Message)
End Try
End Sub
End Class
Public Class DB_Connection
''' <summary>
''' Liest sämtlcihe CFG-Dateien mit dem Namen "Vertragsverwaltung...". Sind meherere Dateien vorhanden,
''' wird ein Auswahldialog zur Datenbank-Selektion angezeigt.
''' Standardmässig wird Vertragsverwaltung.cfg als CFG-Datei benutzt.
'''
''' Die CFG-Datei ist verschlüsselt und wird über die Crypto-Funktionen entschlüsselt.
''' </summary>
''' <remarks></remarks>
Sub New()
Dim path As String = ""
Dim fc As Integer = 0
If fc < 2 Then Globals.ConnectionFilename = "edokaconn.cfg"
Dim ofile As System.IO.File
Dim oread As System.IO.StreamReader
oread = ofile.OpenText(ApplicationPath() + "\" + Globals.ConnectionFilename)
sConnectionstring = oread.ReadLine
sConnectionstring = Crypto.DecryptText(sConnectionstring, "HutterundMueller")
sConnectionstring = Left(sConnectionstring, Len(sConnectionstring) - 1)
Globals.sConnectionstring = sConnectionstring
oread.Close()
Dim connection As New SqlConnection()
Dim da As New SqlDataAdapter("Select beschreibung from pluginparameter where pluginparamnr=1", connection)
Dim CB As SqlCommandBuilder = New SqlCommandBuilder(da)
Dim ds As New DataSet()
Try
connection.ConnectionString = Globals.sConnectionstring
connection.Open()
da.Fill(ds, "params")
path = ds.Tables(0).Rows(0).Item(0)
Catch ex As Exception
path = ""
CB = Nothing
End Try
ds = Nothing
da = Nothing
connection.Close()
connection = Nothing
Globals.ConnectionFilename = "edokaconn.cfg"
oread = ofile.OpenText(path + "\" + Globals.ConnectionFilename)
sConnectionstring = oread.ReadLine
sConnectionstring = Crypto.DecryptText(sConnectionstring, "HutterundMueller")
sConnectionstring = Left(sConnectionstring, Len(sConnectionstring) - 1)
Globals.sConnectionstring = sConnectionstring
oread.Close()
End Sub
End Class