This commit is contained in:
2019-10-31 09:23:20 +01:00
parent 021cce6f04
commit c5595a729a
169 changed files with 16226 additions and 3376 deletions

View File

@@ -298,6 +298,7 @@ Public Class cADMIN
Return SQL.getValueTxtBySql("SELECT mit_pwd FROM tblMitarbeiter where mit_username='" & user & "' COLLATE Latin1_General_CS_AS AND (mit_firma='" & firma & "' OR mit_firma='ALL' ) ", "ADMIN")
End Function
Public Function checkLogin(ByVal user As String, ByVal pwd As String, ByVal firma As String) As Boolean
VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = If(firma = "", "VERAG", firma)
@@ -325,11 +326,11 @@ Public Class cADMIN
If dr.Read Then
cMitarbeiterAVISO.MitarbeiterID = CInt(dr.Item("mit_id"))
' cMitarbeiterAVISO.Grenzstelle = CStr(dr.Item("mit_niederlassung"))
' cMitarbeiterAVISO.Grenzstelle = CStr(dr.Item("mit_niederlassung"))
' If cMitarbeiterAVISO.Grenzstelle = "Suben" Then cMitarbeiterAVISO.Grenzstelle = "SUB"
' If cMitarbeiterAVISO.Grenzstelle = "Waidhaus" Then cMitarbeiterAVISO.Grenzstelle = "WAI"
' If cMitarbeiterAVISO.Grenzstelle = "Nickelsdorf" Then cMitarbeiterAVISO.Grenzstelle = "NKD"
' If cMitarbeiterAVISO.Grenzstelle = "Salzburg" Then cMitarbeiterAVISO.Grenzstelle = "SBG"
' If cMitarbeiterAVISO.Grenzstelle = "Nickelsdorf" Then cMitarbeiterAVISO.Grenzstelle = "NKD"
' If cMitarbeiterAVISO.Grenzstelle = "Salzburg" Then cMitarbeiterAVISO.Grenzstelle = "SBG"
' If cMitarbeiterAVISO.Grenzstelle = "" Then cMitarbeiterAVISO.Grenzstelle = "???"
cMitarbeiterAVISO.Mitarbeiter = CStr(dr.Item("mit_username"))
cMitarbeiterAVISO.Mitarbeitername = CStr(dr.Item("mit_vname")) & " " & CStr(dr.Item("mit_nname"))
@@ -376,7 +377,7 @@ Public Class cADMIN
End Using
dr.Close()
Catch ex As Exception
MsgBox("Fehler mit der Datenbankverbindung:" & vbCrLf & vbCrLf & ex.Message & ex.StackTrace, vbExclamation, "Datenbankfehler")
MsgBox("Fehler mit der Datenbankverbindung.", "Datenbankfehler")
Return False
End Try
@@ -889,6 +890,7 @@ Public Class cAviso
Property Zugmaschine As Object = Nothing
Property FahrerHandy As Object = Nothing
Property LKW_Nationalitaet As Object = Nothing
Property DakosyRef As Object = Nothing
Sub UPDATE_FahrerHandy(FahrerHandy As String)
If AvisoID <= 0 Then Exit Sub
@@ -975,6 +977,9 @@ Public Class cAvisoDAL
daten.Zugmaschine = VarToStr(dr.Item("Zugmaschine"))
daten.FahrerHandy = VarToStr(dr.Item("FahrerHandy"))
daten.LKW_Nationalitaet = VarToStr(dr.Item("LKW_Nationalitaet"))
daten.DakosyRef = VarToStr(dr.Item("DakosyRef"))
End If
dr.Close()
@@ -1227,17 +1232,17 @@ Public Class cAvisoDAL
hAuswahl = "INSERT INTO Aviso " &
"(Datum, LKW_Nr, Telefonisch, Änderungen, Info, Status, Auftraggeber, Frächter, letzterMitarbeiter, " &
"Vorbereitet,Vorgeschrieben, Ankunft, Freigabe, Dauer, AvisoEingang, Grenzstelle, LKW_fertig,letzterMitarbeiterId,Handling,Sendungen_Gesamtanzahl,Sammelakt,Frächter_KdNr,Auftraggeber_KdNr,AvisoTVHinweis,Buero,Imex,Abgeschlossen,FIRMA, " &
" Durchgangszollstelle1,Durchgangszollstelle2,Durchgangszollstelle3,Durchgangszollstelle4,Durchgangszollstelle5,Durchgangszollstelle6,Ausgangszollstelle,Zollstelle,TransportTemperatur,Zugmaschine,FahrerHandy,LKW_Nationalitaet) VALUES (" &
" Durchgangszollstelle1,Durchgangszollstelle2,Durchgangszollstelle3,Durchgangszollstelle4,Durchgangszollstelle5,Durchgangszollstelle6,Ausgangszollstelle,Zollstelle,TransportTemperatur,Zugmaschine,FahrerHandy,LKW_Nationalitaet,DakosyRef) VALUES (" &
"@Datum, @LKW_Nr, @Telefonisch, @Änderungen, @Info, @Status, @Auftraggeber, @Frächter, @letzterMitarbeiter, " &
"@Vorbereitet, @Vorgeschrieben, @Ankunft, @Freigabe, @Dauer, @AvisoEingang, @Grenzstelle, @LKW_fertig,@letzterMitarbeiterId,@Handling,@Sendungen_Gesamtanzahl,@Sammelakt,@Frächter_KdNr,@Auftraggeber_KdNr,@AvisoTVHinweis,@Buero,@Imex,@Abgeschlossen,@FIRMA," &
"@Durchgangszollstelle1,@Durchgangszollstelle2,@Durchgangszollstelle3,@Durchgangszollstelle4,@Durchgangszollstelle5,@Durchgangszollstelle6,@Ausgangszollstelle,@Zollstelle,@TransportTemperatur,@Zugmaschine,@FahrerHandy,@LKW_Nationalitaet); SELECT CAST(scope_identity() AS int);"
"@Durchgangszollstelle1,@Durchgangszollstelle2,@Durchgangszollstelle3,@Durchgangszollstelle4,@Durchgangszollstelle5,@Durchgangszollstelle6,@Ausgangszollstelle,@Zollstelle,@TransportTemperatur,@Zugmaschine,@FahrerHandy,@LKW_Nationalitaet,@DakosyRef); SELECT CAST(scope_identity() AS int);"
Else
id = d.AvisoID
'Änderung
hAuswahl = String.Format(
"UPDATE Aviso SET Datum = @Datum, LKW_Nr = @LKW_Nr, Telefonisch=@Telefonisch, Änderungen=@Änderungen, Info=@Info, Status=@Status, Auftraggeber=@Auftraggeber, Frächter=@Frächter, " &
" letzterMitarbeiter = @letzterMitarbeiter, Vorbereitet=@Vorbereitet,Vorgeschrieben=@Vorgeschrieben, Ankunft = @Ankunft, Freigabe = @Freigabe, Dauer = @Dauer, AvisoEingang = @AvisoEingang, Grenzstelle=@Grenzstelle, LKW_fertig=@LKW_fertig, letzterMitarbeiterId=@letzterMitarbeiterId, Handling=@Handling,Sendungen_Gesamtanzahl=@Sendungen_Gesamtanzahl,Sammelakt=@Sammelakt,Frächter_KdNr=@Frächter_KdNr,Auftraggeber_KdNr=@Auftraggeber_KdNr,AvisoTVHinweis=@AvisoTVHinweis,Buero=@Buero,Imex=@Imex,Abgeschlossen=@Abgeschlossen, " &
" Durchgangszollstelle1=@Durchgangszollstelle1,Durchgangszollstelle2=@Durchgangszollstelle2,Durchgangszollstelle3=@Durchgangszollstelle3,Durchgangszollstelle4=@Durchgangszollstelle4,Durchgangszollstelle5=@Durchgangszollstelle5,Durchgangszollstelle6=@Durchgangszollstelle6,Ausgangszollstelle=@Ausgangszollstelle,Zollstelle=@Zollstelle,TransportTemperatur=@TransportTemperatur,Zugmaschine=@Zugmaschine,FahrerHandy=@FahrerHandy, LKW_Nationalitaet=@LKW_Nationalitaet " &
" Durchgangszollstelle1=@Durchgangszollstelle1,Durchgangszollstelle2=@Durchgangszollstelle2,Durchgangszollstelle3=@Durchgangszollstelle3,Durchgangszollstelle4=@Durchgangszollstelle4,Durchgangszollstelle5=@Durchgangszollstelle5,Durchgangszollstelle6=@Durchgangszollstelle6,Ausgangszollstelle=@Ausgangszollstelle,Zollstelle=@Zollstelle,TransportTemperatur=@TransportTemperatur,Zugmaschine=@Zugmaschine,FahrerHandy=@FahrerHandy, LKW_Nationalitaet=@LKW_Nationalitaet, DakosyRef=@DakosyRef " &
" WHERE AvisoID = @AvisoID")
End If
@@ -1297,6 +1302,7 @@ Public Class cAvisoDAL
cmd.Parameters.AddWithValue("@Zugmaschine", If(d.Zugmaschine Is Nothing, DBNull.Value, d.Zugmaschine))
cmd.Parameters.AddWithValue("@FahrerHandy", If(d.FahrerHandy Is Nothing, DBNull.Value, d.FahrerHandy))
cmd.Parameters.AddWithValue("@LKW_Nationalitaet", If(d.LKW_Nationalitaet Is Nothing, DBNull.Value, d.LKW_Nationalitaet))
cmd.Parameters.AddWithValue("@DakosyRef", If(d.DakosyRef Is Nothing, DBNull.Value, d.DakosyRef))
Try
If d.AvisoID <= 0 Then

View File

