Fakturierung VERAG AG (DE); NCTS Adressen zugel.Empf.; ATEZ +Procedure
This commit is contained in:
@@ -45,6 +45,10 @@
|
||||
connectionString="Data Source=SQLGUIDE01.verag.ost.dmn;Initial Catalog=ADMIN;Integrated Security=false;User ID=AppUser;Password=yp/THDd?xM+pZ$;" />
|
||||
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.ADMINConnectionString"
|
||||
connectionString="Data Source=192.168.0.90\DEVSQL;Initial Catalog=ADMIN;Integrated Security=false;User ID=AppUser;Password=yp/THDd?xM+pZ$;" />
|
||||
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.PARKZEITConnectionString_PROD"
|
||||
connectionString="Data Source=SQLGUIDE01.verag.ost.dmn;Initial Catalog=Parkzeit;Integrated Security=false;User ID=sa;Password=BmWr501956;" />
|
||||
<add name="VERAG_PROG_ALLGEMEIN.My.MySettings.PARKZEITConnectionString_DEV"
|
||||
connectionString="Data Source=DEVELOPER\DEVSQL;Initial Catalog=Parkzeit;Integrated Security=false;User ID=sa;Password=BmWr501956;" />
|
||||
</connectionStrings>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7"/>
|
||||
|
||||
@@ -48,6 +48,20 @@ Public Class SQL
|
||||
End If
|
||||
|
||||
|
||||
End Function
|
||||
Public Shared Function GetPARKZEITConnectionString() As String
|
||||
'Properties.Settings.Default.
|
||||
|
||||
If VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM Then
|
||||
Return My.MySettings.Default.PARKZEITConnectionString_DEV
|
||||
|
||||
|
||||
Else
|
||||
Return My.MySettings.Default.PARKZEITConnectionString_PROD
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End Function
|
||||
Public Shared Function GetWEBConnectionString() As String
|
||||
'Properties.Settings.Default.
|
||||
@@ -212,6 +226,18 @@ Public Class SQL
|
||||
End Try
|
||||
Return Nothing
|
||||
|
||||
End Function
|
||||
Public Shared Function GetNewOpenConnectionPARKZEIT(Optional pooling As Boolean = True) As SqlConnection
|
||||
Dim cn As New SqlConnection()
|
||||
Try
|
||||
cn.ConnectionString = GetPARKZEITConnectionString() & IIf(pooling, "", ";pooling=false")
|
||||
cn.Open()
|
||||
Return cn
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, "SQL CONNECTION | " & cn.ConnectionString.Replace("BmWr501956", "*******").Replace("yp/THDd?xM+pZ$", "*******") & " | Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
Return Nothing
|
||||
|
||||
End Function
|
||||
Public Shared Function GetNewOpenConnectionWEB(Optional pooling As Boolean = True) As SqlConnection
|
||||
Dim cn As New SqlConnection()
|
||||
@@ -432,6 +458,7 @@ Public Class SQL
|
||||
Case "FD" : conn = GetNewOpenConnectionFD()
|
||||
Case "WEB" : conn = GetNewOpenConnectionWEB()
|
||||
Case "FIBU", "SYSKA" : conn = GetNewOpenConnectionSYSKA()
|
||||
Case "PARKZEIT" : conn = GetNewOpenConnectionPARKZEIT()
|
||||
|
||||
Case "AVISO_ATILLA"
|
||||
conn.ConnectionString = "Data Source=172.16.0.98;Initial Catalog=AVISO_ATILLA;Integrated Security=false;User ID=sa;Password=BmWr501956;Pooling=true;Min Pool Size=5;Max Pool Size=200"
|
||||
@@ -473,6 +500,7 @@ Public Class SQL
|
||||
Case "AVISO" : conn = GetNewOpenConnectionAVISO()
|
||||
Case "VERAG" : conn = GetNewOpenConnectionFMZOLL()
|
||||
Case "WEB" : conn = GetNewOpenConnectionWEB()
|
||||
Case "PARKZEIT" : conn = GetNewOpenConnectionPARKZEIT()
|
||||
End Select
|
||||
|
||||
' Using conn As SqlConnection = GetNewOpenConnection()
|
||||
@@ -508,6 +536,7 @@ Public Class SQL
|
||||
Case "VERAG" : conn = GetNewOpenConnectionFMZOLL()
|
||||
Case "DISPO" : conn = GetNewOpenConnectionDISPO()
|
||||
Case "WEB" : conn = GetNewOpenConnectionWEB()
|
||||
Case "PARKZEIT" : conn = GetNewOpenConnectionPARKZEIT()
|
||||
End Select
|
||||
|
||||
Using cmd As New SqlCommand(sql, conn)
|
||||
@@ -576,6 +605,7 @@ Public Class SQL
|
||||
Case "SCANCANON" : conn = GetNewOpenConnectionSCANCANON()
|
||||
Case "WEB" : conn = GetNewOpenConnectionWEB()
|
||||
Case "FIBU", "SYSKA" : conn = GetNewOpenConnectionSYSKA()
|
||||
Case "PARKZEIT" : conn = GetNewOpenConnectionPARKZEIT()
|
||||
|
||||
End Select
|
||||
End If
|
||||
@@ -625,6 +655,7 @@ Public Class SQL
|
||||
Case "AVISO" : conn = GetNewOpenConnectionAVISO()
|
||||
Case "VERAG" : conn = GetNewOpenConnectionFMZOLL()
|
||||
Case "WEB" : conn = GetNewOpenConnectionWEB()
|
||||
Case "PARKZEIT" : conn = GetNewOpenConnectionPARKZEIT()
|
||||
End Select
|
||||
|
||||
Using cmd As New SqlCommand(sql, conn)
|
||||
@@ -669,6 +700,7 @@ Public Class SQL
|
||||
Case "DISPO" : conn = GetNewOpenConnectionDISPO()
|
||||
Case "WEB" : conn = GetNewOpenConnectionWEB()
|
||||
Case "FIBU", "SYSKA" : conn = GetNewOpenConnectionSYSKA()
|
||||
Case "PARKZEIT" : conn = GetNewOpenConnectionPARKZEIT()
|
||||
|
||||
Case "AVISO_ATILLA"
|
||||
conn.ConnectionString = "Data Source=172.16.0.98;Initial Catalog=AVISO_ATILLA;Integrated Security=false;User ID=sa;Password=BmWr501956;Pooling=true;Min Pool Size=5;Max Pool Size=200"
|
||||
@@ -708,6 +740,7 @@ Public Class SQL
|
||||
Case "DISPO" : conn = GetNewOpenConnectionDISPO()
|
||||
Case "VERAG" : conn = GetNewOpenConnectionFMZOLL()
|
||||
Case "WEB" : conn = GetNewOpenConnectionWEB()
|
||||
Case "PARKZEIT" : conn = GetNewOpenConnectionPARKZEIT()
|
||||
End Select
|
||||
Try
|
||||
' MsgBox(sql)
|
||||
@@ -742,6 +775,7 @@ Public Class SQL
|
||||
Case "DISPO" : conn = GetNewOpenConnectionDISPO()
|
||||
Case "VERAG" : conn = GetNewOpenConnectionFMZOLL()
|
||||
Case "WEB" : conn = GetNewOpenConnectionWEB()
|
||||
Case "PARKZEIT" : conn = GetNewOpenConnectionPARKZEIT()
|
||||
End Select
|
||||
Try
|
||||
Using cmd As New SqlCommand(sql, conn)
|
||||
|
||||
142
VERAG_PROG_ALLGEMEIN/Classes/cParkzeiten.vb
Normal file
142
VERAG_PROG_ALLGEMEIN/Classes/cParkzeiten.vb
Normal file
@@ -0,0 +1,142 @@
|
||||
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Reflection
|
||||
Imports Org.BouncyCastle.Utilities
|
||||
|
||||
Public Class cParkzeiten
|
||||
Property ParkzeitID As Integer
|
||||
Property Laufende_Nr As Object = Nothing
|
||||
Property Von As DateTime
|
||||
Property Bis As DateTime
|
||||
Property Dauer As String
|
||||
Property Dauer_Minuten As Integer
|
||||
Property Kennzeichen As String
|
||||
Property TarifArt As String
|
||||
Property KartenNr As String
|
||||
Property Bereich As String
|
||||
Property KundenNr As Object = Nothing
|
||||
|
||||
|
||||
Public hasEntry = False
|
||||
|
||||
Dim SQL As New SQL
|
||||
|
||||
Sub New()
|
||||
|
||||
End Sub
|
||||
Sub New(ParkzeitID)
|
||||
Me.ParkzeitID = ParkzeitID
|
||||
LOAD()
|
||||
End Sub
|
||||
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("ParkzeitID", ParkzeitID,, True))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Laufende_Nr", Laufende_Nr))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Von", Von))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Bis", Bis))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Dauer", Dauer))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Dauer_Minuten", Dauer_Minuten))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Kennzeichen", Kennzeichen))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("TarifArt", TarifArt))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("KartenNr", KartenNr))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Bereich", Bereich))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("KundenNr", KundenNr))
|
||||
|
||||
Return list
|
||||
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 Parkzeiten WHERE ParkzeitID=@ParkzeitID) " &
|
||||
" BEGIN " & getUpdateCmd() & " END " &
|
||||
" Else " &
|
||||
" BEGIN " & getInsertCmd() & " END " &
|
||||
" commit tran "
|
||||
|
||||
Return SQL.doSQLVarList(sqlstr, "PARKZEIT", , list)
|
||||
End Function
|
||||
|
||||
Public Function INSERT_EXISTS() As Boolean
|
||||
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
|
||||
|
||||
Dim sqlstr = " BEGIN TRAN IF NOT EXISTS(SELECT * FROM Parkzeiten WHERE cast(Kennzeichen as varchar)=@Kennzeichen and Von=@Von and Bis=@Bis) " &
|
||||
" BEGIN " & getInsertCmd() & " END " &
|
||||
" commit tran "
|
||||
|
||||
Return SQL.doSQLVarList(sqlstr, "PARKZEIT", , list)
|
||||
End Function
|
||||
|
||||
Public Sub LOAD()
|
||||
Try
|
||||
hasEntry = False
|
||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionPARKZEIT()
|
||||
Using cmd As New SqlCommand("SELECT * FROM Parkzeiten WHERE ParkzeitID=@ParkzeitID ", conn)
|
||||
cmd.Parameters.AddWithValue("@ParkzeitID", ParkzeitID)
|
||||
Dim dr = cmd.ExecuteReader()
|
||||
If dr.Read Then
|
||||
For Each li In getParameterList()
|
||||
Dim propInfo As PropertyInfo = Me.GetType.GetProperty(li.Scalarvariable)
|
||||
|
||||
If dr.Item(li.Text) Is DBNull.Value Then
|
||||
propInfo.SetValue(Me, Nothing)
|
||||
Else
|
||||
propInfo.SetValue(Me, dr.Item(li.Text))
|
||||
End If
|
||||
|
||||
Next
|
||||
hasEntry = True
|
||||
End If
|
||||
dr.Close()
|
||||
End Using
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
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 [Parkzeiten] SET " & str & " WHERE ParkzeitID=@ParkzeitID ")
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
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 Parkzeiten (" & str & ") VALUES(" & values & ") ")
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
Return ""
|
||||
End Function
|
||||
|
||||
End Class
|
||||
24
VERAG_PROG_ALLGEMEIN/My Project/Settings.Designer.vb
generated
24
VERAG_PROG_ALLGEMEIN/My Project/Settings.Designer.vb
generated
@@ -15,7 +15,7 @@ Option Explicit On
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.2.0.0"), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.3.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Public NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
@@ -345,6 +345,28 @@ Namespace My
|
||||
Return CType(Me("ADMINConnectionString"),String)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.SpecialSettingAttribute(Global.System.Configuration.SpecialSetting.ConnectionString), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("Data Source=SQLGUIDE01.verag.ost.dmn;Initial Catalog=Parkzeit;Integrated Security"& _
|
||||
"=false;User ID=sa;Password=BmWr501956;")> _
|
||||
Public ReadOnly Property PARKZEITConnectionString_PROD() As String
|
||||
Get
|
||||
Return CType(Me("PARKZEITConnectionString_PROD"),String)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.SpecialSettingAttribute(Global.System.Configuration.SpecialSetting.ConnectionString), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("Data Source=DEVELOPER\DEVSQL;Initial Catalog=Parkzeit;Integrated Security=false;U"& _
|
||||
"ser ID=sa;Password=BmWr501956;")> _
|
||||
Public ReadOnly Property PARKZEITConnectionString_DEV() As String
|
||||
Get
|
||||
Return CType(Me("PARKZEITConnectionString_DEV"),String)
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
|
||||
@@ -152,5 +152,19 @@
|
||||
</SerializableConnectionString></DesignTimeValue>
|
||||
<Value Profile="(Default)">Data Source=192.168.0.90\DEVSQL;Initial Catalog=ADMIN;Integrated Security=false;User ID=AppUser;Password=yp/THDd?xM+pZ$;</Value>
|
||||
</Setting>
|
||||
<Setting Name="PARKZEITConnectionString_PROD" Type="(Connection string)" Scope="Application">
|
||||
<DesignTimeValue Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||
<SerializableConnectionString xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<ConnectionString>Data Source=SQLGUIDE01.verag.ost.dmn;Initial Catalog=Parkzeit;Integrated Security=false;User ID=sa;Password=BmWr501956;</ConnectionString>
|
||||
</SerializableConnectionString></DesignTimeValue>
|
||||
<Value Profile="(Default)">Data Source=SQLGUIDE01.verag.ost.dmn;Initial Catalog=Parkzeit;Integrated Security=false;User ID=sa;Password=BmWr501956;</Value>
|
||||
</Setting>
|
||||
<Setting Name="PARKZEITConnectionString_DEV" Type="(Connection string)" Scope="Application">
|
||||
<DesignTimeValue Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||
<SerializableConnectionString xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<ConnectionString>Data Source=DEVELOPER\DEVSQL;Initial Catalog=Parkzeit;Integrated Security=false;User ID=sa;Password=BmWr501956;</ConnectionString>
|
||||
</SerializableConnectionString></DesignTimeValue>
|
||||
<Value Profile="(Default)">Data Source=DEVELOPER\DEVSQL;Initial Catalog=Parkzeit;Integrated Security=false;User ID=sa;Password=BmWr501956;</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@@ -20,7 +20,8 @@ Public Class cATEZ_NCTS_DATA
|
||||
Public Property DAKOSY_Division1 As String
|
||||
Public Property DAKOSY_Division2 As String
|
||||
Public Property DAKOSY_Division3 As String
|
||||
Public Property status As Object = 0
|
||||
Public Property DAKOSY_Procedure As String
|
||||
Public Property status As Object
|
||||
Property erstellung As DateTime = Now
|
||||
Public Property Route_Country As String
|
||||
Public Property Carrier_Name As String
|
||||
@@ -56,6 +57,7 @@ Public Class cATEZ_NCTS_DATA
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("DAKOSY_Division1", DAKOSY_Division1))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("DAKOSY_Division2", DAKOSY_Division2))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("DAKOSY_Division3", DAKOSY_Division3))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("DAKOSY_Procedure", DAKOSY_Procedure))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Carrier_Name", Carrier_Name))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Carrier_Adress_Country", Carrier_Adress_Country))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Carrier_Adress_Postcode", Carrier_Adress_Postcode))
|
||||
@@ -603,6 +605,7 @@ Public Class cATEZ_NCTS_IN
|
||||
success = jsonData.UpdateString("DAKOSY.Division1", ncts.DAKOSY_Division1)
|
||||
success = jsonData.UpdateString("DAKOSY.Division2", ncts.DAKOSY_Division2)
|
||||
success = jsonData.UpdateString("DAKOSY.Division3", ncts.DAKOSY_Division3)
|
||||
success = jsonData.UpdateString("DAKOSY.Procedure", ncts.DAKOSY_Procedure)
|
||||
success = jsonData.UpdateString("DepartureCustomsOffice", ncts.DepartureCustomsOffice)
|
||||
success = jsonData.UpdateString("DestinationCustomsOffice", ncts.DestinationCustomsOffice)
|
||||
success = jsonData.UpdateString("DatDeterminationLimit", ncts.DatDeterminationLimit)
|
||||
|
||||
@@ -366,6 +366,7 @@
|
||||
<Compile Include="Classes\cNCTS_TR_Nachrichten.vb" />
|
||||
<Compile Include="Classes\cOffene_Posten.vb" />
|
||||
<Compile Include="Classes\cOffene_Posten_DVO.vb" />
|
||||
<Compile Include="Classes\cParkzeiten.vb" />
|
||||
<Compile Include="Schnittstellen\Modaltrans\cOregonNCTSDeclarations.vb" />
|
||||
<Compile Include="Classes\cParameter.vb" />
|
||||
<Compile Include="Classes\cProgrammeUpdate.vb" />
|
||||
|
||||
Reference in New Issue
Block a user