@@ -1,50 +1,33 @@
<?xml version="1.0" encoding="utf-8" ?>
<?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="VERAG_PROG_ALLGEMEIN.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="VERAG_PROG_ALLGEMEIN.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
</sectionGroup>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="VERAG_PROG_ALLGEMEIN.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="VERAG_PROG_ALLGEMEIN.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
</sectionGroup>
</configSections>
<connectionStrings>
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.FMZOLL_PRODConnectionString"
connectionString="Data Source=192.168.0.91\SQLFMZOLL;Initial Catalog=VERAG;Integrated Security=false;User ID=test;Password=BmWr501956;" />
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.ATLASConnectionString"
connectionString="Data Source=192.168.0.95\SQLATLAS;Initial Catalog=atlas;Integrated Security=false;User ID=sa;Password=BmWr501956;" />
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.ADMINConnectionString"
connectionString="Data Source=192.168.0.94\SQLEXPRESS;Initial Catalog=ADMIN;Integrated Security=false;User ID=sa;Password=BmWr501956;" />
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.SDL_PRODConnectionString"
connectionString="Data Source=192.168.0.91\SQLFMZOLL;Initial Catalog=SDL;Integrated Security=false;User ID=sa;Password=BmWr501956;" />
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.FMZOLLConnectionString"
connectionString="Data Source=192.168.0.90\DEVSQL;Initial Catalog=VERAG;Integrated Security=false;User ID=sa;Password=BmWr501956;" />
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.AVISOConnectionStringTEST"
connectionString="Data Source=192.168.0.90\DEVSQL;Initial Catalog=AVISO_new;Integrated Security=false;User ID=sa;Password=BmWr501956;Pooling=true;Min Pool Size=5;Max Pool Size=200" />
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.AVISOConnectionString"
connectionString="Data Source=192.168.0.94\SQLEXPRESS;Initial Catalog=AVISO;Integrated Security=false;User ID=sa;Password=BmWr501956;Pooling=true;Min Pool Size=5;Max Pool Size=200" />
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.SDLConnectionString"
connectionString="Data Source=192.168.0.90\DEVSQL;Initial Catalog=SDL;Integrated Security=False;Persist Security Info=True;User ID=sa;Password=BmWr501956;TrustServerCertificate=False" />
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.EZOLLConnectionString"
connectionString="Data Source=192.168.0.94\SQLEXPRESS;Initial Catalog=ezoll;Integrated Security=false;User ID=sa;Password=BmWr501956;" />
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.AVISO_ATILLAConnectionString"
connectionString="Data Source=192.168.0.94\SQLEXPRESS;Initial Catalog=AVISO;Integrated Security=false;User ID=sa;Password=BmWr501956;Pooling=true;Min Pool Size=5;Max Pool Size=200" />
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.ATLAS_SBGConnectionString"
connectionString="Data Source=192.168.133.98;Initial Catalog=atlas;Integrated Security=false;User ID=sa;Password=BmWr501956;" />
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.UIDConnectionString"
connectionString="Data Source=192.168.0.90\DEVSQL;Initial Catalog=UID;Persist Security Info=True;User ID=sa;Password=BmWr501956" />
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.UID_PRODConnectionString"
connectionString="Data Source=192.168.0.94\SQLEXPRESS;Initial Catalog=UID;Integrated Security=false;User ID=sa;Password=BmWr501956;" />
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.FDConnectionString"
connectionString="Data Source=192.168.0.94\SQLEXPRESS;Initial Catalog=FD;Integrated Security=false;User ID=sa;Password=BmWr501956;" />
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.FD_PRODConnectionString"
connectionString="Data Source=192.168.0.90\DEVSQL;Initial Catalog=FD;Integrated Security=false;User ID=sa;Password=BmWr501956;" />
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.DISPOConnectionStringTEST"
connectionString="Data Source=192.168.0.90\DEVSQL;Initial Catalog=DISPO;Integrated Security=false;User ID=sa;Password=BmWr501956;Pooling=true;Min Pool Size=5;Max Pool Size=200"
providerName="" />
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.FMZOLL_PRODConnectionString" connectionString="Data Source=192.168.0.91\SQLFMZOLL;Initial Catalog=VERAG;Integrated Security=false;User ID=test;Password=BmWr501956;"/>
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.ATLASConnectionString" connectionString="Data Source=192.168.0.95\SQLATLAS;Initial Catalog=atlas;Integrated Security=false;User ID=sa;Password=BmWr501956;"/>
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.ADMINConnectionString" connectionString="Data Source=192.168.0.94\SQLEXPRESS;Initial Catalog=ADMIN;Integrated Security=false;User ID=sa;Password=BmWr501956;"/>
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.SDL_PRODConnectionString" connectionString="Data Source=192.168.0.91\SQLFMZOLL;Initial Catalog=SDL;Integrated Security=false;User ID=sa;Password=BmWr501956;"/>
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.FMZOLLConnectionString" connectionString="Data Source=192.168.0.90\DEVSQL;Initial Catalog=VERAG;Integrated Security=false;User ID=sa;Password=BmWr501956;"/>
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.AVISOConnectionStringTEST" connectionString="Data Source=192.168.0.90\DEVSQL;Initial Catalog=AVISO_new;Integrated Security=false;User ID=sa;Password=BmWr501956;Pooling=true;Min Pool Size=5;Max Pool Size=200"/>
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.AVISOConnectionString" connectionString="Data Source=192.168.0.94\SQLEXPRESS;Initial Catalog=AVISO;Integrated Security=false;User ID=sa;Password=BmWr501956;Pooling=true;Min Pool Size=5;Max Pool Size=200"/>
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.SDLConnectionString" connectionString="Data Source=192.168.0.90\DEVSQL;Initial Catalog=SDL;Integrated Security=False;Persist Security Info=True;User ID=sa;Password=BmWr501956;TrustServerCertificate=False"/>
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.EZOLLConnectionString" connectionString="Data Source=192.168.0.94\SQLEXPRESS;Initial Catalog=ezoll;Integrated Security=false;User ID=sa;Password=BmWr501956;"/>
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.AVISO_ATILLAConnectionString" connectionString="Data Source=192.168.0.94\SQLEXPRESS;Initial Catalog=AVISO;Integrated Security=false;User ID=sa;Password=BmWr501956;Pooling=true;Min Pool Size=5;Max Pool Size=200"/>
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.ATLAS_SBGConnectionString" connectionString="Data Source=192.168.133.98;Initial Catalog=atlas;Integrated Security=false;User ID=sa;Password=BmWr501956;"/>
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.UIDConnectionString" connectionString="Data Source=192.168.0.90\DEVSQL;Initial Catalog=UID;Persist Security Info=True;User ID=sa;Password=BmWr501956"/>
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.UID_PRODConnectionString" connectionString="Data Source=192.168.0.94\SQLEXPRESS;Initial Catalog=UID;Integrated Security=false;User ID=sa;Password=BmWr501956;"/>
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.FDConnectionString" connectionString="Data Source=192.168.0.94\SQLEXPRESS;Initial Catalog=FD;Integrated Security=false;User ID=sa;Password=BmWr501956;"/>
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.FD_PRODConnectionString" connectionString="Data Source=192.168.0.90\DEVSQL;Initial Catalog=FD;Integrated Security=false;User ID=sa;Password=BmWr501956;"/>
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.DISPOConnectionStringTEST" connectionString="Data Source=192.168.0.90\DEVSQL;Initial Catalog=DISPO;Integrated Security=false;User ID=sa;Password=BmWr501956;Pooling=true;Min Pool Size=5;Max Pool Size=200" providerName=""/>
</connectionStrings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7"/>
</startup>
<userSettings>
<VERAG_PROG_ALLGEMEIN.My.MySettings>
@@ -52,7 +35,7 @@
<value>Data Source=192.168.0.99;Initial Catalog=Therefore;Integrated Security=false;User ID=sa;Password=BmWr501956;</value>
</setting>
<setting name="d" serializeAs="String">
<value />
<value/>
</setting>
<setting name="DISPOConnectionString" serializeAs="String">
<value>Data Source=192.168.0.94\SQLEXPRESS;Initial Catalog=DISPO;Integrated Security=false;User ID=sa;Password=BmWr501956;Pooling=true;Min Pool Size=5;Max Pool Size=200</value>
@@ -61,10 +44,9 @@
</userSettings>
<applicationSettings>
<VERAG_PROG_ALLGEMEIN.My.MySettings>
<setting name="VERAG_PROG_ALLGEMEIN_UIDPruefung_checkVatService"
serializeAs="String">
<setting name="VERAG_PROG_ALLGEMEIN_UIDPruefung_checkVatService" serializeAs="String">
<value>http://ec.europa.eu/taxation_customs/vies/services/checkVatService</value>
</setting>
</VERAG_PROG_ALLGEMEIN.My.MySettings>
</applicationSettings>
</configuration>
</configuration>

View File

@@ -0,0 +1,146 @@
#Region " Class "
#Region " Enums "
Public Enum CodeSetAllowed
CodeA
CodeB
CodeAorB
End Enum
Public Enum CodeSet
CodeA
CodeB
End Enum
#End Region
Public Class Code128Content
Private mCodeList As Integer()
Public Sub New(ByVal AsciiData As String)
mCodeList = StringToCode128(AsciiData)
End Sub
Public ReadOnly Property Codes() As Integer()
Get
Return mCodeList
End Get
End Property
Private Function StringToCode128(ByVal AsciiData As String) As Integer()
Dim asciiBytes As Byte() = System.Text.Encoding.ASCII.GetBytes(AsciiData)
Dim csa1 As CodeSetAllowed = If(asciiBytes.Length > 0, Code128Code.CodesetAllowedForChar(asciiBytes(0)), CodeSetAllowed.CodeAorB)
Dim csa2 As CodeSetAllowed = If(asciiBytes.Length > 0, Code128Code.CodesetAllowedForChar(asciiBytes(1)), CodeSetAllowed.CodeAorB)
Dim currcs As CodeSet = GetBestStartSet(csa1, csa2)
Dim codes As New List(Of Integer)(asciiBytes.Length + 3)
codes.Add(Code128Code.StartCodeForCodeSet(currcs))
For i As Integer = 0 To asciiBytes.Length - 1
Dim thischar As Integer = asciiBytes(i)
Dim nextchar As Integer = If(asciiBytes.Length > (i + 1), asciiBytes(i + 1), -1)
codes.AddRange(Code128Code.CodesForChar(thischar, nextchar, currcs))
Next
Dim checksum As Integer = CInt(codes(0))
For i As Integer = 1 To codes.Count - 1
checksum += i * CInt(codes(i))
Next
codes.Add(checksum Mod 103)
codes.Add(Code128Code.StopCode())
Return codes.ToArray
End Function
Private Function GetBestStartSet(ByVal csa1 As CodeSetAllowed, ByVal csa2 As CodeSetAllowed) As CodeSet
Dim vote As Integer = 0
vote += If((csa1 = CodeSetAllowed.CodeA), 1, 0)
vote += If((csa1 = CodeSetAllowed.CodeB), -1, 0)
vote += If((csa2 = CodeSetAllowed.CodeA), 1, 0)
vote += If((csa2 = CodeSetAllowed.CodeB), -1, 0)
Return If((vote > 0), CodeSet.CodeA, CodeSet.CodeB)
End Function
End Class
Public NotInheritable Class Code128Code
#Region "Constants"
Private Const cSHIFT As Integer = 98
Private Const cCODEA As Integer = 101
Private Const cCODEB As Integer = 100
Private Const cSTARTA As Integer = 103
Private Const cSTARTB As Integer = 104
Private Const cSTOP As Integer = 106
#End Region
Public Shared Function CodesForChar(ByVal CharAscii As Integer, ByVal LookAheadAscii As Integer, ByRef CurrCodeSet As CodeSet) As Integer()
Dim result As Integer()
Dim shifter As Integer = -1
If Not CharCompatibleWithCodeset(CharAscii, CurrCodeSet) Then
If (LookAheadAscii <> -1) AndAlso Not CharCompatibleWithCodeset(LookAheadAscii, CurrCodeSet) Then
Select Case CurrCodeSet
Case CodeSet.CodeA
shifter = cCODEB
CurrCodeSet = CodeSet.CodeB
Exit Select
Case CodeSet.CodeB
shifter = cCODEA
CurrCodeSet = CodeSet.CodeA
Exit Select
End Select
Else
shifter = cSHIFT
End If
End If
If shifter <> -1 Then
result = New Integer(1) {}
result(0) = shifter
result(1) = CodeValueForChar(CharAscii)
Else
result = New Integer(0) {}
result(0) = CodeValueForChar(CharAscii)
End If
Return result
End Function
Public Shared Function CodesetAllowedForChar(ByVal CharAscii As Integer) As CodeSetAllowed
If CharAscii >= 32 AndAlso CharAscii <= 95 Then
Return CodeSetAllowed.CodeAorB
Else
Return If((CharAscii < 32), CodeSetAllowed.CodeA, CodeSetAllowed.CodeB)
End If
End Function
Public Shared Function CharCompatibleWithCodeset(ByVal CharAscii As Integer, ByVal currcs As CodeSet) As Boolean
Dim csa As CodeSetAllowed = CodesetAllowedForChar(CharAscii)
Return csa = CodeSetAllowed.CodeAorB OrElse (csa = CodeSetAllowed.CodeA AndAlso currcs = CodeSet.CodeA) OrElse (csa = CodeSetAllowed.CodeB AndAlso currcs = CodeSet.CodeB)
End Function
Public Shared Function CodeValueForChar(ByVal CharAscii As Integer) As Integer
Return If((CharAscii >= 32), CharAscii - 32, CharAscii + 64)
End Function
Public Shared Function StartCodeForCodeSet(ByVal cs As CodeSet) As Integer
Return If(cs = CodeSet.CodeA, cSTARTA, cSTARTB)
End Function
Public Shared Function StopCode() As Integer
Return cSTOP
End Function
End Class
#End Region

View File

@@ -0,0 +1,180 @@
Imports System.Drawing
Imports System.Diagnostics
Public NotInheritable Class Code128Rendering
#Region "Code patterns"
Private Shared ReadOnly cPatterns As Integer(,) = {{2, 1, 2, 2, 2, 2, _
0, 0}, {2, 2, 2, 1, 2, 2, _
0, 0}, {2, 2, 2, 2, 2, 1, _
0, 0}, {1, 2, 1, 2, 2, 3, _
0, 0}, {1, 2, 1, 3, 2, 2, _
0, 0}, {1, 3, 1, 2, 2, 2, _
0, 0}, _
{1, 2, 2, 2, 1, 3, _
0, 0}, {1, 2, 2, 3, 1, 2, _
0, 0}, {1, 3, 2, 2, 1, 2, _
0, 0}, {2, 2, 1, 2, 1, 3, _
0, 0}, {2, 2, 1, 3, 1, 2, _
0, 0}, {2, 3, 1, 2, 1, 2, _
0, 0}, _
{1, 1, 2, 2, 3, 2, _
0, 0}, {1, 2, 2, 1, 3, 2, _
0, 0}, {1, 2, 2, 2, 3, 1, _
0, 0}, {1, 1, 3, 2, 2, 2, _
0, 0}, {1, 2, 3, 1, 2, 2, _
0, 0}, {1, 2, 3, 2, 2, 1, _
0, 0}, _
{2, 2, 3, 2, 1, 1, _
0, 0}, {2, 2, 1, 1, 3, 2, _
0, 0}, {2, 2, 1, 2, 3, 1, _
0, 0}, {2, 1, 3, 2, 1, 2, _
0, 0}, {2, 2, 3, 1, 1, 2, _
0, 0}, {3, 1, 2, 1, 3, 1, _
0, 0}, _
{3, 1, 1, 2, 2, 2, _
0, 0}, {3, 2, 1, 1, 2, 2, _
0, 0}, {3, 2, 1, 2, 2, 1, _
0, 0}, {3, 1, 2, 2, 1, 2, _
0, 0}, {3, 2, 2, 1, 1, 2, _
0, 0}, {3, 2, 2, 2, 1, 1, _
0, 0}, _
{2, 1, 2, 1, 2, 3, _
0, 0}, {2, 1, 2, 3, 2, 1, _
0, 0}, {2, 3, 2, 1, 2, 1, _
0, 0}, {1, 1, 1, 3, 2, 3, _
0, 0}, {1, 3, 1, 1, 2, 3, _
0, 0}, {1, 3, 1, 3, 2, 1, _
0, 0}, _
{1, 1, 2, 3, 1, 3, _
0, 0}, {1, 3, 2, 1, 1, 3, _
0, 0}, {1, 3, 2, 3, 1, 1, _
0, 0}, {2, 1, 1, 3, 1, 3, _
0, 0}, {2, 3, 1, 1, 1, 3, _
0, 0}, {2, 3, 1, 3, 1, 1, _
0, 0}, _
{1, 1, 2, 1, 3, 3, _
0, 0}, {1, 1, 2, 3, 3, 1, _
0, 0}, {1, 3, 2, 1, 3, 1, _
0, 0}, {1, 1, 3, 1, 2, 3, _
0, 0}, {1, 1, 3, 3, 2, 1, _
0, 0}, {1, 3, 3, 1, 2, 1, _
0, 0}, _
{3, 1, 3, 1, 2, 1, _
0, 0}, {2, 1, 1, 3, 3, 1, _
0, 0}, {2, 3, 1, 1, 3, 1, _
0, 0}, {2, 1, 3, 1, 1, 3, _
0, 0}, {2, 1, 3, 3, 1, 1, _
0, 0}, {2, 1, 3, 1, 3, 1, _
0, 0}, _
{3, 1, 1, 1, 2, 3, _
0, 0}, {3, 1, 1, 3, 2, 1, _
0, 0}, {3, 3, 1, 1, 2, 1, _
0, 0}, {3, 1, 2, 1, 1, 3, _
0, 0}, {3, 1, 2, 3, 1, 1, _
0, 0}, {3, 3, 2, 1, 1, 1, _
0, 0}, _
{3, 1, 4, 1, 1, 1, _
0, 0}, {2, 2, 1, 4, 1, 1, _
0, 0}, {4, 3, 1, 1, 1, 1, _
0, 0}, {1, 1, 1, 2, 2, 4, _
0, 0}, {1, 1, 1, 4, 2, 2, _
0, 0}, {1, 2, 1, 1, 2, 4, _
0, 0}, _
{1, 2, 1, 4, 2, 1, _
0, 0}, {1, 4, 1, 1, 2, 2, _
0, 0}, {1, 4, 1, 2, 2, 1, _
0, 0}, {1, 1, 2, 2, 1, 4, _
0, 0}, {1, 1, 2, 4, 1, 2, _
0, 0}, {1, 2, 2, 1, 1, 4, _
0, 0}, _
{1, 2, 2, 4, 1, 1, _
0, 0}, {1, 4, 2, 1, 1, 2, _
0, 0}, {1, 4, 2, 2, 1, 1, _
0, 0}, {2, 4, 1, 2, 1, 1, _
0, 0}, {2, 2, 1, 1, 1, 4, _
0, 0}, {4, 1, 3, 1, 1, 1, _
0, 0}, _
{2, 4, 1, 1, 1, 2, _
0, 0}, {1, 3, 4, 1, 1, 1, _
0, 0}, {1, 1, 1, 2, 4, 2, _
0, 0}, {1, 2, 1, 1, 4, 2, _
0, 0}, {1, 2, 1, 2, 4, 1, _
0, 0}, {1, 1, 4, 2, 1, 2, _
0, 0}, _
{1, 2, 4, 1, 1, 2, _
0, 0}, {1, 2, 4, 2, 1, 1, _
0, 0}, {4, 1, 1, 2, 1, 2, _
0, 0}, {4, 2, 1, 1, 1, 2, _
0, 0}, {4, 2, 1, 2, 1, 1, _
0, 0}, {2, 1, 2, 1, 4, 1, _
0, 0}, _
{2, 1, 4, 1, 2, 1, _
0, 0}, {4, 1, 2, 1, 2, 1, _
0, 0}, {1, 1, 1, 1, 4, 3, _
0, 0}, {1, 1, 1, 3, 4, 1, _
0, 0}, {1, 3, 1, 1, 4, 1, _
0, 0}, {1, 1, 4, 1, 1, 3, _
0, 0}, _
{1, 1, 4, 3, 1, 1, _
0, 0}, {4, 1, 1, 1, 1, 3, _
0, 0}, {4, 1, 1, 3, 1, 1, _
0, 0}, {1, 1, 3, 1, 4, 1, _
0, 0}, {1, 1, 4, 1, 3, 1, _
0, 0}, {3, 1, 1, 1, 4, 1, _
0, 0}, _
{4, 1, 1, 1, 3, 1, _
0, 0}, {2, 1, 1, 4, 1, 2, _
0, 0}, {2, 1, 1, 2, 1, 4, _
0, 0}, {2, 1, 1, 2, 3, 2, _
0, 0}, {2, 3, 3, 1, 1, 1, _
2, 0}}
#End Region
Private Const cQuietWidth As Integer = 10
Public Shared Function MakeBarcodeImage(ByVal InputData As String, ByVal BarWeight As Double, ByVal AddQuietZone As Boolean, Optional heightOpt As Object = Nothing) As Image
Dim content As New Code128Content(InputData)
Dim codes As Integer() = content.Codes
Dim width As Integer, height As Integer
width = ((codes.Length - 3) * 11 + 35) * BarWeight
If heightOpt IsNot Nothing Then
height = CInt(heightOpt)
Else
height = Convert.ToInt32(System.Math.Ceiling(Convert.ToSingle(width) * 0.15F))
End If
If AddQuietZone Then
width += 2 * cQuietWidth * BarWeight
End If
Dim myimg As Image = New System.Drawing.Bitmap(width, height)
Using gr As Graphics = Graphics.FromImage(myimg)
gr.FillRectangle(System.Drawing.Brushes.White, 0, 0, width, height)
Dim cursor As Integer = If(AddQuietZone, cQuietWidth * BarWeight, 0)
For codeidx As Integer = 0 To codes.Length - 1
Dim code As Integer = codes(codeidx)
For bar As Integer = 0 To 7 Step 2
Dim barwidth As Integer = cPatterns(code, bar) * BarWeight
Dim spcwidth As Integer = cPatterns(code, bar + 1) * BarWeight
If barwidth > 0 Then
gr.FillRectangle(System.Drawing.Brushes.Black, cursor, 0, barwidth, height)
End If
cursor += (barwidth + spcwidth)
Next
Next
End Using
Return myimg
End Function
End Class

View File

@@ -272,10 +272,11 @@ Public Class KdSearchBox
SQLstr &= " AND ( Ordnungsbegriff LIKE '" & srch & "%' OR AdressenNr LIKE '" & srch & "%' ) "
If srch2 <> "" Then SQLstr &= " AND ( PLZ LIKE '" & srch2 & "%' OR Ort LIKE '" & srch2 & "%' OR LandKz LIKE '" & srch2 & "%' OR Straße LIKE '" & srch2 & "%' ) "
SQLstr &= " AND [Auswahl]='A' "
If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "IMEX" Then
SQLstr &= " AND [FilialenNr]='5501' "
If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA <> "VERAG" Then
SQLstr &= " AND [FilialenNr]='" & VERAG_PROG_ALLGEMEIN.cAllgemein.STAMMFILIALE & "' "
Else
SQLstr &= " AND isnull([FilialenNr],0)<>'5501' "
'SQLstr &= " AND isnull([FilialenNr],0)<>'5501' "
SQLstr &= " AND isnull([FilialenNr],0) NOT IN ('5501','5601','5701','5801') "
End If
If Not _displayWoelflKd Then SQLstr &= " AND AdressenNr NOT LIKE '15%'"
SQLstr &= " order by Ordnungsbegriff "
@@ -313,10 +314,11 @@ Public Class KdSearchBox
SQLstr &= " AND ( Ordnungsbegriff LIKE '" & srch & "%' OR AdressenNr LIKE '" & srch & "%' ) "
If srch2 <> "" Then SQLstr &= " AND ( PLZ LIKE '" & srch2 & "%' OR Ort LIKE '" & srch2 & "%' OR LandKz LIKE '" & srch2 & "%' OR Straße LIKE '" & srch2 & "%' ) "
SQLstr &= " AND [Auswahl]='I' "
If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "IMEX" Then
SQLstr &= " AND [FilialenNr]='5501' "
If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA <> "VERAG" Then
SQLstr &= " AND [FilialenNr]='" & VERAG_PROG_ALLGEMEIN.cAllgemein.STAMMFILIALE & "' "
Else
SQLstr &= " AND isnull([FilialenNr],0)<>'5501' "
'SQLstr &= " AND isnull([FilialenNr],0)<>'5501' "
SQLstr &= " AND isnull([FilialenNr],0) NOT IN ('5501','5601','5701','5801') "
End If
If Not _displayWoelflKd Then SQLstr &= " AND AdressenNr NOT LIKE '15%'"
SQLstr &= " order by Ordnungsbegriff "

View File

@@ -272,26 +272,32 @@ Public Class MySearchBox
Public Sub SET_VALUE(KEYPARAM_Value, Optional showerror = True)
If Not active Then Exit Sub
Try
If Not active Then Exit Sub
If KEYPARAM_Value Is Nothing Then KEYPARAM_Value = ""
Dim SQLstr As String = "SELECT TOP 1 " & SQL_SELECT & " WHERE 1=1 "
SQLstr &= " AND " & KEYPARAM & " = '" & KEYPARAM_Value & "' "
SQLstr &= If(SQL_WHERE <> "", " AND " & SQL_WHERE, "")
If SQL_ORDER_BY <> "" Then SQLstr &= " ORDER BY " & SQL_ORDER_BY
' MsgBox(SQLstr)
Dim dttmp As DataTable = SQL.loadDgvBySql(SQLstr, conn_art, , showerror)
If dttmp IsNot Nothing AndAlso dttmp.Rows.Count > 0 Then
setMeValue(dttmp.Rows(0))
Else
If _allowFreitext Then
Me.Text = KEYPARAM_Value
Me._value = KEYPARAM_Value
' MsgBox(SQLstr)
Dim dttmp As DataTable = SQL.loadDgvBySql(SQLstr, conn_art, , showerror)
If dttmp IsNot Nothing AndAlso dttmp.Rows.Count > 0 Then
setMeValue(dttmp.Rows(0))
Else
Me.Text = ""
Me._value = ""
If _allowFreitext Then
Me.Text = KEYPARAM_Value
Me._value = KEYPARAM_Value
Else
Me.Text = ""
Me._value = ""
End If
hideDgv(usrcntl)
End If
hideDgv(usrcntl)
End If
Catch ex As Exception
MsgBox("Es ist ein Fehler beim Such-Feld (" & Me.Name & ") aufgetreten 03: " & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & System.Reflection.MethodInfo.GetCurrentMethod.Name & vbNewLine & ex.StackTrace)
End Try
End Sub

View File

@@ -22,9 +22,8 @@ Partial Class frmPDFScanList
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Me.FlowLayoutPanel = New System.Windows.Forms.FlowLayoutPanel()
Me.cntxtMulti = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.cntxtMulti = New System.Windows.Forms.ContextMenuStrip()
Me.DateiScannenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.DateiHochladenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()

View File

@@ -60,4 +60,5 @@ Public Class frmPDFScanList
If Me IsNot Form.ActiveForm Then Me.Close()
End Sub
End Class

View File

@@ -32,7 +32,8 @@ Public Class usrCntLPDFScanSimple
Private Sub txt_Click(sender As Object, e As EventArgs) Handles txt.Click, Me.Click, picPDF.Click
If File.Exists(pdf_Path) Then
Process.Start(pdf_Path)
' Process.Start(pdf_Path)
Process.Start(VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.copyToTmp_KeepFilename(pdf_Path, bezeichnung))
RaiseEvent CLICKED()
End If
End Sub

View File

@@ -143,7 +143,7 @@ Public Class usrcntlPDFScan
list.SetDesktopLocation(Windows.Forms.Cursor.Position.X, Windows.Forms.Cursor.Position.Y)
Else
'Process.Start(DS.DATA_LIST.LIST(0).coll_pfad)
DS.OPEN_SINGLE()
DS.OPEN_SINGLE(, True)
End If
End If
@@ -248,7 +248,7 @@ Public Class usrcntlPDFScan
For Each ii In DS.DATA_LIST.LIST
If ii.coll_id = coll_id Then
'Zwischenablage
Dim f() As String = {ii.coll_pfad}
Dim f() As String = {VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.copyToTmp_KeepFilename(ii.coll_pfad, ii.coll_bezeichnung)}
Dim d As New DataObject(DataFormats.FileDrop, f)
Clipboard.SetDataObject(d, True)
Exit Sub
@@ -266,7 +266,7 @@ Public Class usrcntlPDFScan
Dim outl As New Outlook.Application
Dim Mail As Microsoft.Office.Interop.Outlook.MailItem
Mail = outl.CreateItem(0)
Mail.Attachments.Add(ii.coll_pfad, Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue,, ii.coll_bezeichnung & ".pdf")
Mail.Attachments.Add(VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.copyToTmp_KeepFilename(ii.coll_pfad, ii.coll_bezeichnung), Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue,, ii.coll_bezeichnung & ".pdf")
Mail.Display()
Catch ex As Exception
MsgBox("Fehler beim Öffnen der Mail!")
@@ -382,7 +382,7 @@ Public Class usrcntlPDFScan
Private Sub KopierenZwischenablageToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles KopierenZwischenablageToolStripMenuItem.Click
Try
If DS.DATA_LIST.LIST.Count > 0 Then
Dim f() As String = {DS.DATA_LIST.LIST(0).coll_pfad}
Dim f() As String = {VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.copyToTmp_KeepFilename(DS.DATA_LIST.LIST(0).coll_pfad, DS.DATA_LIST.LIST(0).coll_bezeichnung)}
Dim d As New DataObject(DataFormats.FileDrop, f)
Clipboard.SetDataObject(d, True)
End If
@@ -397,7 +397,7 @@ Public Class usrcntlPDFScan
Dim outl As New Outlook.Application
Dim Mail As Microsoft.Office.Interop.Outlook.MailItem
Mail = outl.CreateItem(0)
Mail.Attachments.Add(DS.DATA_LIST.LIST(0).coll_pfad, Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue)
Mail.Attachments.Add(VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.copyToTmp_KeepFilename(DS.DATA_LIST.LIST(0).coll_pfad, DS.DATA_LIST.LIST(0).coll_bezeichnung), Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue)
Mail.Display()
End If
Catch ex As Exception

View File

@@ -191,7 +191,11 @@ Public Class usrcntlPDFScanList
Private Sub MyListBox1_DoubleClick(sender As Object, e As EventArgs) Handles MyListBox1.DoubleClick
Try
DS.OPEN(DirectCast(MyListBox1.SelectedItem, VERAG_PROG_ALLGEMEIN.MyListItem).Value)
DS.OPEN(DirectCast(MyListBox1.SelectedItem, VERAG_PROG_ALLGEMEIN.MyListItem).Value,, True)
' VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.copyToTmp_KeepFilename(ii.coll_pfad, ii.coll_bezeichnung)
Catch ex As Exception
MsgBox("Fehler beim Öffnen!")
End Try
@@ -245,6 +249,7 @@ Public Class usrcntlPDFScanList
Private Sub KopierenZwischenablageToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles KopierenZwischenablageToolStripMenuItem.Click
Try
VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.clearTMPPath("ClipBoard_TMP")
Dim f(MyListBox1.SelectedItems.Count - 1) As String
Dim cnt = 0
If MyListBox1.SelectedItems.Count >= 1 Then
@@ -254,7 +259,7 @@ Public Class usrcntlPDFScanList
If ii.coll_id = item.Value Then
'Dim f() As String = {ii.coll_pfad}
If ii.coll_pfad <> "" Then
f(cnt) = ii.coll_pfad
f(cnt) = VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.copyToTmp_KeepFilename(ii.coll_pfad, ii.coll_bezeichnung)
cnt += 1
'Exit For
End If
@@ -272,8 +277,10 @@ Public Class usrcntlPDFScanList
End Try
End Sub
Private Sub AlsEmailSendenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AlsEmailSendenToolStripMenuItem.Click
Try
VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.clearTMPPath("ClipBoard_TMP")
If MyListBox1.SelectedItems.Count >= 1 Then
Try
Dim outl As New Outlook.Application
@@ -285,7 +292,7 @@ Public Class usrcntlPDFScanList
For Each ii In DS.DATA_LIST.LIST
If ii.coll_id = item.Value Then
If ii.coll_pfad <> "" Then
Mail.Attachments.Add(ii.coll_pfad, Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue)
Mail.Attachments.Add(VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.copyToTmp_KeepFilename(ii.coll_pfad, ii.coll_bezeichnung), Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue)
End If
End If
Next
@@ -301,6 +308,8 @@ Public Class usrcntlPDFScanList
End Try
End Sub
Private Sub Form1_DragEnter(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles Me.DragEnter ', txt.DragEnter, Me.DragEnter, picPDF.DragEnter
e.Effect = DragDropEffects.All
End Sub

View File

@@ -251,6 +251,15 @@ Public Class SQL
End Function
Function IsNull(o) As Boolean
Try
If o Is Nothing Then Return True
If o Is DBNull.Value Then Return True
If o.ToString.Trim = "" Then Return True
Catch : End Try
Return False
End Function
Function isleernothingDateFormatstring(o) As Object
If o Is Nothing Then Return o
If o.ToString = "" Then Return Nothing
@@ -788,6 +797,30 @@ Public Class SQL
Return ""
End Function
Public Shared Function isDbnullEmpty(o As Object, return_value As Object) As String
If IsDBNull(o) Then : isDbnullEmpty = return_value
ElseIf IsNothing(o) Then : isDbnullEmpty = return_value
Else : isDbnullEmpty = o.ToString
End If
End Function
Public Shared Function isDbnullEmptyCurr(o As Object, return_value As Object) As String
If IsDBNull(o) Then : isDbnullEmptyCurr = return_value
ElseIf IsNothing(o) Then : isDbnullEmptyCurr = return_value
Else : isDbnullEmptyCurr = CDbl(o).ToString("C")
End If
End Function
Public Shared Function isDbnullEmptyDbl(o As Object, kommastellen As Integer, return_value As Object) As String
If IsDBNull(o) Then : isDbnullEmptyDbl = return_value
ElseIf IsNothing(o) Then : isDbnullEmptyDbl = return_value
Else : isDbnullEmptyDbl = CDbl(o).ToString("N" & If(kommastellen > 0, kommastellen, ""))
End If
End Function
Public Shared Function VarToBool(ByVal wert As Object) As Boolean
Try
If wert Is Nothing OrElse wert Is DBNull.Value Then

View File

@@ -43,7 +43,9 @@ Public Class cAdressen
Property UTAExportCSV As Object = Nothing
'Property SSMA_TimeStamp As Object = Nothing
Property MWSTVorauszahlung As Object = Nothing
Property PLOSEKundenNr As Object = Nothing
Public hasEntry = False
Shared SQL As New SQL
@@ -124,6 +126,7 @@ Public Class cAdressen
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UTAExportCSV", UTAExportCSV))
' list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("SSMA_TimeStamp", SSMA_TimeStamp))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("MWSTVorauszahlung", MWSTVorauszahlung))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("PLOSEKundenNr", PLOSEKundenNr))
Return list
End Function

View File

@@ -18,10 +18,10 @@ Public Class cAvisoAnhaenge
End Sub
Sub New(anh_id)
If anh_id IsNot Nothing Then
Me.anh_id = anh_id
' If anh_id IsNot Nothing Then
Me.anh_id = anh_id
LOAD()
End If
' End If
End Sub
Sub New(anh_AvisoId, anh_Name, anh_docId, anh_Art, anh_Typ, Optional anh_SendungsId = Nothing, Optional anh_Reihenfolge = 99)
@@ -32,6 +32,7 @@ Public Class cAvisoAnhaenge
Me.anh_Art = anh_Art
Me.anh_Typ = anh_Typ
Me.anh_Reihenfolge = anh_Reihenfolge
End Sub

View File

@@ -0,0 +1,175 @@
Imports System.Data.SqlClient
Imports System.Reflection
Public Class cDEBundeslaenderPLZ
Property PLZ As Integer
Property Bundesland As String = ""
Property Kreis As String = ""
Property Typ As String = ""
Property Code As String = ""
Dim SQL As New SQL
Sub New()
End Sub
Sub New(PLZ)
Me.PLZ = PLZ
LOADByPLZ(PLZ)
End Sub
Public Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("PLZ", PLZ)) ' INT NULL,
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Bundesland", Bundesland)) ' INT NULL,
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Kreis", Kreis)) ' INT NULL,
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Typ", Typ)) ' INT NULL,
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Code", Code)) ' VARCHAR(200) Not NULL,
Return list
End Function
Public Shared Function LOADByPLZ(PLZ As Integer) As cDEBundeslaenderPLZ
Try
Dim VK As New cDEBundeslaenderPLZ
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
Using cmd As New SqlCommand("SELECT * FROM tblDEBundeslaenderPLZ WHERE PLZ=@PLZ ", conn)
cmd.Parameters.AddWithValue("@PLZ", PLZ)
Dim dr = cmd.ExecuteReader()
If dr.Read Then
For Each l In VK.getParameterList()
Dim propInfo As PropertyInfo = VK.GetType.GetProperty(l.Scalarvariable)
If dr.Item(l.Text) Is DBNull.Value Then
propInfo.SetValue(VK, Nothing)
Else
propInfo.SetValue(VK, dr.Item(l.Text))
End If
Next
dr.Close()
Return VK
End If
dr.Close()
End Using
End Using
Catch ex As Exception
MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
End Try
Return Nothing
End Function
Public Shared Function LOADBundeslandCode_ByPLZ(PLZ As Integer) As String
Try
Dim VK As New cDEBundeslaenderPLZ
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
Using cmd As New SqlCommand("SELECT Code FROM tblDEBundeslaenderPLZ WHERE PLZ=@PLZ ", conn)
cmd.Parameters.AddWithValue("@PLZ", PLZ)
Dim dr = cmd.ExecuteReader()
If dr.Read Then
Return dr.Item("Code")
End If
dr.Close()
End Using
End Using
Catch ex As Exception
MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
End Try
Return ""
End Function
'Public Function SAVE() As Boolean
' Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
' Dim sqlstr = " BEGIN TRAN IF EXISTS(SELECT * FROM tblDEBundeslaenderPLZ WITH(updlock,serializable) WHERE post_id=@post_id) " &
' " BEGIN " & getUpdateCmd() & " END " &
' " Else " &
' " BEGIN " & getInsertCmd() & " END " &
' " commit tran "
' post_id = SQL.doSQLVarListID(post_id, sqlstr, "FMZOLL", , list)
' Return post_id > 0
'End Function
'Public Sub LOAD()
' Try
' Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
' Using cmd As New SqlCommand("SELECT * FROM tblDEBundeslaenderPLZ WHERE post_id=@post_id ", conn)
' cmd.Parameters.AddWithValue("@post_id", post_id)
' Dim dr = cmd.ExecuteReader()
' If dr.Read Then
' For Each l In getParameterList()
' Dim propInfo As PropertyInfo = Me.GetType.GetProperty(l.Scalarvariable)
' If dr.Item(l.Text) Is DBNull.Value Then
' propInfo.SetValue(Me, Nothing)
' Else
' propInfo.SetValue(Me, dr.Item(l.Text))
' End If
' Next
' End If
' dr.Close()
' End Using
' End Using
' Catch ex As Exception
' MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
' End Try
'End Sub
'Public Function getUpdateCmd() As String
' Try
' Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
' Dim str As String = ""
' For Each i In list
' If Not i.isPrimaryParam Then
' str &= "[" & i.Text & "] = @" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
' End If
' Next
' str = str.Substring(0, str.Length - 1) 'wg. ','
' Return (" UPDATE [tblDEBundeslaenderPLZ] SET " & str & " WHERE post_id=@post_id ")
' Catch ex As Exception
' MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
' End Try
' Return ""
'End Function
'Public Function getInsertCmd() As String
' Try
' Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
' Dim str As String = ""
' Dim values As String = ""
' For Each i In list
' If Not i.isPrimaryParam Then
' str &= "[" & i.Text & "],"
' values &= "@" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
' End If
' Next
' str = str.Substring(0, str.Length - 1) 'wg. ','
' values = values.Substring(0, values.Length - 1) 'wg. ','
' Return (" INSERT INTO tblDEBundeslaenderPLZ (" & str & ") VALUES(" & values & ") ")
' Catch ex As Exception
' MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
' End Try
' Return ""
'End Function
'Public Function DELETE() As Boolean 'obj As Object, tablename As String, where As String) As Boolean
' Dim sqlstr = " DELETE FROM [tblDEBundeslaenderPLZ] WITH(updlock,serializable) WHERE post_id=" & Me.post_id
' Return SQL.doSQL(sqlstr, "FMZOLL")
'End Function
End Class

View File

@@ -44,7 +44,11 @@ Public Class cKundenErweitert
Property EmailFreigabe_Export As Boolean = False
Property kde_BonitaetsStufe As Object = Nothing
Property kde_Inkasso_Uebergeben As Boolean = False
Property kde_Inkasso_UebergebenAm As Object = Nothing
Property kde_Inkasso_GemeldeterBetrag As Object = Nothing
Property AutoFakturierung As Boolean = False
Property Anmerkungen_Warnhinweis As Object = Nothing
Dim SQL As New SQL
@@ -90,6 +94,11 @@ Public Class cKundenErweitert
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("EmailAnkunft_Export", EmailAnkunft_Export))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("EmailFreigabe_Export", EmailFreigabe_Export))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("kde_BonitaetsStufe", kde_BonitaetsStufe))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("kde_Inkasso_Uebergeben", kde_Inkasso_Uebergeben))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("kde_Inkasso_UebergebenAm", kde_Inkasso_UebergebenAm))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("kde_Inkasso_GemeldeterBetrag", kde_Inkasso_GemeldeterBetrag))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("AutoFakturierung", AutoFakturierung))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Anmerkungen_Warnhinweis", Anmerkungen_Warnhinweis))
Return list
End Function

View File

@@ -205,6 +205,11 @@ Public Class cKundenKontakte
Return SQL.doSQL(sqlstr, "FMZOLL")
End Function
Public Shared Function DELETE_ALL_KONTAKTE(kkd_KundenNr, Optional kkd_kkaId = -1) As Boolean 'obj As Object, tablename As String, where As String) As Boolean
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
Dim sqlstr = " DELETE FROM [tblKundenKontakt] WITH(updlock,serializable) WHERE kkd_KundenNr=" & kkd_KundenNr & If(kkd_kkaId > 0, " AND kkd_kkaId='" & kkd_kkaId & "'", "")
Return SQL.doSQL(sqlstr, "FMZOLL")
End Function
Public Function getInsertCmd() As String
Try

View File

@@ -36,7 +36,7 @@ Public Class cParameterList
Try
LIST.Clear()
Using conn As SqlConnection = SQL.GetNewOpenConnectionADMIN
Using cmd As New SqlCommand("SELECT * FROM [tblParameter] WHERE progId=@ProgId " & If(firma IsNot Nothing, " AND firma=@firma", ""), conn)
Using cmd As New SqlCommand("SELECT * FROM [tblParameter] WHERE progId IN (0,@ProgId) " & If(firma IsNot Nothing, " AND firma=@firma", ""), conn)
cmd.Parameters.AddWithValue("@ProgId", ProgId)
cmd.Parameters.AddWithValue("@firma", firma)
' cmd.Parameters.AddWithValue("@OffertenNr", OffertenNr)

View File

@@ -0,0 +1,203 @@
Imports System.Data.SqlClient
Imports System.Reflection
Public Class cPostversand
Property post_id As Integer = -1
Property post_AvisoId As Object = Nothing ' INT NULL,
Property post_SendungsId As Object = Nothing ' INT NULL,
Property post_FilialenNr As Object = Nothing ' INT NULL,
Property post_AbfertigungsNr As Object = Nothing ' INT NULL,
Property post_art As Object = Nothing ' VARCHAR(200) Not NULL,
Property post_Empfaenger_Name1 As Object = Nothing ' VARCHAR(40) Not NULL,
Property post_Empfaenger_Name2 As Object = Nothing ' VARCHAR(40) NULL,
Property post_Empfaenger_Adresse1 As Object = Nothing ' VARCHAR(40) Not NULL,
Property post_Empfaenger_Adresse2 As Object = Nothing ' VARCHAR(60) Not NULL,
Property post_Empfaenger_Adresse3 As Object = Nothing ' VARCHAR(40) NULL,
Property post_ReferenzPaketdienst As Object = Nothing ' VARCHAR(200) NULL,
Property post_ContainerLKWNr As Object = Nothing ' VARCHAR(200) Not NULL,
Property post_Datum As Object = Nothing ' DATETIME Default (getdate()) Not NULL,
Property post_Sachbearbeiter As Object = Nothing ' VARCHAR(200) Not NULL,
Property post_SachbearbeiterId As Object = Nothing ' INT Not NULL,
Property post_FirmaInAuftragKdnr As Object = Nothing ' INT NULL,
Property post_FirmaInAuftrag As Object = Nothing ' VARCHAR(200) NULL,
Property post_Rolle As Object = Nothing ' VARCHAR(200) NULL,
'Property post_LKW As Object = Nothing ' VARCHAR(200) NULL,
Property post_Empfaenger_KdNr As Object = Nothing ' VARCHAR(200) NULL,
' Property post_Rolle As Object = Nothing ' VARCHAR(200) NULL,
Property post_KdAuftrNrAvisierer As Object = Nothing
Property post_RgEmpfaenger_KdNr As Object = Nothing
Property post_RgEmpfaenger_Name As Object = Nothing
Dim SQL As New SQL
Sub New()
End Sub
Sub New(post_id)
Me.post_id = post_id
LOAD()
End Sub
Public Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("post_id", post_id, , True, True))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("post_AvisoId", post_AvisoId)) ' INT NULL,
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("post_SendungsId", post_SendungsId)) ' INT NULL,
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("post_FilialenNr", post_FilialenNr)) ' INT NULL,
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("post_AbfertigungsNr", post_AbfertigungsNr)) ' INT NULL,
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("post_art", post_art)) ' VARCHAR(200) Not NULL,
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("post_Empfaenger_Name1", post_Empfaenger_Name1)) ' VARCHAR(40) Not NULL,
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("post_Empfaenger_Name2", post_Empfaenger_Name2)) ' VARCHAR(40) NULL,
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("post_Empfaenger_Adresse1", post_Empfaenger_Adresse1)) 'VARCHAR(40) Not NULL,
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("post_Empfaenger_Adresse2", post_Empfaenger_Adresse2)) 'VARCHAR(60) Not NULL,
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("post_Empfaenger_Adresse3", post_Empfaenger_Adresse3)) ' VARCHAR(40) NULL,
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("post_ReferenzPaketdienst", post_ReferenzPaketdienst)) ' VARCHAR(200) NULL,
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("post_ContainerLKWNr", post_ContainerLKWNr)) '# VARCHAR(200) Not NULL,
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("post_Datum", post_Datum)) ' DATETIME Default (getdate()) Not NULL,
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("post_Sachbearbeiter", post_Sachbearbeiter)) ' VARCHAR(200) Not NULL,
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("post_SachbearbeiterId", post_SachbearbeiterId)) ' INT Not NULL,
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("post_FirmaInAuftragKdnr", post_FirmaInAuftragKdnr)) ' INT NULL,
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("post_FirmaInAuftrag", post_FirmaInAuftrag)) ' VARCHAR(200) NULL,
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("post_Rolle", post_Rolle)) ' VARCHAR(200) NULL,
' list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("post_LKW", post_LKW)) ' VARCHAR(200) NULL,
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("post_Empfaenger_KdNr", post_Empfaenger_KdNr)) ' VARCHAR(200) NULL,
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("post_KdAuftrNrAvisierer", post_KdAuftrNrAvisierer))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("post_RgEmpfaenger_KdNr", post_RgEmpfaenger_KdNr))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("post_RgEmpfaenger_Name", post_RgEmpfaenger_Name))
Return list
End Function
Public Shared Function LOADByFilialeAbfNr(FilialeNr As Integer, AbfertigungsNr As Integer, Optional post_Rolle As String = "") As cPostversand
Try
Dim VK As New cPostversand
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
Using cmd As New SqlCommand("SELECT * FROM tblPostversand WHERE post_AbfertigungsNr=@post_AbfertigungsNr AND post_FilialenNr=@post_FilialenNr " & If(If(post_Rolle, "") <> "", "AND post_Rolle=@post_Rolle ", ""), conn)
cmd.Parameters.AddWithValue("@post_FilialenNr", FilialeNr)
cmd.Parameters.AddWithValue("@post_AbfertigungsNr", AbfertigungsNr)
cmd.Parameters.AddWithValue("@post_Rolle", post_Rolle)
Dim dr = cmd.ExecuteReader()
If dr.Read Then
For Each l In VK.getParameterList()
Dim propInfo As PropertyInfo = VK.GetType.GetProperty(l.Scalarvariable)
If dr.Item(l.Text) Is DBNull.Value Then
propInfo.SetValue(VK, Nothing)
Else
propInfo.SetValue(VK, dr.Item(l.Text))
End If
Next
dr.Close()
Return VK
End If
dr.Close()
End Using
End Using
Catch ex As Exception
MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
End Try
Return Nothing
End Function
Public Function SAVE() As Boolean
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
Dim sqlstr = " BEGIN TRAN IF EXISTS(SELECT * FROM tblPostversand WITH(updlock,serializable) WHERE post_id=@post_id) " &
" BEGIN " & getUpdateCmd() & " END " &
" Else " &
" BEGIN " & getInsertCmd() & " END " &
" commit tran "
post_id = SQL.doSQLVarListID(post_id, sqlstr, "FMZOLL", , list)
Return post_id > 0
End Function
Public Sub LOAD()
Try
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
Using cmd As New SqlCommand("SELECT * FROM tblPostversand WHERE post_id=@post_id ", conn)
cmd.Parameters.AddWithValue("@post_id", post_id)
Dim dr = cmd.ExecuteReader()
If dr.Read Then
For Each l In getParameterList()
Dim propInfo As PropertyInfo = Me.GetType.GetProperty(l.Scalarvariable)
If dr.Item(l.Text) Is DBNull.Value Then
propInfo.SetValue(Me, Nothing)
Else
propInfo.SetValue(Me, dr.Item(l.Text))
End If
Next
End If
dr.Close()
End Using
End Using
Catch ex As Exception
MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
End Try
End Sub
Public Function getUpdateCmd() As String
Try
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
Dim str As String = ""
For Each i In list
If Not i.isPrimaryParam Then
str &= "[" & i.Text & "] = @" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
End If
Next
str = str.Substring(0, str.Length - 1) 'wg. ','
Return (" UPDATE [tblPostversand] SET " & str & " WHERE post_id=@post_id ")
Catch ex As Exception
MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
End Try
Return ""
End Function
Public Function getInsertCmd() As String
Try
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
Dim str As String = ""
Dim values As String = ""
For Each i In list
If Not i.isPrimaryParam Then
str &= "[" & i.Text & "],"
values &= "@" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
End If
Next
str = str.Substring(0, str.Length - 1) 'wg. ','
values = values.Substring(0, values.Length - 1) 'wg. ','
Return (" INSERT INTO tblPostversand (" & str & ") VALUES(" & values & ") ")
Catch ex As Exception
MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
End Try
Return ""
End Function
Public Function DELETE() As Boolean 'obj As Object, tablename As String, where As String) As Boolean
Dim sqlstr = " DELETE FROM [tblPostversand] WITH(updlock,serializable) WHERE post_id=" & Me.post_id
Return SQL.doSQL(sqlstr, "FMZOLL")
End Function
End Class

View File

@@ -0,0 +1,251 @@

Imports System.Data.SqlClient
Imports System.Reflection
Public Class cProgrammeUpdate
Property pud_progId As Object = Nothing
Property pud_codename As String
Property pud_version As String
Property pud_fileName As String
Property pud_filePathFolder As Object = Nothing
Property pud_datum As Date = Now
Property pud_file_Verion As String
Property pud_file_Date As Date
Property pud_file_Size As Integer
Dim SQL As New SQL
Shared Function getParameterList(UD As cProgrammeUpdate) As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("pud_progId", UD.pud_progId))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("pud_codename", UD.pud_codename))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("pud_version", UD.pud_version))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("pud_fileName", UD.pud_fileName))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("pud_filePathFolder", UD.pud_filePathFolder))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("pud_datum", UD.pud_datum))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("pud_file_Verion", UD.pud_file_Verion))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("pud_file_Date", UD.pud_file_Date))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("pud_file_Size", UD.pud_file_Size))
Return list
End Function
Public Function SAVE() As Boolean
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList(Me)
Return SQL.doSQLVarList(getInsertCmd, "ADMIN", , list)
End Function
Public Shared Function LOAD_AKT_LIST(pud_progId) As List(Of cProgrammeUpdate)
Dim LIST As New List(Of cProgrammeUpdate)
Try
Using conn As SqlConnection = SQL.GetNewOpenConnectionADMIN()
Using cmd As New SqlCommand("SELECT * FROM tblProgrammeUpdate WHERE pud_progId=@pud_progId AND pud_version=(SELECT TOP (1) pud_version FROM tblProgrammeUpdate WHERE pud_progId=@pud_progId order by pud_version DESC) ", conn)
cmd.Parameters.AddWithValue("@pud_progId", pud_progId)
Dim dr = cmd.ExecuteReader()
While dr.Read
Dim UD As New cProgrammeUpdate
For Each l In cProgrammeUpdate.getParameterList(UD)
Dim propInfo As PropertyInfo = UD.GetType.GetProperty(l.Scalarvariable)
If dr.Item(l.Text) Is DBNull.Value Then
propInfo.SetValue(UD, Nothing)
Else
propInfo.SetValue(UD, dr.Item(l.Text))
End If
Next
LIST.Add(UD)
End While
dr.Close()
End Using
End Using
Catch ex As Exception
MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
End Try
Return LIST
End Function
Public Shared Function SAVE_LIST(pud_progId As Integer, pud_version As String, pud_codename As String, LIST As List(Of cProgrammeUpdate)) As Boolean
Dim SQL As New SQL
SQL.doSQL("DELETE FROM tblProgrammeUpdate WHERE pud_version='" & pud_version & "'", "ADMIN")
SAVE_LIST = True
For Each UD In LIST
UD.pud_progId = pud_progId
UD.pud_version = pud_version
UD.pud_codename = pud_codename
If Not UD.SAVE() Then SAVE_LIST = False
Next
End Function
Public Function getUpdateCmd() As String
Try
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList(Me)
Dim str As String = ""
For Each i In list
If Not i.isPrimaryParam Then
str &= "[" & i.Text & "] = @" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
End If
Next
str = str.Substring(0, str.Length - 1) 'wg. ','
Return (" UPDATE [tblProgrammeUpdate] SET " & str & " WHERE gb_nr=@gb_nr ")
Catch ex As Exception
MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
End Try
Return ""
End Function
Public Function getInsertCmd() As String
Try
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList(Me)
Dim str As String = ""
Dim values As String = ""
For Each i In list
If Not i.isPrimaryParam Then
str &= "[" & i.Text & "],"
values &= "@" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
End If
Next
str = str.Substring(0, str.Length - 1) 'wg. ','
values = values.Substring(0, values.Length - 1) 'wg. ','
Return (" INSERT INTO tblProgrammeUpdate (" & str & ") VALUES(" & values & ") ")
Catch ex As Exception
MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
End Try
Return ""
End Function
Public Shared Function isNewFile(ByRef file As VERAG_PROG_ALLGEMEIN.cProgrammeUpdate, LIST_DEST As List(Of VERAG_PROG_ALLGEMEIN.cProgrammeUpdate)) As Boolean
For Each l In LIST_DEST
If l.pud_filePathFolder = file.pud_filePathFolder And l.pud_fileName = file.pud_fileName And l.pud_file_Size = file.pud_file_Size And l.pud_file_Date = file.pud_file_Date Then
Return False
End If
Next
Return True
End Function
Public Shared Function isOldFile(ByRef file As VERAG_PROG_ALLGEMEIN.cProgrammeUpdate, LIST_SOURCE As List(Of VERAG_PROG_ALLGEMEIN.cProgrammeUpdate)) As Boolean
For Each l In LIST_SOURCE
If l.pud_filePathFolder = file.pud_filePathFolder And l.pud_fileName = file.pud_fileName And l.pud_file_Size = file.pud_file_Size And l.pud_file_Date = file.pud_file_Date Then
Return False
End If
Next
Return True
End Function
Public Shared Function copyProgramLIST(ByRef sourcePfad As String, ByVal destPfad As String, ignoreFilesBeginWith As String()) As Boolean
Try
If destPfad.Trim = "" Then Return False
If sourcePfad.Trim = "" Then Return False
If Not My.Computer.FileSystem.DirectoryExists(sourcePfad) Then
MsgBox("ERROR_COPY_01: Quell-Ordner existiert nicht.", MsgBoxStyle.Critical, "ERROR") : Return False
End If
If Not My.Computer.FileSystem.DirectoryExists(destPfad) Then
MsgBox("ERROR_COPY_02: Ziel-Ordner existiert nicht.", MsgBoxStyle.Critical, "ERROR") : Return False
End If
Dim LIST_SOURCE As New List(Of VERAG_PROG_ALLGEMEIN.cProgrammeUpdate)
Dim dirNameReplace_SOURCE = ""
Dim DI_SOURCE As New IO.DirectoryInfo(sourcePfad)
RekursivGetFiles(DI_SOURCE, dirNameReplace_SOURCE, LIST_SOURCE, {})
Dim LIST_DEST As New List(Of VERAG_PROG_ALLGEMEIN.cProgrammeUpdate)
Dim dirNameReplace_DEST = ""
Dim DI_DEST As New IO.DirectoryInfo(destPfad)
RekursivGetFiles(DI_DEST, dirNameReplace_DEST, LIST_DEST, ignoreFilesBeginWith)
If LIST_SOURCE.Count = 0 Then
MsgBox("ERROR_COPY_01: Quell-Daten existiert nicht.", MsgBoxStyle.Critical, "ERROR") : Return False
End If
If LIST_DEST.Count = 0 Then
MsgBox("ERROR_COPY_02: Ziel-Daten existiert nicht.", MsgBoxStyle.Critical, "ERROR") : Return False
End If
'ORDNER erstellen:
For Each f In LIST_SOURCE
If If(f.pud_filePathFolder, "") <> "" Then
If Not IO.Directory.Exists(dirNameReplace_DEST & "\" & f.pud_filePathFolder.Replace("\\", "\")) Then
IO.Directory.CreateDirectory(dirNameReplace_DEST & "\" & f.pud_filePathFolder.Replace("\\", "\"))
End If
End If
Next
'Löschen der unbenötigten Files:
For Each f In LIST_DEST
If isOldFile(f, LIST_SOURCE) Then
IO.File.Delete(dirNameReplace_DEST & "\" & If(f.pud_filePathFolder, "") & "\" & f.pud_fileName.Replace("\\", "\"))
End If
Next
'Kopieren/Überschreiben der neuen Files:
For Each f In LIST_SOURCE
If isNewFile(f, LIST_DEST) Then
Dim s_path = dirNameReplace_SOURCE & "\" & If(f.pud_filePathFolder, "") & "\" & f.pud_fileName.Replace("\\", "\")
Dim d_path = dirNameReplace_DEST & "\" & If(f.pud_filePathFolder, "") & "\" & f.pud_fileName.Replace("\\", "\")
IO.File.Copy(s_path, d_path)
End If
Next
Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace)
Return False
End Try
' If isNewFile(destPfad) Then Return FileCopier(sourcePfad, destPfad)
Return True
End Function
Public Shared Function fileStartsWith(fileName As String, ignoreFilesBeginWith As String())
For Each s In ignoreFilesBeginWith
If fileName.StartsWith(s) Then Return True
Next
Return False
End Function
Public Shared Sub RekursivGetFiles(ByVal oDir As IO.DirectoryInfo, ByRef dirNameReplace As String, ByRef LIST As List(Of VERAG_PROG_ALLGEMEIN.cProgrammeUpdate), ignoreFilesBeginWith As String())
Dim oSubDir As IO.DirectoryInfo
Dim FI As IO.FileInfo
' zunächst alle Dateien des Ordners aufspüren
For Each FI In oDir.GetFiles()
If Not fileStartsWith(FI.Name, ignoreFilesBeginWith) Then 'DATEIEN beginnen mit betimmten Namen, z.B. UPDATER
' Dim FI As New IO.FileInfo(oFile)
If dirNameReplace = "" Then
dirNameReplace = FI.DirectoryName
End If
Dim UD As New VERAG_PROG_ALLGEMEIN.cProgrammeUpdate
UD.pud_fileName = FI.Name
UD.pud_filePathFolder = FI.DirectoryName.Replace(dirNameReplace, "")
If UD.pud_filePathFolder = "" Then UD.pud_filePathFolder = Nothing
UD.pud_file_Size = FI.Length
UD.pud_file_Date = FI.LastWriteTime
UD.pud_file_Verion = "" 'FI.
LIST.Add(UD)
End If
'With oFile
' ListBox1.Items.Add(.DirectoryName & "\" & .Name & vbTab &
' .Length & vbTab & .LastWriteTime)
'End With
Next
' Jetzt alle Unterverzeichnis durchlaufen
' und die Prozedur rekursiv selbst aufrufen
For Each oSubDir In oDir.GetDirectories()
RekursivGetFiles(oSubDir, dirNameReplace, LIST, {})
Next
End Sub
End Class

View File

@@ -37,6 +37,10 @@ Public Class cRechnungsnummern
Case 20
VonRechnungsNr = Now.ToString("yy") & "400001"
BisRechnungsNr = Now.ToString("yy") & "499999"
Case 23 'FrontOffice
VonRechnungsNr = Now.ToString("yy") & "500001"
BisRechnungsNr = Now.ToString("yy") & "599999"
End Select
LfdRechnungsNr = VonRechnungsNr
'-------------------------------------

View File

@@ -62,7 +62,8 @@ Public Class cSendungen
Property tblSnd_AnmerkungDispoliste As Object = Nothing
Property tblSnd_ATANr As Object = ""
Property tblSnd_ATCMRN_Fremd As Object = ""
Property tblSnd_Warenwert As Object = Nothing
Property tblSnd_WarenwertWaehrung As Object = Nothing
Property ABRECHNUNG As New List(Of cSendungAbrechnung)
@@ -221,6 +222,8 @@ Public Class cSendungen
Me.tblSnd_AnmerkungDispoliste = SQL.checkNullReturnValue(dr.Item("tblSnd_AnmerkungDispoliste"), Nothing)
Me.tblSnd_ATANr = SQL.checkNullReturnValue(dr.Item("tblSnd_ATANr"), Nothing)
Me.tblSnd_ATCMRN_Fremd = SQL.checkNullReturnValue(dr.Item("tblSnd_ATCMRN_Fremd"), Nothing)
Me.tblSnd_Warenwert = SQL.checkNullReturnValue(dr.Item("tblSnd_Warenwert"), Nothing)
Me.tblSnd_WarenwertWaehrung = SQL.checkNullReturnValue(dr.Item("tblSnd_WarenwertWaehrung"), Nothing)
End If
@@ -332,6 +335,8 @@ Public Class cSendungen
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_AnmerkungDispoliste", tblSnd_AnmerkungDispoliste))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_ATANr", tblSnd_ATANr))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_ATCMRN_Fremd", tblSnd_ATCMRN_Fremd))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_Warenwert", tblSnd_Warenwert))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_WarenwertWaehrung", tblSnd_WarenwertWaehrung))
Return list

View File

@@ -555,7 +555,7 @@ Class TrdInvoice_FUNCTIONS
Catch ex As Exception
End Try
getSachkonto = CInt(getSachkonto)
End Function
Shared Function getSQLString_SELECTForTrdInvoice(Optional Firma As Integer = -1)

View File

@@ -189,19 +189,29 @@ Public Class cDATENSERVER
End Try
End Function
Public Function replaceInvalidCahr(ByRef s)
s = s.replace("İ", "I")
s = s.replace("ı", "i")
Dim tempBytes = System.Text.Encoding.GetEncoding("ISO-8859-8").GetBytes(s)
s = System.Text.Encoding.UTF8.GetString(tempBytes)
Return s
End Function
Public Function uploadDataToDATENSERVER(srcPath, Optional bezeichnung = "", Optional endung = "", Optional allowMsg = True, Optional coll_archiv = False) As Boolean
'LAST_ID = -1
If endung = "" Then Dim fi As New IO.DirectoryInfo(srcPath) : endung = fi.Extension
' If bezeichnung = "" Then bezeichnung = System.IO.Path.GetFileName(srcPath) : endung = ""
If bezeichnung = "" Then bezeichnung = da_name
replaceInvalidCahr(bezeichnung)
Dim destpath = DATENVERVER_OPTIONS.getDescPath(rootDir, da_kategorie, da_ordner, da_uOrdner1, da_uOrdner2, da_uOrdner3, da_KundenNr, da_name, endung)
Dim destpath = DATENVERVER_OPTIONS.getDescPath(rootDir, da_kategorie, da_ordner, da_uOrdner1, da_uOrdner2, da_uOrdner3, da_KundenNr, replaceInvalidCahr(da_name), endung)
genHEADER_DATA()
If Not da_multifiles Then
If DATA_LIST.LIST.Count > 0 Then
If allowMsg AndAlso DATA_LIST.LIST.Count > 0 Then
If Not vbYes = MsgBox("Die Datei existiert bereits. Soll die Datei ersetzt werden?", vbYesNoCancel) Then
Return False 'NICHT Passiert
End If
@@ -220,7 +230,7 @@ Public Class cDATENSERVER
If endung = "" Then Dim fi As New IO.DirectoryInfo(srcPath) : endung = fi.Extension
' If bezeichnung = "" Then bezeichnung = System.IO.Path.GetFileName(srcPath) : endung = ""
If bezeichnung = "" Then bezeichnung = da_name
replaceInvalidCahr(bezeichnung)
genHEADER_DATA()
@@ -276,6 +286,7 @@ Public Class cDATENSERVER
If bezeichnung = "" Then
bezeichnung = System.IO.Path.GetFileName(fd.FileName).ToString
End If
replaceInvalidCahr(bezeichnung)
If da_name = "" Then Me.da_name = bezeichnung : LOAD() 'Wenn sich der Name ändert, muss eine neuer Header erstellt werden...
Return uploadDataToDATENSERVER(fd.FileName, bezeichnung, endung, allowMsg, coll_archiv)
End If
@@ -371,9 +382,9 @@ Public Class cDATENSERVER
End Function
Public Function OPEN_SINGLE(Optional openFile As Boolean = True) As String
Public Function OPEN_SINGLE(Optional openFile As Boolean = True, Optional useBezeichnung As Boolean = False) As String
If DATA_LIST.LIST.Count > 0 Then
Return DATA_LIST.LIST(0).OPEN(openFile)
Return DATA_LIST.LIST(0).OPEN(openFile, useBezeichnung)
End If
Return ""
End Function
@@ -384,10 +395,10 @@ Public Class cDATENSERVER
Return ""
End Function
Public Function OPEN(coll_id As Integer, Optional openFile As Boolean = True) As String
Public Function OPEN(coll_id As Integer, Optional openFile As Boolean = True, Optional useBezeichnung As Boolean = False) As String
For Each l In DATA_LIST.LIST
If l.coll_id = coll_id Then
Return l.OPEN(openFile)
Return l.OPEN(openFile, useBezeichnung)
End If
Next
Return ""
@@ -1023,13 +1034,94 @@ Public Class cFormularManager
End Try
End Function
'??????????????????????????????????????????'??????????????????????????????????????????'??????????????????????????????????????????'??????????????????????????????????????????'??????????????????????????????????????????
'Dim pdftmp As New Spire.PdfViewer.Forms.PdfViewer
' pdftmp.LoadFromFile("C:\Users\DEVELOPER1\Desktop\Agrotel.pdf")
' pdftmp.Print()
' Dim docs As PdfDocument() = {New PdfDocument("C:\Users\DEVELOPER1\Desktop\Agrotel.pdf")}
' For Each doc As PdfDocument In docs
' doc.PageSettings.Size = PdfPageSize.A4
' doc.PrintDocument.DefaultPageSettings.Landscape = True
' doc.PageScaling = PdfPrintPageScaling.FitSize
' doc.PrinterName = "ES3452 MFP(PCL)"
' doc.PrintDocument.Print()
' Next
Public Shared Sub PrintViaSpirePDF(PDFFile As List(Of String), Optional printerName As String = "")
PrintViaSpirePDF(PDFFile.ToArray, printerName)
End Sub
Public Shared Sub PrintViaSpirePDF(PDFFile As String(), Optional printerName As String = "")
Try
If printerName = "" Then
Dim oPS As New System.Drawing.Printing.PrinterSettings
printerName = oPS.PrinterName
End If
'Dim docs As Spire.Pdf.PdfDocument() = {New Spire.Pdf.PdfDocument("C:\Users\DEVELOPER1\Desktop\Agrotel.pdf")}
'For Each doc As Spire.Pdf.PdfDocument In docs
For Each pdfPath In PDFFile
Dim doc As New Spire.Pdf.PdfDocument(pdfPath)
doc.PageSettings.Size = Spire.Pdf.PdfPageSize.A4
doc.PrintDocument.DefaultPageSettings.Landscape = True
doc.PageScaling = Spire.Pdf.PdfPrintPageScaling.FitSize
doc.PrinterName = printerName
doc.PrintDocument.Print()
Next
Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace)
End Try
End Sub
Public Shared Sub PrintViaSpirePDF_FromURL(URLs As String(), Optional printerName As String = "")
Try
If printerName = "" Then
Dim oPS As New System.Drawing.Printing.PrinterSettings
printerName = oPS.PrinterName
End If
'Dim docs As Spire.Pdf.PdfDocument() = {New Spire.Pdf.PdfDocument("C:\Users\DEVELOPER1\Desktop\Agrotel.pdf")}
'For Each doc As Spire.Pdf.PdfDocument In docs
For Each pdfPath In URLs
'Dim doc As New Spire.Pdf.PdfDocument()
Using webClient As New Net.WebClient()
Dim data() As Byte = webClient.DownloadData(pdfPath)
Using stream As New MemoryStream(data)
Dim doc As Spire.Pdf.PdfDocument = New Spire.Pdf.PdfDocument(stream)
If doc IsNot Nothing Then
doc.PageSettings.Size = Spire.Pdf.PdfPageSize.A4
doc.PrintDocument.DefaultPageSettings.Landscape = True
doc.PageScaling = Spire.Pdf.PdfPrintPageScaling.FitSize
doc.PrinterName = printerName
doc.PrintDocument.Print()
End If
End Using
End Using
' doc.LoadFromHTML(pdfPath, True, True, True)
Next
Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace)
End Try
End Sub
Public Shared Sub PrintViaGS(PDFFile As String, printerName As String)
Try
Dim assembly = System.Reflection.Assembly.GetExecutingAssembly()
Dim location As String = assembly.CodeBase
Dim fullPath As String = New Uri(location).LocalPath
Dim directoryPath As String = Path.GetDirectoryName(fullPath)
Dim MyP As New System.Diagnostics.Process
MyP.StartInfo.FileName = Application.StartupPath & "\Resources\GS\gswin32c.exe"
MyP.StartInfo.FileName = directoryPath & "\Resources\GS\gswin32c.exe"
Dim sw As New List(Of String)()
'MyP.StartInfo.Arguments = "-dPrinted -dBATCH -dNOPAUSE -dNOSAFER -dPDFFitPage -dNumCopies=1 -dNoCancel -sDEVICE=mswinpr2 " & (Convert.ToString("-sOutputFile=%printer%") & printerName) & " -f" & PDFFile
@@ -1069,7 +1161,7 @@ Public Class cFormularManager
'End Using
Catch ex As Exception
MsgBox(ex.Message)
MsgBox(ex.Message & ex.StackTrace)
End Try
End Sub
@@ -1244,12 +1336,16 @@ Public Class cDatenarchiv_Collection
End Try
End Function
Public Function OPEN(Optional openFILE As Boolean = True) As String
Public Function OPEN(Optional openFILE As Boolean = True, Optional useBezeichnung As Boolean = False) As String
If Not IO.File.Exists(coll_pfad) Then MsgBox("Die Datei existiert nicht") : Return ""
Dim fi As New IO.DirectoryInfo(coll_pfad)
Dim destPath = DATENVERVER_OPTIONS.getTMPPath(fi.Name, fi.Extension, , False)
Dim destPath = ""
If useBezeichnung Then
destPath = DATENVERVER_OPTIONS.copyToTmp_KeepFilename(coll_pfad, coll_bezeichnung)
Else
destPath = DATENVERVER_OPTIONS.getTMPPath(fi.Name, fi.Extension, , False)
End If
' MsgBox(destPath)
IO.File.Copy(coll_pfad, destPath, True)
If openFILE Then Process.Start(destPath)
@@ -1443,6 +1539,33 @@ Public Class DATENVERVER_OPTIONS
Return destPath
End Function
Shared Function copyToTmp_KeepFilenameByDS(dId As Integer, bezeichnung As String) As String
Dim DS As New cDATENSERVER(dId)
Dim pfad As String = DS.GET_TOP1_PATH
If pfad = "" Then Return ""
Dim fi As New IO.FileInfo(pfad)
Dim tmpPath = VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.getTMPPath(bezeichnung, fi.Extension,, False, "ClipBoard_TMP\ClipBoard_" & Now.ToString("ddMMyyyyHHmmss_sss") & "\")
Try
IO.File.Copy(pfad, tmpPath)
Return tmpPath
Catch ex As Exception
MsgBox(ex.Message)
End Try
Return pfad
End Function
Shared Function copyToTmp_KeepFilename(pfad As String, bezeichnung As String) As String
Dim fi As New IO.FileInfo(pfad)
Dim tmpPath = VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.getTMPPath(bezeichnung, fi.Extension,, False, "ClipBoard_TMP\ClipBoard_" & Now.ToString("ddMMyyyyHHmmss_sss") & "\")
Try
IO.File.Copy(pfad, tmpPath)
Return tmpPath
Catch ex As Exception
MsgBox(ex.Message)
End Try
Return pfad
End Function
Shared Function getTMPAbsolutePath(AbsolutePath As String, extension As String, Optional special As Boolean = False, Optional delete As Boolean = True) As String
@@ -1461,11 +1584,15 @@ Public Class DATENVERVER_OPTIONS
Shared Sub clearTMPPath(Optional unterOrdner As String = "")
Dim TMP_PATH2 = TMP_PATH & If(unterOrdner <> "", "\" & unterOrdner & "\", "")
Dim TMP_PATH2 As String = TMP_PATH & If(unterOrdner <> "", "\" & unterOrdner & "\", "")
TMP_PATH2 = TMP_PATH2.Replace("\\", "\")
If My.Computer.FileSystem.DirectoryExists(TMP_PATH2) Then
For Each file As String In IO.Directory.GetFiles(TMP_PATH2) ' Ermittelt alle Dateien des Ordners und löscht diese (sind tmp)
Try : IO.File.Delete(file) : Catch : End Try
Next
For Each dir As String In IO.Directory.GetDirectories(TMP_PATH2) ' Ermittelt alle Dateien des Ordners und löscht diese (sind tmp)
Try : IO.Directory.Delete(dir, True) : Catch : End Try
Next
End If
End Sub

View File

@@ -22,7 +22,7 @@ Namespace My.Resources
'''<summary>
''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _

View File

@@ -15,21 +15,21 @@ Option Explicit On
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0"), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Public NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
#Region "Funktion zum automatischen Speichern von My.Settings"
#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(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
If My.Application.SaveMySettingsOnExit Then
My.Settings.Save()
End If

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<License Key="AAEA4ntefEpzSywzIrB1dHRM7C6h6Nsn2sYvcXJNIA6FsmqQCaeptK1e4d6q+o76ymXZPk8ckHWhlikSMIjsCQ/My5ty75NnBikL4MadZGorQYNOcIRK9Kfccke0TAqCilotrOQB5jScLOFL65oHzJoQbKdg4mx2dBgPiVzLUmzBeUTx5OQguU15g7tirjDkGEdfenCVvGq19aav/xmgma1L+IAsRyKkzLH0+yBsy3Ta7u2pVXF6kiH2BaJj0qi/5kmNWcu9bxWvApxCa20ShIY9QUIN7RqvQZ4orc3/+IF+8q4VtBomcLJ7ZYHlWPVfNovMUKU62qIjD274kFGQlDpeIJ1w8VEXqsov25WugggbDpheZcEBOAGuOGKeOM53TRF4EwTWB2fvGLw1E7o5HqxrID4PcDtSnq+sAv/NRU3+0Sr1YHhD7Cvk4TH9qwcsp27Pbm0zX5+ylm7kUHC6ZVko88MiQbP/SCFe+JL32HtuD0d1XbeLw1vntsPzlo+TWCsFRnPBWHvYmhFl3Sv6jXVW/tMTFYSU3z4nInGswCLBAUgajSLLcXJI5LTDAzya9cpl5Sw5s543RsrrktILANcRYtO3giNP6G5Wn95Kq+gkfQ/W29Zx/P5+WGylUyPQXkCweIAkAkdPZGxZdhkRWsWTuKGo+JcsA/U/NH8u6lK4lEepNaaRNffXzOQXwGC3z9gIzsIklUSKU104FJXZgsmrCwI68JuH7r/TFl2ekzfPSUcPzfR1i+x175q+Mb9tQMNfUYZ+NSPy5DFvVju0+VFdua/1S811zsk47D3lAYHhC7lnoPTGCJv6SekLLRiD7eM7B7QDcdSP6bFmwTl8St40PeHZRb4YJwuqmI/d2l8RRMFQz14nB7PYkFvD5FQ/Ts22/bh3pEd7Zy7/k1EiOpX8DcpO9zn25vPLlkQqRw0QtnUMx9K7LDwYkz+LFokERjLIRImkLGfskZf5ojgR7JQE4GDk9gu4AyjLTJELQzah0fHM/Mchn74Onr95Vh64uqNgOV/2MZLBJZTXRSENXFiyoO3y6IfgPe5vpVUPnl+Yngn6BdQB9BE3wmLWw25kyByliJsEfIuBYFGIvA5t9NSyBdmtW2g1fHGgcxDtn1g5H8Rmk79dMdUFr4tIQ+qvNS6CGvozSdG/C7D3JhRm01C+a+1ZyovuGHmREtj9VrmCmbYohmqZ34mH9L6kAfNmBOes2+eb8LjbMCNnAUAU5fhRqYIDyCa8wDvsuWy7dwwXj7PPeqY6fLitcSsJNHkS2iUUXJk3RqjsnwAqNFIqX1P3TIFuzJbXAkdjEetgsn3setPcUA/Kxaakx1p2K2BZ1Mzf+mnk8ugGPzJihyxIEKmXtacYtwO8yTGR49TQRGVFPwTbePdd5zDSbohXhl02oEmg8FDuhkktFUlHtBoHYtlVazlbXWKcliNXdzdGtXJYtEf4ULtv1pQclzGIDUyr2yRot6cB0wX9lVO6iHHQeRtFr1eLURLO" Version="1.3">
<Type>Runtime</Type>
<Username>VERAG Spedition AG</Username>
<Email>al@verag.ag</Email>
<Organization>VERAG Spedition AG</Organization>
<LicensedDate>2019-09-12T00:00:00Z</LicensedDate>
<ExpiredDate>2020-09-12T00:00:00Z</ExpiredDate>
<Products>
<Product>
<Name>Spire.PDF Platinum</Name>
<Version>5.8</Version>
<Subscription>
<NumberOfPermittedDeveloper>1</NumberOfPermittedDeveloper>
<NumberOfPermittedSite>1</NumberOfPermittedSite>
</Subscription>
</Product>
</Products>
<Issuer>
<Name>e-iceblue</Name>
<Email>sales@e-iceblue.com</Email>
<Url>http://www.e-iceblue.com</Url>
</Issuer>
</License>

View File

@@ -265,14 +265,15 @@ Namespace VERAG_OUT_NCTS
Partial Public Class VERAG_out_nctsInternalReference
#Region "Private fields"
Private _officeCode As Object
Private _officeCode As String
Private _positionNumber As Object
Private _positionNumber As String
Private Shared sSerializer As XmlSerializer
#End Region
Public Property OfficeCode() As Object
<System.Xml.Serialization.XmlElementAttribute(DataType:="integer")>
Public Property OfficeCode() As String
Get
Return Me._officeCode
End Get
@@ -281,7 +282,8 @@ Namespace VERAG_OUT_NCTS
End Set
End Property
Public Property PositionNumber() As Object
<System.Xml.Serialization.XmlElementAttribute(DataType:="integer")>
Public Property PositionNumber() As String
Get
Return Me._positionNumber
End Get

View File

@@ -4,14 +4,18 @@
<xs:element name="VERAG_out_ncts">
<xs:complexType>
<xs:sequence>
<xs:element name="Version"/>
<xs:element name="Version" default="1.0.2"/>
<xs:element name="Company"/>
<xs:element name="Department" minOccurs="0"/>
<xs:element name="InternalReference" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="OfficeCode"/>
<xs:element name="PositionNumber"/>
<xs:element name="OfficeCode">
<xs:simpleType>
<xs:restriction base="xs:integer"/>
</xs:simpleType>
</xs:element>
<xs:element name="PositionNumber" type="xs:integer"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -49,8 +53,8 @@
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="EORI"/>
<xs:element name="EORI_NL"/>
<xs:element name="EORI" minOccurs="0"/>
<xs:element name="EORI_NL" minOccurs="0"/>
<xs:element name="UID_Nr" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
@@ -69,8 +73,8 @@
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="EORI"/>
<xs:element name="EORI_NL"/>
<xs:element name="EORI" minOccurs="0"/>
<xs:element name="EORI_NL" minOccurs="0"/>
<xs:element name="UID_Nr" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
@@ -89,8 +93,8 @@
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="EORI"/>
<xs:element name="EORI_NL"/>
<xs:element name="EORI" minOccurs="0"/>
<xs:element name="EORI_NL" minOccurs="0"/>
<xs:element name="UID_Nr" minOccurs="0"/>
</xs:sequence>
</xs:complexType>

View File

@@ -1,7 +0,0 @@
Public Class cVERAG_OUT_NCTS
Shared Function genVERAG_OUT_NCTS_FromDAKOSY(DY_BezugsNr)
Dim OUT As New cVERAG_OUT_NCTS
Dim DY As New DateTimeKind
End Function
End Class

View File

@@ -92,7 +92,7 @@
file.WriteLine(genBetreibsstammSatz(Geschaeftsjahr))
If boolKunden Then
'----------------- STAMMDATEN LG -----------------
'----------------- STAMMDATEN -----------------
Dim dt_Stamm As DataTable = getStammdaten()
If dt_Stamm IsNot Nothing AndAlso dt_Stamm.Rows.Count > 0 Then
initKDNr(dt_Stamm)
@@ -335,19 +335,26 @@
' Trdin=false
Shared Function getSteuercode(r As DataRow) As Double
If CBool(r("Steuerpflichtig")) Then
Return "320"
Else
If (r("RechnungsLandKz")) = "A" Or (r("RechnungsLandKz")) = "AT" Then
Return "999" 'Steuerpflichtig und AT
Else
If SQL.DLookup("[MitgliedslandEU]", "[Währungstabelle]", "[LandKz]='" & r("RechnungsLandKz") & "'", "FMZOLL", False) Then
Return "969" ' EU-LAND
Select Case r("Sachkonto")
Case "3550", "3553", "3558"
Return "999"
Case Else
If CBool(r("Steuerpflichtig")) Then
Return "320"
Else
Return "973" ' Drittland
If (r("RechnungsLandKz")) = "A" Or (r("RechnungsLandKz")) = "AT" Then
Return "999" 'Steuerpflichtig und AT
Else
If SQL.DLookup("[MitgliedslandEU]", "[Währungstabelle]", "[LandKz]='" & r("RechnungsLandKz") & "'", "FMZOLL", False) Then
Return "969" ' EU-LAND
Else
Return "973" ' Drittland
End If
End If
End If
End If
End If
End Select
Return ""
End Function

View File

@@ -0,0 +1,124 @@
Imports Therefore.API
Public Class cTherefore
Shared Function saveFileTo_ImportFolder(Path As String, FilialeAbfertigungsNr As String, AvisoId As String)
Try
Dim SQL As New SQL
' 1. Connect to the Therefore™ Server
Dim server As New TheServer
server.Connect(TheClientType.CustomApplication)
' 2. Create a new Therefore™ Document
Dim doc As New TheDocument()
' 3. Create temporary File
'Dim filename As String = ""
'doc.Create(filename)
' 4A. Set Therefore™ Category by Number
' doc.IndexData.SetCategory(5, server)
' or 4B. Set Therefore™ Category by Name
doc.IndexData.SetCategory("Import ab Jänner 2019", server)
' 5. Add streams
'doc.AddStream("D:\\TestAll\\TestDocs\\Scsi.doc", "", 0)
'doc.AddStream("D:\\TestAll\\TestDocs\\TEST.xls", "", 0)
' 6. Set index data
'Dim indexData As TheIndexData = doc.IndexData
'indexData("String") = FilialeAbfertigungsNr
'indexData("Eingabedatum") = Now.ToShortDateString
'indexData("LKW_ID") = AvisoId
' MsgBox(doc.IndexData.Count)
' 7. Archive the document
'Dim docNo As Integer = doc.Archive(server, 0)
'Dim docNo As Integer = 0
'Dim filenameNEW As String = doc.Retrieve(docNo, "", server)
Dim docNo As Integer = SQL.getValueTxtBySql("SELECT TOP 1 isnull([DocNo],-1) FROM [Therefore].[dbo].[TheCat119] WHERE [String] LIKE '" & FilialeAbfertigungsNr & "' ORDER BY [Eingabedatum] DESC", "SCANCANON",,, -1)
Dim filename As String = ""
If docNo <= 0 Then
doc.Create(filename)
doc.AddStream(Path, "", 0)
Dim indexData As TheIndexData = doc.IndexData
indexData("String") = FilialeAbfertigungsNr
indexData("Eingabedatum") = Now.ToShortDateString
indexData("LKW_ID") = AvisoId
docNo = doc.Archive(server, 0)
Else
Dim folder = ""
Dim VerionNo As Integer
filename = doc.Retrieve(docNo, VerionNo, folder, server, False)
Dim user As String = ""
doc.CheckOut(server, False, user, VerionNo)
doc.AddStream(Path, "", 0)
doc.CheckIn(server)
End If
' 8. Close Therefore™ document object
doc.Close()
' 9. Delete the temporary file
System.IO.File.Delete(filename)
' 10. Optional: Print a success message on the console
' Console.WriteLine("Document successfully archived as " + docNo.ToString() + ".")
Return True
Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace)
End Try
Return False
End Function
'Shared Function saveFileTo_ImportFolder2(Path As String, FilialeAbfertigungsNr As Integer, AvisoId As Integer)
' Try
' ' 1. Connect to the Therefore™ Server
' Dim server As New TheServer
' server.Connect(TheClientType.CustomApplication)
' ' 2. Create a new Therefore™ Document
' Dim doc As New TheDocument()
' ' 3. Create temporary File
' Dim filename As String = ""
' doc.Create(filename)
' ' 4A. Set Therefore™ Category by Number
' ' doc.IndexData.SetCategory(5, server)
' ' or 4B. Set Therefore™ Category by Name
' doc.IndexData.SetCategory("Import ab Jänner 2019", server)
' ' 5. Add streams
' 'doc.AddStream("D:\\TestAll\\TestDocs\\Scsi.doc", "", 0)
' 'doc.AddStream("D:\\TestAll\\TestDocs\\TEST.xls", "", 0)
' doc.AddStream(Path, "", 0)
' ' 6. Set index data
' ' MsgBox(doc.IndexData.Count)
' ' 7. Archive the document
' Dim docNo As Integer = doc.Archive(server, 0)
' MsgBox(docNo)
' ' 8. Close Therefore™ document object
' doc.Close()
' ' 9. Delete the temporary file
' System.IO.File.Delete(filename)
' ' 10. Optional: Print a success message on the console
' ' Console.WriteLine("Document successfully archived as " + docNo.ToString() + ".")
' Catch ex As Exception
' MsgBox(ex.Message & ex.StackTrace)
' End Try
'End Function
End Class

View File

@@ -12,7 +12,8 @@
<AssemblyName>VERAG_PROG_ALLGEMEIN</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>Windows</MyType>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -92,6 +93,14 @@
<Reference Include="RichTextBoxEx">
<HintPath>..\..\..\dll\RichTextBoxEx.dll</HintPath>
</Reference>
<Reference Include="Spire.License, Version=1.3.7.46, Culture=neutral, PublicKeyToken=b1144360237c8b3f, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\AVISO\Aviso\packages\Spire.PDFViewer.4.9.5\lib\net46\Spire.License.dll</HintPath>
</Reference>
<Reference Include="Spire.Pdf, Version=5.10.2.2046, Culture=neutral, PublicKeyToken=663f351905198cb3, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\AVISO\Aviso\packages\Spire.PDFViewer.4.9.5\lib\net46\Spire.Pdf.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
@@ -141,6 +150,8 @@
<Compile Include="AVISO\frmGrayOut.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Barcode\Code128Content.vb" />
<Compile Include="Barcode\Code128Rendering.vb" />
<Compile Include="Benutzerdefinierte Steuerelemente\DateTimePickerEx.Designer.vb">
<DependentUpon>DateTimePickerEx.vb</DependentUpon>
</Compile>
@@ -280,6 +291,7 @@
<Compile Include="Classes\cAbgaben.vb" />
<Compile Include="Classes\cAvisoAnhaenge.vb" />
<Compile Include="Classes\cBonitaetsauskunft.vb" />
<Compile Include="Classes\cDEBundeslaenderPLZ.vb" />
<Compile Include="Classes\cDHF_Anhaenge.vb" />
<Compile Include="Classes\cEZB_Waehrungskurse.vb" />
<Compile Include="Classes\cEZT_ImportCodenummern.vb" />
@@ -293,6 +305,7 @@
<Compile Include="Classes\cNCTSGestellungsadressen.vb" />
<Compile Include="Classes\cOffene_Posten_DVO.vb" />
<Compile Include="Classes\cParameter.vb" />
<Compile Include="Classes\cProgrammeUpdate.vb" />
<Compile Include="Classes\cQSTeam.vb" />
<Compile Include="Classes\cRechnungsausgang.vb" />
<Compile Include="Classes\cRechnungsnummern.vb" />
@@ -303,6 +316,7 @@
<Compile Include="Classes\cTrdInvoice.vb" />
<Compile Include="Classes\cUIDAbfrage.vb" />
<Compile Include="Classes\cUIDPruefung.vb" />
<Compile Include="Classes\cPostversand.vb" />
<Compile Include="Classes\cVorauskasse.vb" />
<Compile Include="Classes\cWarenbezeichnungBegriffe.vb" />
<Compile Include="Classes\cZkteing.vb" />
@@ -381,7 +395,7 @@
</Compile>
<Compile Include="Schnittstellen\cDVO_Interface.vb" />
<Compile Include="Schnittstellen\cSyska_Interface.vb" />
<Compile Include="Schnittstellen\VERAG\cVERAG_OUT_NCTS.vb" />
<Compile Include="Schnittstellen\cTherefore.vb" />
<Compile Include="Schnittstellen\VERAG\OUT_NCTS\VERAG_out_ncts.Designer.vb" />
<Compile Include="Web References\UIDPruefung\Reference.vb">
<AutoGen>True</AutoGen>
@@ -584,6 +598,22 @@
<ItemGroup>
<None Include="Resources\aviso.ico" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="My Project\license.elic.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<COMReference Include="Therefore.API">
<Guid>{37687F89-8603-4E42-A5F4-4FBAB011D5F3}</Guid>
<VersionMajor>3</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>tlbimp</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

View File

@@ -24,7 +24,7 @@ Imports System.Xml.Serialization
Namespace UIDPruefung
'''<remarks/>
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0"), _
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.3056.0"), _
System.Diagnostics.DebuggerStepThroughAttribute(), _
System.ComponentModel.DesignerCategoryAttribute("code"), _
System.Web.Services.WebServiceBindingAttribute(Name:="checkVatBinding", [Namespace]:="urn:ec.europa.eu:taxud:vies:services:checkVat")> _
@@ -200,7 +200,7 @@ Namespace UIDPruefung
End Class
'''<remarks/>
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0"), _
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.3056.0"), _
System.SerializableAttribute(), _
System.Xml.Serialization.XmlTypeAttribute([Namespace]:="urn:ec.europa.eu:taxud:vies:services:checkVat:types")> _
Public Enum matchCode
@@ -219,11 +219,11 @@ Namespace UIDPruefung
End Enum
'''<remarks/>
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0")> _
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.3056.0")> _
Public Delegate Sub checkVatCompletedEventHandler(ByVal sender As Object, ByVal e As checkVatCompletedEventArgs)
'''<remarks/>
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0"), _
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.3056.0"), _
System.Diagnostics.DebuggerStepThroughAttribute(), _
System.ComponentModel.DesignerCategoryAttribute("code")> _
Partial Public Class checkVatCompletedEventArgs
@@ -286,11 +286,11 @@ Namespace UIDPruefung
End Class
'''<remarks/>
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0")> _
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.3056.0")> _
Public Delegate Sub checkVatApproxCompletedEventHandler(ByVal sender As Object, ByVal e As checkVatApproxCompletedEventArgs)
'''<remarks/>
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0"), _
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.3056.0"), _
System.Diagnostics.DebuggerStepThroughAttribute(), _
System.ComponentModel.DesignerCategoryAttribute("code")> _
Partial Public Class checkVatApproxCompletedEventArgs

View File

@@ -6,5 +6,5 @@
cause the file to be unrecognizable by the program.
-->
<GenericObjectDataSource DisplayName="matchCode" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<TypeInfo>VERAG_PROG_ALLGEMEIN.UIDPruefung.matchCode, Web References.UIDPruefung.Reference.vb, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
<TypeInfo>VERAG_PROG_ALLGEMEIN.UIDPruefung.matchCode, Web References.UIDPruefung.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
</GenericObjectDataSource>

View File

@@ -4,6 +4,9 @@ Public Class cAllgemein
Public Shared FIRMA As String
Public Shared NIEDERLASSUNG As String 'SUB, WAI, ...
Public Shared ABTEILUNG As String 'QS ZOLL ...
Public Shared STAMMFILIALE As String 'IMEX,UNISPED;ATILLA...
' Public Shared SPECIFIC As cSPECIFIC = New cSPECIFIC
Public Shared ERR_OP_GLOBAL As String = ERROR_OP.SHOW
@@ -54,6 +57,20 @@ Public Class cAllgemein
USR_HrFrNAME &= MITARBEITER.mit_nname
If FIRMA = "" Then FIRMA = If(MITARBEITER.mit_firma = "BEIDE", "VERAG", MITARBEITER.mit_firma)
cSPECIFIC.FIRMA_BgColor = Drawing.Color.FromArgb(0, 54, 128)
Select Case FIRMA
'Case "VERAG"
Case "IMEX"
STAMMFILIALE = "5501"
Case "UNISPED"
STAMMFILIALE = "5601"
cSPECIFIC.FIRMA_BgColor = Drawing.Color.FromArgb(200, 0, 0)
Case "AMBAR"
STAMMFILIALE = "5701"
End Select
USRNAME = (MITARBEITER.mit_vname & " " & MITARBEITER.mit_nname)
If NIEDERLASSUNG = "" Then NIEDERLASSUNG = MITARBEITER.mit_niederlassung
If ABTEILUNG = "" Then ABTEILUNG = MITARBEITER.mit_abteilung
@@ -122,6 +139,25 @@ Public Class cAllgemein
Class cSPECIFIC
Public Shared FIRMA_BgColor As System.Drawing.Color = Drawing.Color.FromArgb(0, 54, 128)
Public Shared FIRMA_ForeColor As System.Drawing.Color = Drawing.Color.White
End Class
Public Shared Sub buildConnectionDATENARCHIV()
Try
Dim netuse As New System.Diagnostics.ProcessStartInfo()
netuse.FileName = "C:\Windows\system32\net"
netuse.Arguments = "use \\192.168.0.91\Datenarchiv /User:VERAGOST\AVISOSMB BmWr501956"
netuse.CreateNoWindow = True
netuse.WindowStyle = ProcessWindowStyle.Hidden
System.Diagnostics.Process.Start(netuse)
Catch ex As Exception
MsgBox("ERR: DATENARCHIV Netzwerkzugriff fehlgeschlagen...")
End Try
End Sub
End Class