neu
This commit is contained in:
@@ -1053,7 +1053,11 @@ Public Class cAviso
|
||||
Return dt
|
||||
End Function
|
||||
|
||||
|
||||
Public Function getSENDUNG_LIST() As List(Of VERAG_PROG_ALLGEMEIN.cSendungen)
|
||||
Dim SENDUNG_LIST As New List(Of VERAG_PROG_ALLGEMEIN.cSendungen)
|
||||
VERAG_PROG_ALLGEMEIN.cSendungen.LOAD_LIST(SENDUNG_LIST, -1, AvisoID) 'LÄDT alle SENDUNGSDATEN
|
||||
Return SENDUNG_LIST
|
||||
End Function
|
||||
|
||||
Sub UPDATE_FahrerHandy(FahrerHandy As String)
|
||||
If AvisoID <= 0 Then Exit Sub
|
||||
@@ -1942,7 +1946,7 @@ Public Class cVermerkeDAL
|
||||
daten.VermerkCodeId = VarToInt(dr.Item("VermerkeCode"))
|
||||
daten.SendungID = VarToInt(dr.Item("SendungID"))
|
||||
daten.VermerkArt = VarToStr(dr.Item("VermerkArt"))
|
||||
daten.VorauskasseId = VarToStr(dr.Item("VorauskasseId"))
|
||||
daten.VorauskasseId = VarToInt(dr.Item("VorauskasseId"))
|
||||
daten.SMSId = VarToInt(dr.Item("SMSId"))
|
||||
daten.SMSStatus = VarToInt(dr.Item("SMSstatus"))
|
||||
End If
|
||||
@@ -2416,6 +2420,8 @@ Public Class cOption
|
||||
Property eMail_Ankunft_Text As String
|
||||
Property eMail_Freigabe_Betreff As String
|
||||
Property eMail_Freigabe_Text As String
|
||||
Property eMail_Status_Text As String
|
||||
Property eMail_Status_Betreff As String
|
||||
End Class
|
||||
|
||||
Public Class cOptionenDAL
|
||||
@@ -2440,6 +2446,8 @@ Public Class cOptionenDAL
|
||||
daten.eMail_Ankunft_Text = VarToStr(dr.Item("eMail_Ankunft_Text"))
|
||||
daten.eMail_Freigabe_Betreff = VarToStr(dr.Item("eMail_Freigabe_Betreff"))
|
||||
daten.eMail_Freigabe_Text = VarToStr(dr.Item("eMail_Freigabe_Text"))
|
||||
daten.eMail_Status_Betreff = VarToStr(dr.Item("eMail_Status_Betreff"))
|
||||
daten.eMail_Status_Text = VarToStr(dr.Item("eMail_Status_Text"))
|
||||
End If
|
||||
dr.Close()
|
||||
End Using
|
||||
@@ -2531,6 +2539,8 @@ Public Class cStandort
|
||||
|
||||
Property eMail_Zollbeleg_Betreff As String
|
||||
Property eMail_Zollbeleg_Text As String
|
||||
Property eMail_Status_Betreff As String
|
||||
Property eMail_Status_Text As String
|
||||
End Class
|
||||
|
||||
Public Class cStandorteDAL
|
||||
@@ -2564,6 +2574,8 @@ Public Class cStandorteDAL
|
||||
daten.eMail_Freigabe_Text = VarToStr(dr.Item("eMail_Freigabe_Text"))
|
||||
daten.eMail_Zollbeleg_Betreff = VarToStr(dr.Item("eMail_Zollbeleg_Betreff"))
|
||||
daten.eMail_Zollbeleg_Text = VarToStr(dr.Item("eMail_Zollbeleg_Text"))
|
||||
daten.eMail_Status_Betreff = VarToStr(dr.Item("eMail_Status_Betreff"))
|
||||
daten.eMail_Status_Text = VarToStr(dr.Item("eMail_Status_Text"))
|
||||
End If
|
||||
dr.Close()
|
||||
End Using
|
||||
@@ -2638,12 +2650,12 @@ Public Class cStandorteDAL
|
||||
If d.StandortID = 0 Then
|
||||
'Neuanlage
|
||||
hAuswahl = "INSERT INTO Standorte " &
|
||||
"(Standort, Standort_Text, Info, eMail_Ankunft_Betreff, eMail_Ankunft_Text, eMail_Freigabe_Betreff, eMail_Freigabe_Text,eMail_Zollbeleg_Betreff,eMail_Zollbeleg_Text) VALUES (" &
|
||||
"@Standort, @Standort_Text, @Info, @eMail_Ankunft_Betreff, @eMail_Ankunft_Text, @eMail_Freigabe_Betreff, @eMail_Freigabe_Text,@eMail_Zollbeleg_Betreff,@eMail_Zollbeleg_Text)"
|
||||
"(Standort, Standort_Text, Info, eMail_Ankunft_Betreff, eMail_Ankunft_Text, eMail_Freigabe_Betreff, eMail_Freigabe_Text,eMail_Zollbeleg_Betreff,eMail_Zollbeleg_Text,eMail_Status_Betreff,eMail_Status_Text) VALUES (" &
|
||||
"@Standort, @Standort_Text, @Info, @eMail_Ankunft_Betreff, @eMail_Ankunft_Text, @eMail_Freigabe_Betreff, @eMail_Freigabe_Text,@eMail_Zollbeleg_Betreff,@eMail_Zollbeleg_Text,@eMail_Status_Betreff,@eMail_Status_Text)"
|
||||
Else
|
||||
'Änderung
|
||||
hAuswahl = String.Format(
|
||||
"UPDATE Standorte SET Standort = @Standort, Standort_Text=@Standort_Text, Info=@Info, eMail_Ankunft_Betreff=@eMail_Ankunft_Betreff, eMail_Ankunft_Text=@eMail_Ankunft_Text, eMail_Freigabe_Betreff=@eMail_Freigabe_Betreff, eMail_Freigabe_Text=@eMail_Freigabe_Text , eMail_Zollbeleg_Betreff=@eMail_Zollbeleg_Betreff , eMail_Zollbeleg_Text=@eMail_Zollbeleg_Text " &
|
||||
"UPDATE Standorte SET Standort = @Standort, Standort_Text=@Standort_Text, Info=@Info, eMail_Ankunft_Betreff=@eMail_Ankunft_Betreff, eMail_Ankunft_Text=@eMail_Ankunft_Text, eMail_Freigabe_Betreff=@eMail_Freigabe_Betreff, eMail_Freigabe_Text=@eMail_Freigabe_Text , eMail_Zollbeleg_Betreff=@eMail_Zollbeleg_Betreff , eMail_Zollbeleg_Text=@eMail_Zollbeleg_Text,eMail_Status_Betreff=@eMail_Status_Betreff,eMail_Status_Text=@eMail_Status_Text " &
|
||||
"WHERE StandortID = @StandortID")
|
||||
End If
|
||||
Dim sql = hAuswahl
|
||||
@@ -2658,6 +2670,8 @@ Public Class cStandorteDAL
|
||||
cmd.Parameters.AddWithValue("@eMail_Freigabe_Text", d.eMail_Freigabe_Text)
|
||||
cmd.Parameters.AddWithValue("@eMail_Zollbeleg_Betreff", d.eMail_Zollbeleg_Betreff)
|
||||
cmd.Parameters.AddWithValue("@eMail_Zollbeleg_Text", d.eMail_Zollbeleg_Text)
|
||||
cmd.Parameters.AddWithValue("@eMail_Status_Betreff", d.eMail_Status_Betreff)
|
||||
cmd.Parameters.AddWithValue("@eMail_Status_Text", d.eMail_Status_Text)
|
||||
cmd.Parameters.AddWithValue("@StandortID", d.StandortID)
|
||||
Try
|
||||
cmd.ExecuteNonQuery()
|
||||
|
||||
@@ -78,6 +78,10 @@
|
||||
serializeAs="String">
|
||||
<value>http://localhost:8733/DSFinVKService</value>
|
||||
</setting>
|
||||
<setting name="VERAG_PROG_ALLGEMEIN_eu_europa_ec_checkVatTestService"
|
||||
serializeAs="String">
|
||||
<value>http://ec.europa.eu/taxation_customs/vies/services/checkVatTestService</value>
|
||||
</setting>
|
||||
</VERAG_PROG_ALLGEMEIN.My.MySettings>
|
||||
</applicationSettings>
|
||||
<system.serviceModel>
|
||||
|
||||
@@ -121,6 +121,10 @@ Public Class KdSearchBox
|
||||
e.Handled = True
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
If kdNrField IsNot Nothing Then kdNrField.Text = ""
|
||||
|
||||
KdNr_value = -1
|
||||
@@ -174,12 +178,13 @@ Public Class KdSearchBox
|
||||
usrcntl.Height = usrcntlHEIGHT
|
||||
|
||||
Dim locationOnForm As Point = Nothing
|
||||
If dgvpos = "LEFT" Or dgvpos = "" Then
|
||||
locationOnForm = Me.FindForm().PointToClient(Me.Parent.PointToScreen(Me.Location))
|
||||
ElseIf dgvpos = "RIGHT" Then
|
||||
locationOnForm = Me.FindForm().PointToClient(Me.Parent.PointToScreen(Me.Location))
|
||||
locationOnForm.X = locationOnForm.X - (usrcntl.Width - Me.Width)
|
||||
' MsgBox(locationOnForm.X & "/" & locationOnForm.Y)
|
||||
If Me.FindForm IsNot Nothing Then
|
||||
If dgvpos = "LEFT" Or dgvpos = "" Then
|
||||
locationOnForm = Me.FindForm().PointToClient(Me.Parent.PointToScreen(Me.Location))
|
||||
ElseIf dgvpos = "RIGHT" Then
|
||||
locationOnForm = Me.FindForm().PointToClient(Me.Parent.PointToScreen(Me.Location))
|
||||
locationOnForm.X = locationOnForm.X - (usrcntl.Width - Me.Width)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
@@ -54,6 +54,9 @@ Public Class MyComboBox
|
||||
Function changeItem(v, Optional Valueallowed = False) As Boolean
|
||||
'
|
||||
Try
|
||||
|
||||
If v Is Nothing Then Me.Text = "" : Return True
|
||||
If v Is DBNull.Value Then Me.Text = "" : Return True
|
||||
If Me.Items.Count = 0 Then Me.Text = "" : Return True
|
||||
|
||||
If Me.Items(0).GetType.Name = "MyListItem" Then
|
||||
@@ -78,7 +81,7 @@ Public Class MyComboBox
|
||||
'WEnn die Items normale Strings beinhalten, wird keine Änderung des ._value Wertes vorgenommen.
|
||||
Return True
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Catch ex As Exception
|
||||
' MsgBox(ex.Message)
|
||||
End Try
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ Public Class MyTextBox
|
||||
Property _ShortDateNew As Boolean = False
|
||||
Property _DateTimeOnly As Boolean = False
|
||||
Property _TimeOnly As Boolean = False
|
||||
Property _TimeOnly_Seconds As Boolean = False
|
||||
Property _Waehrung As Boolean = False
|
||||
Property _WaehrungZeichen As Boolean = True
|
||||
Property _Prozent As Boolean = False
|
||||
@@ -331,6 +332,18 @@ Public Class MyTextBox
|
||||
If Not isShortDate(sender.text) Then sender.ForeColor = System.Drawing.Color.Red
|
||||
End If
|
||||
|
||||
If _TimeOnly Then
|
||||
If Me.Text <> "" AndAlso IsNumeric(Me.Text) AndAlso CInt(Me.Text) >= 0 AndAlso CInt(Me.Text) < 24 Then
|
||||
pruefungHandled = True
|
||||
If _TimeOnly_Seconds Then
|
||||
Me.Text &= ":00:00"
|
||||
Else
|
||||
Me.Text &= ":00"
|
||||
End If
|
||||
OnPropertyChanged("_value")
|
||||
End If
|
||||
End If
|
||||
|
||||
If _ShortDateNew Then
|
||||
pruefungHandled = True
|
||||
Me.ForeColor = Color.Black
|
||||
@@ -344,6 +357,10 @@ Public Class MyTextBox
|
||||
End If
|
||||
End If
|
||||
|
||||
' +2 = zwei Tage von heute weg
|
||||
If Me.Text <> "" AndAlso Not IsDate(Me.Text) AndAlso IsNumeric(Me.Text) Then
|
||||
Me.Text = Now.AddDays(Int(Me.Text)).ToShortDateString
|
||||
End If
|
||||
If (Me.Text.Length >= 6 And Me.Text.Length <= 10) AndAlso IsDate(Me.Text.Replace(",", ".")) AndAlso CDate(Me.Text) > CDate("01.01.1900") Then
|
||||
'MsgBox(Me.Text)
|
||||
''------ falls Jahr zweistellig:
|
||||
@@ -454,8 +471,12 @@ Public Class MyTextBox
|
||||
pruefungHandled = True
|
||||
Me.ForeColor = Color.Black
|
||||
If Me.Text.Length = 10 AndAlso IsDate(Me.Text.Replace(",", ".")) AndAlso CDate(Me.Text) > CDate("01.01.1900") Then
|
||||
Me._value = CDate(Me.Text).ToShortDateString 'Nur wenns Passt
|
||||
Me.Text = CDate(Me.Text).ToShortDateString
|
||||
Try
|
||||
Me._value = CDate(Me.Text).ToShortDateString 'Nur wenns Passt
|
||||
Me.Text = CDate(Me.Text).ToShortDateString
|
||||
Catch ex As Exception
|
||||
sender.ForeColor = System.Drawing.Color.Red
|
||||
End Try
|
||||
ElseIf Me.Text = "" Then
|
||||
Me._value = ""
|
||||
Else
|
||||
@@ -645,13 +666,22 @@ Public Class MyTextBox
|
||||
Me.Text = Me.Text.Replace("/", ":")
|
||||
Dim regTime1 As New System.Text.RegularExpressions.Regex("^([0-1][0-9]|[2][0-3]):([0-5][0-9])$")
|
||||
Dim regTime2 As New System.Text.RegularExpressions.Regex("^([0-1][0-9]|[2][0-3]):([0-5][0-9]):([0-5][0-9])$")
|
||||
If regTime1.IsMatch(sender.Text) Then
|
||||
Me.Text += ":00"
|
||||
End If
|
||||
If regTime2.IsMatch(sender.Text) Then
|
||||
e.Cancel = False
|
||||
If _TimeOnly_Seconds Then
|
||||
|
||||
If regTime1.IsMatch(sender.Text) Then
|
||||
Me.Text += ":00"
|
||||
End If
|
||||
If regTime2.IsMatch(sender.Text) Then
|
||||
e.Cancel = False
|
||||
Else
|
||||
e.Cancel = True
|
||||
End If
|
||||
Else
|
||||
e.Cancel = True
|
||||
If regTime1.IsMatch(sender.Text) Then
|
||||
e.Cancel = False
|
||||
Else
|
||||
e.Cancel = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
If e.Cancel Then
|
||||
|
||||
@@ -567,6 +567,7 @@ Public Class SQL
|
||||
Case "VERAG" : conn = GetNewOpenConnectionFMZOLL()
|
||||
Case "SCANCANON" : conn = GetNewOpenConnectionSCANCANON()
|
||||
Case "WEB" : conn = GetNewOpenConnectionWEB()
|
||||
Case "FIBU", "SYSKA" : conn = GetNewOpenConnectionSYSKA()
|
||||
|
||||
End Select
|
||||
End If
|
||||
@@ -851,7 +852,8 @@ Public Class SQL
|
||||
dt.Load(dr)
|
||||
If dt.Rows.Count > 1 Then
|
||||
If VERAG_PROG_ALLGEMEIN.cAllgemein.ERR_OP_GLOBAL = VERAG_PROG_ALLGEMEIN.ERROR_OP.SHOW Then
|
||||
MsgBox("Die EORI-Nr. " & eori & " ist in " & dt.Rows.Count & " Kundenstammsätzen eingetragen.", vbCritical)
|
||||
' MsgBox("Die EORI-Nr. " & eori & " ist in " & dt.Rows.Count & " Kundenstammsätzen eingetragen.", vbCritical)
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR("Die EORI-Nr. " & eori & " ist in " & dt.Rows.Count & " Kundenstammsätzen eingetragen.", "", System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End If
|
||||
End If
|
||||
s = dt.Rows(0).Item(0)
|
||||
@@ -1102,7 +1104,8 @@ Public Class SQL
|
||||
dt.Load(dr)
|
||||
If dt.Rows.Count > 1 Then
|
||||
If VERAG_PROG_ALLGEMEIN.cAllgemein.ERR_OP_GLOBAL = VERAG_PROG_ALLGEMEIN.ERROR_OP.SHOW Then
|
||||
MsgBox("Die Zollnummer " & ZollNr & " ist in " & dt.Rows.Count & " Kundenstammsätzen eingetragen.", vbCritical)
|
||||
' MsgBox("Die Zollnummer " & ZollNr & " ist in " & dt.Rows.Count & " Kundenstammsätzen eingetragen.", vbCritical)
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR("Die Zollnummer " & ZollNr & " ist in " & dt.Rows.Count & " Kundenstammsätzen eingetragen.", "", System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End If
|
||||
End If
|
||||
s = dt.Rows(0).Item(0)
|
||||
|
||||
289
VERAG_PROG_ALLGEMEIN/Classes/cAPI.vb
Normal file
289
VERAG_PROG_ALLGEMEIN/Classes/cAPI.vb
Normal file
@@ -0,0 +1,289 @@
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Reflection
|
||||
Public Enum cAPI_Status
|
||||
[NEW] = 0 ' Neu, noch nicht verarbeitet
|
||||
OK = 1 ' Erfolg! :)
|
||||
ERR = 90 ' Fehlversuch :(
|
||||
ERR_FINAL = 99 'Hier sollte kein Verarbeitungs-Versuch mehr gestartet werden
|
||||
End Enum
|
||||
Public Enum cAPI_ART
|
||||
UNDEFINED = -1
|
||||
AVISO_OUT_STATUSMAIL = 1
|
||||
AVISO_OUT_BELEGMAIL = 2
|
||||
|
||||
'Public Const AVISO_MAIL_OUT_AVM = 5
|
||||
'Public Const AVISO_MAIL_OUT_ABD = 6
|
||||
'Public Const AVISO_MAIL_OUT_ZNV = 7
|
||||
'Public Const AVISO_MAIL_OUT_AVM = 8
|
||||
'Public Const AVISO_MAIL_OUT_AVM = 9
|
||||
|
||||
'Public Const AVISO_IN_NCTS = 10
|
||||
'Public Const AVISO_IN_EZA = 11
|
||||
|
||||
VERAG_OUT_NCTS = 10
|
||||
VERAG_OUT_EZA = 11
|
||||
|
||||
End Enum
|
||||
|
||||
Public Class cAPI_Type
|
||||
Public Const UNDEFINED = Nothing
|
||||
Public Const MAIL = "MAIL"
|
||||
Public Const FTP = "FTP"
|
||||
Public Const REST = "REST"
|
||||
End Class
|
||||
Public Class cAPI_INOUT
|
||||
Public Const UNDEFINED = Nothing
|
||||
Public Const [IN] = "IN"
|
||||
Public Const OUT = "OUT"
|
||||
End Class
|
||||
|
||||
Public Class cAPI
|
||||
Property api_id As Integer
|
||||
Property api_apiArt As cAPI_ART = -1
|
||||
Property api_apiUArt As Object = Nothing
|
||||
Property api_apiInfo As Object = Nothing
|
||||
Property api_apiZollStatus As Object = Nothing
|
||||
|
||||
|
||||
Property api_apiVersion As String = "1.0.0.0"
|
||||
Property api_InOut As String = cAPI_INOUT.UNDEFINED
|
||||
Property api_datetime As DateTime = Now
|
||||
Property api_status As cAPI_Status = cAPI_Status.[NEW]
|
||||
Property api_fehlversuch As Integer = 0
|
||||
Property api_progId As Integer = VERAG_PROG_ALLGEMEIN.cAllgemein.PROGID
|
||||
Property api_progName As String = VERAG_PROG_ALLGEMEIN.cAllgemein.PROGNAME
|
||||
Property api_progVersion As String = VERAG_PROG_ALLGEMEIN.cAllgemein.PROGVERSION
|
||||
Property api_Testsystem As Boolean = VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM
|
||||
Property api_Type As String = cAPI_Type.UNDEFINED
|
||||
Property api_EMailFrom As Object = Nothing
|
||||
Property api_EMail As Object = Nothing
|
||||
Property api_EMailCC As Object = Nothing
|
||||
Property api_EMailBCC As Object = Nothing
|
||||
Property api_EMailSubject As Object = Nothing
|
||||
Property api_EMailText As Object = Nothing
|
||||
Property api_EMailAttCnt As Object = Nothing
|
||||
|
||||
Property api_filepathSource As Object = Nothing
|
||||
Property api_filepathDestination As Object = Nothing
|
||||
|
||||
Property api_Firma As String = VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA
|
||||
Property api_MaId As String = VERAG_PROG_ALLGEMEIN.cAllgemein.USRID
|
||||
Property api_Username As String = If(VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME, "AUTO")
|
||||
Property api_Partnersystem As Object = Nothing
|
||||
Property api_Vorsystem As Object = Nothing
|
||||
|
||||
Property api_KundenNr As Object = Nothing
|
||||
Property api_AvisoId As Object = Nothing
|
||||
Property api_SendungsId As Object = Nothing
|
||||
Property api_FilialenNr As Object = Nothing
|
||||
Property api_AbfertigungsNr As Object = Nothing
|
||||
Property api_BezugsNr As Object = Nothing
|
||||
Property api_Zollbelegnummer As Object = Nothing
|
||||
Property api_finTstmp As Object = Nothing
|
||||
Property api_errTstmp As Object = Nothing
|
||||
Property api_errStack As Object = Nothing
|
||||
Property api_errMessage As Object = Nothing
|
||||
Property api_errMethodName As Object = Nothing
|
||||
|
||||
|
||||
|
||||
Public hasEntry = False
|
||||
|
||||
Dim SQL As New SQL
|
||||
|
||||
Sub New()
|
||||
api_progId = VERAG_PROG_ALLGEMEIN.cAllgemein.PROGID
|
||||
api_progName = VERAG_PROG_ALLGEMEIN.cAllgemein.PROGNAME
|
||||
api_progVersion = VERAG_PROG_ALLGEMEIN.cAllgemein.PROGVERSION
|
||||
api_Testsystem = VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM
|
||||
api_Firma = VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA
|
||||
api_MaId = VERAG_PROG_ALLGEMEIN.cAllgemein.USRID
|
||||
api_Username = If(VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME, "AUTO")
|
||||
End Sub
|
||||
|
||||
Sub New(api_id)
|
||||
Me.api_id = api_id
|
||||
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("api_id", api_id,, True))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_apiArt", api_apiArt))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_apiUArt", api_apiUArt))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_apiInfo", api_apiInfo))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_apiZollStatus", api_apiZollStatus))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_apiVersion", api_apiVersion))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_InOut", api_InOut))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_datetime", api_datetime))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_status", api_status))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_fehlversuch", api_fehlversuch))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_progId", api_progId))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_progName", api_progName))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_progVersion", api_progVersion))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_Testsystem", api_Testsystem))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_Type", api_Type)) 'MAIL; FTP; REST
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_EMailFrom", api_EMailFrom))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_EMail", api_EMail))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_EMailCC", api_EMailCC))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_EMailBCC", api_EMailBCC))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_EMailSubject", api_EMailSubject))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_EMailText", api_EMailText))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_EMailAttCnt", api_EMailAttCnt))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_filepathSource", api_filepathSource))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_filepathDestination", api_filepathDestination))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_Firma", api_Firma))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_MaId", api_MaId))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_Partnersystem", api_Partnersystem))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_Vorsystem", api_Vorsystem))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_KundenNr", api_KundenNr))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_AvisoId", api_AvisoId))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_SendungsId", api_SendungsId))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_FilialenNr", api_FilialenNr))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_AbfertigungsNr", api_AbfertigungsNr))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_BezugsNr", api_BezugsNr))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_Zollbelegnummer", api_Zollbelegnummer))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_finTstmp", api_finTstmp))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_errTstmp", api_errTstmp))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_errStack", api_errStack))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_errMessage", api_errMessage))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("api_errMethodName", api_errMethodName))
|
||||
Return list
|
||||
End Function
|
||||
|
||||
Public Shared Function INSERT_API(api_InOut As String, api_Type As String, api_apiArt As cAPI_ART, Optional api_apiUArt As Object = Nothing,
|
||||
Optional api_Partnersystem As Object = Nothing, Optional api_Vorsystem As Object = Nothing, Optional api_KundenNr As Object = Nothing,
|
||||
Optional api_AvisoId As Object = Nothing, Optional api_SendungsId As Object = Nothing, Optional api_FilialenNr As Object = Nothing,
|
||||
Optional api_AbfertigungsNr As Object = Nothing, Optional api_BezugsNr As Object = Nothing, Optional api_Zollbelegnummer As Object = Nothing) As cAPI
|
||||
|
||||
Dim API As New cAPI()
|
||||
API.api_apiArt = api_apiArt
|
||||
API.api_apiUArt = api_apiUArt
|
||||
API.api_InOut = api_InOut
|
||||
API.api_status = cAPI_Status.[NEW]
|
||||
API.api_Type = api_Type
|
||||
|
||||
API.api_Partnersystem = api_Partnersystem
|
||||
API.api_Vorsystem = api_Vorsystem
|
||||
API.api_KundenNr = api_KundenNr
|
||||
|
||||
API.api_AvisoId = api_AvisoId
|
||||
API.api_SendungsId = api_SendungsId
|
||||
API.api_FilialenNr = api_FilialenNr
|
||||
API.api_AbfertigungsNr = api_AbfertigungsNr
|
||||
API.api_BezugsNr = api_BezugsNr
|
||||
API.api_Zollbelegnummer = api_Zollbelegnummer
|
||||
|
||||
API.SAVE()
|
||||
|
||||
Return API
|
||||
End Function
|
||||
|
||||
|
||||
Public Sub UPDTAE_ERR(Optional api_errStack = Nothing, Optional api_errMessage = Nothing, Optional api_errMethodName = Nothing)
|
||||
Me.api_status = cAPI_Status.ERR
|
||||
Me.api_errTstmp = Now
|
||||
Me.api_errStack = If(api_errStack, Me.api_errStack)
|
||||
Me.api_errMessage = If(api_errMessage, Me.api_errMessage)
|
||||
Me.api_errMethodName = If(api_errMethodName, Me.api_errMethodName)
|
||||
Me.api_fehlversuch += 1
|
||||
Me.SAVE()
|
||||
End Sub
|
||||
Public Sub UPDTAE_OK(Optional api_status = 1, Optional api_filepathDestination = Nothing)
|
||||
Me.api_status = cAPI_Status.OK
|
||||
Me.api_finTstmp = Now
|
||||
Me.api_filepathDestination = If(api_filepathDestination, Me.api_filepathDestination)
|
||||
Me.api_EMail = If(api_EMail, Me.api_EMail)
|
||||
Me.api_EMailCC = If(api_EMailCC, Me.api_EMailCC)
|
||||
Me.api_EMailBCC = If(api_EMailBCC, Me.api_EMailBCC)
|
||||
Me.api_EMailSubject = If(api_EMailSubject, Me.api_EMailSubject)
|
||||
Me.api_EMailText = If(api_EMailText, Me.api_EMailText)
|
||||
Me.api_EMailAttCnt = If(api_EMailAttCnt, Me.api_EMailAttCnt)
|
||||
Me.SAVE()
|
||||
End Sub
|
||||
|
||||
Public Function SAVE() As Boolean
|
||||
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
|
||||
|
||||
Dim sqlstr = " BEGIN TRAN IF EXISTS(SELECT * FROM tblAPI WHERE api_id=@api_id) " &
|
||||
" BEGIN " & getUpdateCmd() & " END " &
|
||||
" Else " &
|
||||
" BEGIN " & getInsertCmd() & " END " &
|
||||
" commit tran "
|
||||
|
||||
api_id = SQL.doSQLVarListID(api_id, sqlstr, "ADMIN", , list)
|
||||
hasEntry = api_id > 0
|
||||
Return api_id > 0
|
||||
|
||||
End Function
|
||||
|
||||
Public Sub LOAD()
|
||||
Try
|
||||
hasEntry = False
|
||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionADMIN()
|
||||
Using cmd As New SqlCommand("SELECT * FROM tblAPI WHERE api_id=@api_id ", conn)
|
||||
cmd.Parameters.AddWithValue("@api_id", api_id)
|
||||
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
|
||||
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 [tblAPI] SET " & str & " WHERE api_id=@api_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 tblAPI (" & 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
|
||||
|
||||
End Class
|
||||
@@ -25,6 +25,10 @@ Public Class cAvisoBenachrichtigungen
|
||||
Property ab_Cluster As Object = Nothing
|
||||
Property ab_collAnhId As Object = Nothing
|
||||
Property ab_Vermerk As Object = Nothing
|
||||
Property ab_ReminderVermerkID As Object = Nothing
|
||||
Property ab_ReminderVermerkCode As Object = Nothing
|
||||
|
||||
|
||||
|
||||
Shared SQL As New SQL
|
||||
|
||||
@@ -43,9 +47,11 @@ Public Class cAvisoBenachrichtigungen
|
||||
LOAD()
|
||||
End Sub
|
||||
|
||||
Public Shared Function INSERT_BENACHRICHTIGUNG(ab_AvisoID As Integer, ab_SendungID As Object, ab_BenachrichtigungCode As Integer, Optional ab_TO_Art As Object = Nothing, Optional ab_TO_Code As Object = Nothing, Optional ab_Beschreibung As String = "", Optional ab_Prioritaet As Integer = 0, Optional ab_collAnhId As String = "", Optional ab_Vermerk As String = "") As Boolean
|
||||
Public Shared Function INSERT_BENACHRICHTIGUNG(ab_AvisoID As Integer, ab_SendungID As Object, ab_BenachrichtigungCode As Integer, Optional ab_TO_Art As Object = Nothing, Optional ab_TO_Code As Object = Nothing, Optional ab_Beschreibung As String = "", Optional ab_Prioritaet As Integer = 0, Optional ab_collAnhId As String = "", Optional ab_Vermerk As String = "", Optional [ab_ReminderVermerkID] As Object = Nothing, Optional [ab_ReminderVermerkCode] As Object = Nothing, Optional FirmaTmp As Object = Nothing) As Boolean
|
||||
Dim AB As New cAvisoBenachrichtigungen
|
||||
|
||||
|
||||
|
||||
AB.ab_AvisoID = ab_AvisoID
|
||||
If ab_SendungID IsNot Nothing AndAlso ab_SendungID > 0 Then
|
||||
AB.ab_SendungID = ab_SendungID
|
||||
@@ -66,8 +72,11 @@ Public Class cAvisoBenachrichtigungen
|
||||
AB.ab_Prioritaet = ab_Prioritaet
|
||||
AB.ab_Mitarbeiter = If(VERAG_PROG_ALLGEMEIN.cAllgemein.USRNAME, "AUTO")
|
||||
AB.ab_MitarbeiterId = VERAG_PROG_ALLGEMEIN.cAllgemein.USRID
|
||||
AB.ab_ReminderVermerkID = ab_ReminderVermerkID
|
||||
AB.ab_ReminderVermerkCode = ab_ReminderVermerkCode
|
||||
|
||||
AB.ab_Firma = VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA
|
||||
|
||||
AB.ab_Firma = If(FirmaTmp, VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA)
|
||||
AB.ab_Cluster = VERAG_PROG_ALLGEMEIN.cAllgemein.CLUSTER
|
||||
AB.ab_Vermerk = ab_Vermerk
|
||||
AB.ab_collAnhId = ab_collAnhId
|
||||
@@ -126,6 +135,9 @@ Public Class cAvisoBenachrichtigungen
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ab_Cluster", ab_Cluster))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ab_collAnhId", ab_collAnhId))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ab_Vermerk", ab_Vermerk))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ab_ReminderVermerkCode", ab_ReminderVermerkCode))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ab_ReminderVermerkID", ab_ReminderVermerkID))
|
||||
|
||||
|
||||
Return list
|
||||
End Function
|
||||
|
||||
190
VERAG_PROG_ALLGEMEIN/Classes/cBesuchsbericht.vb
Normal file
190
VERAG_PROG_ALLGEMEIN/Classes/cBesuchsbericht.vb
Normal file
@@ -0,0 +1,190 @@
|
||||
|
||||
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Reflection
|
||||
|
||||
Public Class cBesuchsbericht
|
||||
Property bb_Id As Object = Nothing
|
||||
Property bb_DatumErfassung As Date = Now
|
||||
Property bb_DatumBesuch As Object = Nothing
|
||||
Property bb_Sachbearbeiter As Object = Nothing
|
||||
Property bb_SachbearbeiterId As Integer
|
||||
Property bb_Teilnehmer As Object = Nothing
|
||||
Property bb_Kontaktart As Object = Nothing
|
||||
Property bb_Firma As Object = Nothing
|
||||
Property bb_Kunde As Object = Nothing
|
||||
Property bb_KundenNr As Object = Nothing
|
||||
Property bb_Geschaeftsfuehrer As Object = Nothing
|
||||
Property bb_Umsatz As Object = Nothing
|
||||
Property bb_Anpsprechpartner As Object = Nothing
|
||||
Property bb_Telefon As Object = Nothing
|
||||
Property bb_Mail As Object = Nothing
|
||||
Property bb_FuhrparkEigentum As Object = Nothing
|
||||
Property bb_FuhrparkLeasing As Object = Nothing
|
||||
Property bb_LKW_Plane As Boolean = False
|
||||
Property bb_LKW_Kuehltranporte As Boolean = False
|
||||
Property bb_LKW_Sonsertransporte As Boolean = False
|
||||
Property bb_LKW_Sprinter As Boolean = False
|
||||
Property bb_LKW_SiloTank As Boolean = False
|
||||
Property bb_Auftraggeber As Object = Nothing
|
||||
Property bb_Route As Object = Nothing
|
||||
Property bb_DerzeitigerLieferant As Object = Nothing
|
||||
Property bb_Zufrieden As Object = Nothing
|
||||
Property bb_ZufriedenNEIN As Object = Nothing
|
||||
Property bb_Garantie As Object = Nothing
|
||||
Property bb_Interesse_Zollabfertigung As Boolean = False
|
||||
Property bb_Interesse_Brexit As Boolean = False
|
||||
Property bb_Interesse_Parkplatz As Boolean = False
|
||||
Property bb_Interesse_LagerUmschlag As Boolean = False
|
||||
Property bb_Interesse_Rola As Boolean = False
|
||||
Property bb_Interesse_YesMoney As Boolean = False
|
||||
Property bb_Interesse_Ferry As Boolean = False
|
||||
Property bb_Vermerk As Object = Nothing
|
||||
|
||||
Public hasEntry = False
|
||||
|
||||
Dim SQL As New SQL
|
||||
|
||||
Sub New()
|
||||
bb_Garantie = VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA
|
||||
|
||||
End Sub
|
||||
Sub New(bb_Id)
|
||||
Me.bb_Id = bb_Id
|
||||
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("bb_Id", bb_Id,, True))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_Firma", bb_Firma)) 'Object = Nothing
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_DatumErfassung", bb_DatumErfassung)) 'Object = Nothing
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_DatumBesuch", bb_DatumBesuch)) 'Object = Nothing
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_Sachbearbeiter", bb_Sachbearbeiter)) 'Object = Nothing
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_SachbearbeiterId", bb_SachbearbeiterId)) 'Integer
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_Teilnehmer", bb_Teilnehmer)) 'Object = Nothing
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_Kontaktart", bb_Kontaktart)) 'Object = Nothing
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_Kunde", bb_Kunde)) 'Object = Nothing
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_KundenNr", bb_KundenNr)) 'Object = Nothing
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_Geschaeftsfuehrer", bb_Geschaeftsfuehrer)) 'Object = Nothing
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_Umsatz", bb_Umsatz)) 'Object = Nothing
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_Anpsprechpartner", bb_Anpsprechpartner)) 'Object = Nothing
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_Telefon", bb_Telefon)) 'Object = Nothing
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_Mail", bb_Mail)) 'Object = Nothing
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_FuhrparkEigentum", bb_FuhrparkEigentum)) 'Object = Nothing
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_FuhrparkLeasing", bb_FuhrparkLeasing)) 'Object = Nothing
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_LKW_Plane", bb_LKW_Plane)) 'Boolean = False
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_LKW_Kuehltranporte", bb_LKW_Kuehltranporte)) 'Boolean = False
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_LKW_Sonsertransporte", bb_LKW_Sonsertransporte)) 'Boolean = False
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_LKW_Sprinter", bb_LKW_Sprinter)) 'Boolean = False
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_LKW_SiloTank", bb_LKW_SiloTank)) 'Boolean = False
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_Auftraggeber", bb_Auftraggeber)) 'Object = Nothing
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_Route", bb_Route)) 'Object = Nothing
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_DerzeitigerLieferant", bb_DerzeitigerLieferant)) 'Object = Nothing
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_Zufrieden", bb_Zufrieden)) 'Object = Nothing
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_ZufriedenNEIN", bb_ZufriedenNEIN)) 'Object = Nothing
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_Garantie", bb_Garantie)) 'Object = Nothing
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_Interesse_Zollabfertigung", bb_Interesse_Zollabfertigung)) 'Boolean = False
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_Interesse_Brexit", bb_Interesse_Brexit)) 'Boolean = False
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_Interesse_Parkplatz", bb_Interesse_Parkplatz)) 'Boolean = False
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_Interesse_LagerUmschlag", bb_Interesse_LagerUmschlag)) 'Boolean = False
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_Interesse_Rola", bb_Interesse_Rola)) 'Boolean = False
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_Interesse_YesMoney", bb_Interesse_YesMoney)) 'Boolean = False
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_Interesse_Ferry", bb_Interesse_Ferry)) 'Boolean = False
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("bb_Vermerk", bb_Vermerk)) 'Object = Nothing
|
||||
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 tblBesuchsberichte WHERE bb_Id=@bb_Id) " &
|
||||
" BEGIN " & getUpdateCmd() & " END " &
|
||||
" Else " &
|
||||
" BEGIN " & getInsertCmd() & " END " &
|
||||
" commit tran "
|
||||
|
||||
bb_Id = SQL.doSQLVarListID(bb_Id, sqlstr, "FMZOLL", , list)
|
||||
Return (bb_Id > 0)
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
Public Shared Function DELETE(bb_Id As Integer) As Boolean
|
||||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
Return SQL.doSQL("DELETE FROM tblBesuchsberichte WHERE bb_Id=" & bb_Id)
|
||||
End Function
|
||||
|
||||
Public Sub LOAD()
|
||||
Try
|
||||
hasEntry = False
|
||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
||||
Using cmd As New SqlCommand("SELECT * FROM tblBesuchsberichte WHERE bb_Id=@bb_Id ", conn)
|
||||
cmd.Parameters.AddWithValue("@bb_Id", bb_Id)
|
||||
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
|
||||
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 [tblBesuchsberichte] SET " & str & " WHERE bb_Id=@bb_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 tblBesuchsberichte (" & 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
|
||||
|
||||
End Class
|
||||
|
||||
23
VERAG_PROG_ALLGEMEIN/Classes/cChilkat_Helper.vb
Normal file
23
VERAG_PROG_ALLGEMEIN/Classes/cChilkat_Helper.vb
Normal file
@@ -0,0 +1,23 @@
|
||||
Public Class cChilkat_Helper
|
||||
Public Shared Sub UnlockCilkat()
|
||||
Dim glob As Chilkat.[Global] = New Chilkat.[Global]()
|
||||
Dim success As Boolean = glob.UnlockBundle("VERAGS.CB1122022_JJ6kgS2zoR0g")
|
||||
|
||||
If success <> True Then
|
||||
Debug.WriteLine(glob.LastErrorText)
|
||||
Return
|
||||
End If
|
||||
|
||||
Dim status As Integer = glob.UnlockStatus
|
||||
|
||||
If status = 2 Then
|
||||
Debug.WriteLine("Unlocked using purchased unlock code.")
|
||||
Else
|
||||
Debug.WriteLine("Unlocked in trial mode.")
|
||||
End If
|
||||
|
||||
Debug.WriteLine(glob.LastErrorText)
|
||||
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
@@ -113,7 +113,7 @@ Public Class cEmailBenachrichtigung
|
||||
End Function
|
||||
|
||||
|
||||
Shared Sub eMails_einlesen(Kdnr As String, art As Integer, ByRef Emails As String, ByRef Emails_CC As String, ByRef Emails_BCC As String, Emails_list_sent As VERAG_PROG_ALLGEMEIN.cEmailBenachrichtigungList)
|
||||
Shared Sub eMails_einlesen(Kdnr As String, art As Integer, ByRef Emails As String, ByRef Emails_CC As String, ByRef Emails_BCC As String, ByRef Emails_list_sent As VERAG_PROG_ALLGEMEIN.cEmailBenachrichtigungList)
|
||||
'ART:
|
||||
'1=Ankunft
|
||||
'2=Freigabe
|
||||
@@ -140,11 +140,11 @@ Public Class cEmailBenachrichtigung
|
||||
'Dim Emails As String
|
||||
For Each i In Kdnr_Mails.LIST
|
||||
If i.eb_bcc Then
|
||||
If Not existing(Kdnr, i.eb_EMail, Emails_BCC_list.LIST, Emails_CC_list.LIST, Emails_list.LIST) And Not existing(Kdnr, i.eb_EMail, Emails_list_sent.LIST) Then Emails_BCC_list.LIST.Add(i) ' &= i.eb_EMail & ";"
|
||||
If Not existing(Kdnr, i.eb_EMail, Emails_BCC_list.LIST, Emails_CC_list.LIST, Emails_list.LIST) And Not existingWOKdNr(i.eb_EMail, Emails_list_sent.LIST) Then Emails_BCC_list.LIST.Add(i) ' &= i.eb_EMail & ";"
|
||||
ElseIf i.eb_cc Then
|
||||
If Not existing(Kdnr, i.eb_EMail, Emails_BCC_list.LIST, Emails_CC_list.LIST, Emails_list.LIST) And Not existing(Kdnr, i.eb_EMail, Emails_list_sent.LIST) Then Emails_CC_list.LIST.Add(i) ' &= i.eb_EMail & ";"
|
||||
If Not existing(Kdnr, i.eb_EMail, Emails_BCC_list.LIST, Emails_CC_list.LIST, Emails_list.LIST) And Not existingWOKdNr(i.eb_EMail, Emails_list_sent.LIST) Then Emails_CC_list.LIST.Add(i) ' &= i.eb_EMail & ";"
|
||||
Else
|
||||
If Not existing(Kdnr, i.eb_EMail, Emails_BCC_list.LIST, Emails_CC_list.LIST, Emails_list.LIST) And Not existing(Kdnr, i.eb_EMail, Emails_list_sent.LIST) Then Emails_list.LIST.Add(i) ' &= i.eb_EMail & ";"
|
||||
If Not existing(Kdnr, i.eb_EMail, Emails_BCC_list.LIST, Emails_CC_list.LIST, Emails_list.LIST) And Not existingWOKdNr(i.eb_EMail, Emails_list_sent.LIST) Then Emails_list.LIST.Add(i) ' &= i.eb_EMail & ";"
|
||||
End If
|
||||
Next
|
||||
'For Each i In Fraechter_Mails.LIST
|
||||
@@ -184,7 +184,7 @@ Public Class cEmailBenachrichtigung
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Shared Sub eMails_einlesenOLD(hFrächter_kdnr As String, hAuftraggeber_kdnr As String, art As Integer, ByRef Emails As String, ByRef Emails_CC As String, ByRef Emails_BCC As String, Emails_list_sent As VERAG_PROG_ALLGEMEIN.cEmailBenachrichtigungList)
|
||||
Shared Sub eMails_einlesenOLD(hFrächter_kdnr As String, hAuftraggeber_kdnr As String, art As Integer, ByRef Emails As String, ByRef Emails_CC As String, ByRef Emails_BCC As String, ByRef Emails_list_sent As VERAG_PROG_ALLGEMEIN.cEmailBenachrichtigungList)
|
||||
'ART:
|
||||
'1=Ankunft
|
||||
'2=Freigabe
|
||||
@@ -258,5 +258,23 @@ Public Class cEmailBenachrichtigung
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
Shared Function existingWOKdNr(Email As String, Emails_list As List(Of VERAG_PROG_ALLGEMEIN.cEmailBenachrichtigung), Optional ListEmails_CC_list As List(Of VERAG_PROG_ALLGEMEIN.cEmailBenachrichtigung) = Nothing, Optional ListEmails_BCC_list As List(Of VERAG_PROG_ALLGEMEIN.cEmailBenachrichtigung) = Nothing) As Boolean
|
||||
If Emails_list IsNot Nothing Then
|
||||
For Each i In Emails_list
|
||||
If i.eb_EMail = Email Then Return True
|
||||
Next
|
||||
End If
|
||||
If ListEmails_CC_list IsNot Nothing Then
|
||||
For Each i In ListEmails_CC_list
|
||||
If i.eb_EMail = Email Then Return True
|
||||
Next
|
||||
End If
|
||||
If ListEmails_BCC_list IsNot Nothing Then
|
||||
For Each i In ListEmails_BCC_list
|
||||
If i.eb_EMail = Email Then Return True
|
||||
Next
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
649
VERAG_PROG_ALLGEMEIN/Classes/cGVMS.vb
Normal file
649
VERAG_PROG_ALLGEMEIN/Classes/cGVMS.vb
Normal file
@@ -0,0 +1,649 @@
|
||||
|
||||
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Reflection
|
||||
|
||||
Public Class cGVMS
|
||||
Property gvms_id As Integer
|
||||
Property gvms_datetime As DateTime = Now
|
||||
Property gvms_firma As String
|
||||
Property gvms_notification_id As Object = Nothing
|
||||
Property gvms_notification_boxid As Object = Nothing
|
||||
Property gvms_status As Object = Nothing
|
||||
Property gvms_GMR As Object = Nothing
|
||||
Property gvms_gmr_creationDate As Object = Nothing
|
||||
Property gvms_gmr_statusVersion As Object = Nothing
|
||||
|
||||
Property gvms_routeId As Integer = -1
|
||||
Property gvms_direction As String
|
||||
Property gvms_vehicleRegNum As String
|
||||
Property gvms_trailorRegNum As Object = Nothing
|
||||
Property gvms_isUnaccompanied As Object = Nothing
|
||||
Property gvms_empty As Object = Nothing
|
||||
Property gvms_emptyisOwn As Object = Nothing
|
||||
|
||||
Property gvms_SS As Object = Nothing
|
||||
Property gvms_locateDateTimeOfDeparture As Object = Nothing
|
||||
|
||||
|
||||
Public GVMS_POSITIONEN As New List(Of cGVMS_POS)
|
||||
|
||||
|
||||
Public hasEntry As Boolean = False
|
||||
|
||||
Dim SQL As New SQL
|
||||
|
||||
|
||||
Sub New()
|
||||
End Sub
|
||||
Sub New(gvms_id)
|
||||
Me.gvms_id = gvms_id
|
||||
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("gvms_id", gvms_id,, True))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("gvms_datetime", gvms_datetime))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("gvms_firma", gvms_firma))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("gvms_notification_id", gvms_notification_id))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("gvms_notification_boxid", gvms_notification_boxid))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("gvms_status", gvms_status))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("gvms_GMR", gvms_GMR))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("gvms_gmr_creationDate", gvms_gmr_creationDate))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("gvms_gmr_statusVersion", gvms_gmr_statusVersion))
|
||||
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("gvms_routeId", gvms_routeId))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("gvms_direction", gvms_direction))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("gvms_vehicleRegNum", gvms_vehicleRegNum))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("gvms_trailorRegNum", gvms_trailorRegNum))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("gvms_isUnaccompanied", gvms_isUnaccompanied))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("gvms_empty", gvms_empty))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("gvms_emptyisOwn", gvms_emptyisOwn))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("gvms_SS", gvms_SS))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("gvms_locateDateTimeOfDeparture", gvms_locateDateTimeOfDeparture))
|
||||
|
||||
Return list
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public Function SAVE(Optional saveAll = True) As Boolean
|
||||
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
|
||||
|
||||
Dim sqlstr = " BEGIN TRAN IF EXISTS(SELECT * FROM tblGVMS WHERE gvms_id=@gvms_id) " &
|
||||
" BEGIN " & getUpdateCmd() & " END " &
|
||||
" Else " &
|
||||
" BEGIN " & getInsertCmd() & " END " &
|
||||
" commit tran "
|
||||
|
||||
Me.gvms_id = SQL.doSQLVarListID(gvms_id, sqlstr, "FMZOLL", , list)
|
||||
If gvms_id > 0 And saveAll Then
|
||||
SAVE_POSITIONEN()
|
||||
End If
|
||||
Return (gvms_id > 0)
|
||||
End Function
|
||||
|
||||
|
||||
Public Function SAVE_POSITIONEN() As Boolean
|
||||
'Zuserst alle OffertenPos von dem Offert löschen
|
||||
If DELETE_Warenpositionen() Then 'And DELETE_WarenpositionUnterlagen() Then
|
||||
'jetzt die Standartofferten einfügen
|
||||
For Each p In GVMS_POSITIONEN
|
||||
p.gvmsPos_gvmsId = gvms_id
|
||||
p.INSERT()
|
||||
Next
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Function DELETE_Warenpositionen() As Boolean 'obj As Object, tablename As String, where As String) As Boolean
|
||||
Dim sqlstr = " DELETE FROM [tblGVMS_Pos] WHERE gvmsPos_gvmsId=" & Me.gvms_id & " "
|
||||
' MsgBox(sqlstr)
|
||||
Return SQL.doSQL(sqlstr, "FMZOLL")
|
||||
End Function
|
||||
|
||||
Public Sub LOAD()
|
||||
Try
|
||||
hasEntry = False
|
||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
||||
Using cmd As New SqlCommand("SELECT * FROM tblGVMS WHERE gvms_id=@gvms_id ", conn)
|
||||
cmd.Parameters.AddWithValue("@gvms_id", gvms_id)
|
||||
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
|
||||
MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Shared Function LOAD_ByNotification(gvms_notification_boxid, gvms_notification_id) As cGVMS
|
||||
|
||||
Try
|
||||
Dim GVMS As New cGVMS
|
||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
||||
Using cmd As New SqlCommand("SELECT * FROM tblGVMS WHERE gvms_notification_boxid=@gvms_notification_boxid AND gvms_notification_id=@gvms_notification_id ", conn)
|
||||
cmd.Parameters.AddWithValue("@gvms_notification_id", gvms_notification_id)
|
||||
cmd.Parameters.AddWithValue("@gvms_notification_boxid", gvms_notification_boxid)
|
||||
Dim dr = cmd.ExecuteReader()
|
||||
If dr.Read Then
|
||||
For Each li In GVMS.getParameterList()
|
||||
Dim propInfo As PropertyInfo = GVMS.GetType.GetProperty(li.Scalarvariable)
|
||||
|
||||
If dr.Item(li.Text) Is DBNull.Value Then
|
||||
propInfo.SetValue(GVMS, Nothing)
|
||||
Else
|
||||
propInfo.SetValue(GVMS, dr.Item(li.Text))
|
||||
End If
|
||||
|
||||
Next
|
||||
GVMS.hasEntry = True
|
||||
dr.Close()
|
||||
Return GVMS
|
||||
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 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 [tblGVMS] SET " & str & " WHERE gvms_id=@gvms_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 tblGVMS (" & 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
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Public Class cGVMS_POS
|
||||
Property gvmsPos_id As Integer
|
||||
Property gvmsPos_gvmsId As Integer
|
||||
Property gvms_art As String
|
||||
Property gvms_RefNum As String
|
||||
Property gvms_SS As Object = Nothing
|
||||
|
||||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
|
||||
Sub New()
|
||||
' Me.nctsWpUl_nctsWPId = nctsWpUl_nctsWPId
|
||||
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("gvmsPos_id", gvmsPos_id, , True, True))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("gvmsPos_gvmsId", gvmsPos_gvmsId))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("gvms_art", gvms_art))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("gvms_RefNum", gvms_RefNum))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("gvms_SS", gvms_SS))
|
||||
Return list
|
||||
End Function
|
||||
|
||||
|
||||
Public Function INSERT() As Boolean
|
||||
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
|
||||
gvmsPos_id = SQL.doSQLVarListID(gvmsPos_id, getInsertCmd(), "FMZOLL", , list)
|
||||
Return gvmsPos_id > 0
|
||||
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 tblGVMS_Pos (" & 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
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Public Class cGVMS_POS_DecArt
|
||||
Public Shared EIDR As String = "EIDR"
|
||||
Public Shared EXPORT As String = "EXPORT"
|
||||
Public Shared IMPORT As String = "IMPORT"
|
||||
Public Shared TAD As String = "TAD"
|
||||
Public Shared TSAD As String = "TSAD"
|
||||
Public Shared ATA As String = "ATA"
|
||||
Public Shared TIR As String = "TIR"
|
||||
Public Shared ORAL As String = "ORAL"
|
||||
Public Shared INDIRECT As String = "INDIRECT"
|
||||
End Class
|
||||
Public Class cGVMS_Carriers
|
||||
Property carrierId As Integer
|
||||
Property carrierName As Object = Nothing
|
||||
Property countryCode As Object = Nothing
|
||||
|
||||
Public hasEntry = False
|
||||
|
||||
Dim SQL As New SQL
|
||||
|
||||
Sub New()
|
||||
End Sub
|
||||
Sub New(carrierId)
|
||||
Me.carrierId = carrierId
|
||||
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("carrierId", carrierId))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("carrierName", carrierName))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("countryCode", countryCode))
|
||||
|
||||
Return list
|
||||
End Function
|
||||
|
||||
|
||||
Shared Function DELETE_ALL() As Boolean
|
||||
Dim SQL As New SQL
|
||||
Return SQL.doSQL(" DELETE FROM tblGVMS_Carriers", "FMZOLL")
|
||||
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 tblGVMS_Carriers WHERE carrierId=@carrierId) " &
|
||||
" BEGIN " & getUpdateCmd() & " END " &
|
||||
" Else " &
|
||||
" BEGIN " & getInsertCmd() & " END " &
|
||||
" commit tran "
|
||||
|
||||
Return SQL.doSQLVarList(sqlstr, "FMZOLL", , list)
|
||||
End Function
|
||||
|
||||
Public Sub LOAD()
|
||||
Try
|
||||
hasEntry = False
|
||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
||||
Using cmd As New SqlCommand("SELECT * FROM tblGVMS_Carriers WHERE carrierId=@carrierId ", conn)
|
||||
cmd.Parameters.AddWithValue("@carrierId", carrierId)
|
||||
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
|
||||
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 [tblGVMS_Carriers] SET " & str & " WHERE carrierId=@carrierId ")
|
||||
|
||||
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 tblGVMS_Carriers (" & 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
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
|
||||
Public Class cGVMS_Routes
|
||||
Property routeId As Integer
|
||||
Property routeDirection As String
|
||||
Property routeEffectiveFrom As Object = Nothing
|
||||
Property departurePortId As Object = Nothing
|
||||
Property arrivalPortId As Object = Nothing
|
||||
Property carrierId As Object = Nothing
|
||||
Property routeEffectiveTo As Object = Nothing
|
||||
|
||||
|
||||
Public hasEntry = False
|
||||
|
||||
Dim SQL As New SQL
|
||||
Sub New()
|
||||
End Sub
|
||||
Sub New(routeId)
|
||||
Me.routeId = routeId
|
||||
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("routeId", routeId))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("routeDirection", routeDirection))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("routeEffectiveFrom", routeEffectiveFrom))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("departurePortId", departurePortId))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("arrivalPortId", arrivalPortId))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("carrierId", carrierId))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("routeEffectiveTo", routeEffectiveTo))
|
||||
|
||||
Return list
|
||||
End Function
|
||||
|
||||
Shared Function DELETE_ALL() As Boolean
|
||||
Dim SQL As New SQL
|
||||
Return SQL.doSQL(" DELETE FROM tblGVMS_Routes", "FMZOLL")
|
||||
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 tblGVMS_Routes WHERE routeId=@routeId) " &
|
||||
" BEGIN " & getUpdateCmd() & " END " &
|
||||
" Else " &
|
||||
" BEGIN " & getInsertCmd() & " END " &
|
||||
" commit tran "
|
||||
|
||||
Return SQL.doSQLVarList(sqlstr, "FMZOLL", , list)
|
||||
End Function
|
||||
|
||||
Public Sub LOAD()
|
||||
Try
|
||||
hasEntry = False
|
||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
||||
Using cmd As New SqlCommand("SELECT * FROM tblGVMS_Routes WHERE routeId=@routeId ", conn)
|
||||
cmd.Parameters.AddWithValue("@routeId", routeId)
|
||||
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
|
||||
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 [tblGVMS_Routes] SET " & str & " WHERE routeId=@routeId ")
|
||||
|
||||
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 tblGVMS_Routes (" & 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
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
|
||||
Public Class cGVMS_Ports
|
||||
Property portId As Integer
|
||||
Property portDescription As String
|
||||
Property portRegion As Object = Nothing
|
||||
Property portEffectiveFrom As Object = Nothing
|
||||
Property chiefPortCode As Object = Nothing
|
||||
Property cdsPortCode As Object = Nothing
|
||||
Property officeOfTransitCustomsOfficeCode As Object = Nothing
|
||||
Property portEffectiveTo As Object = Nothing
|
||||
Property portCountryCode As Object = Nothing
|
||||
Property isOperatingArrivedExportsProcess As Boolean
|
||||
|
||||
|
||||
Public hasEntry = False
|
||||
|
||||
Dim SQL As New SQL
|
||||
|
||||
Sub New()
|
||||
End Sub
|
||||
Sub New(portId)
|
||||
Me.portId = portId
|
||||
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("portId", portId))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("portDescription", portDescription))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("portRegion", portRegion))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("portEffectiveFrom", portEffectiveFrom))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("chiefPortCode", chiefPortCode))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("cdsPortCode", cdsPortCode))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("officeOfTransitCustomsOfficeCode", officeOfTransitCustomsOfficeCode))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("portEffectiveTo", portEffectiveTo))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("portCountryCode", portCountryCode))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("isOperatingArrivedExportsProcess", isOperatingArrivedExportsProcess))
|
||||
|
||||
|
||||
Return list
|
||||
End Function
|
||||
|
||||
Shared Function DELETE_ALL() As Boolean
|
||||
Dim SQL As New SQL
|
||||
Return SQL.doSQL(" DELETE FROM tblGVMS_Ports", "FMZOLL")
|
||||
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 tblGVMS_Ports WHERE portId=@portId) " &
|
||||
" BEGIN " & getUpdateCmd() & " END " &
|
||||
" Else " &
|
||||
" BEGIN " & getInsertCmd() & " END " &
|
||||
" commit tran "
|
||||
|
||||
Return SQL.doSQLVarList(sqlstr, "FMZOLL", , list)
|
||||
End Function
|
||||
|
||||
Public Sub LOAD()
|
||||
Try
|
||||
hasEntry = False
|
||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
||||
Using cmd As New SqlCommand("SELECT * FROM tblGVMS_Ports WHERE portId=@portId ", conn)
|
||||
cmd.Parameters.AddWithValue("@portId", portId)
|
||||
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
|
||||
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 [tblGVMS_Ports] SET " & str & " WHERE portId=@portId ")
|
||||
|
||||
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 tblGVMS_Ports (" & 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
|
||||
|
||||
End Class
|
||||
@@ -37,6 +37,7 @@ Public Class cKundenErweitert
|
||||
Property EmailFreigabe_SteuerbescheidPDF_Bedingung As Integer
|
||||
|
||||
Property EmailFreigabe_Art As String = "FG" ' STB/VBD/.. bei Freigabe ; BLG --> wenn Beleg da ist.
|
||||
Property EmailFreigabe_Export_Art As String = "FG" ' STB/VBD/.. bei Freigabe ; BLG --> wenn Beleg da ist.
|
||||
Property EmailFreigabe_VBDPDF As Boolean = False
|
||||
Property EmailFreigabe_ABDPDF As Boolean = False
|
||||
Property Email_AVM As Boolean = False
|
||||
@@ -105,6 +106,7 @@ Public Class cKundenErweitert
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("EmailFreigabe_SteuerbescheidPDF", EmailFreigabe_SteuerbescheidPDF))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("EmailFreigabe_SteuerbescheidPDF_Bedingung", EmailFreigabe_SteuerbescheidPDF_Bedingung))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("EmailFreigabe_Art", EmailFreigabe_Art))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("EmailFreigabe_Export_Art", EmailFreigabe_Export_Art))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("EmailFreigabe_VBDPDF", EmailFreigabe_VBDPDF))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("EmailFreigabe_ABDPDF", EmailFreigabe_ABDPDF))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Email_AVM", Email_AVM))
|
||||
|
||||
@@ -657,6 +657,12 @@ Public Class cMessenger
|
||||
End Function
|
||||
|
||||
|
||||
Public Function DELETE_MESSAGE() As Boolean
|
||||
chatMg_type = "DEL_" & chatMg_type
|
||||
Me.DELETE_STATUS() 'Alle Statuseinträge löschen
|
||||
Return SAVE(False)
|
||||
End Function
|
||||
|
||||
Public Function DELETE([chatMgSt_MaId]) As Boolean 'obj As Object, tablename As String, where As String) As Boolean
|
||||
Dim sqlstr = " DELETE FROM tblMessenger_ChatMessages WHERE [chatMg_id]=" & Me.chatMg_id & " "
|
||||
Return SQL.doSQL(sqlstr, "ADMIN")
|
||||
@@ -703,6 +709,16 @@ Public Class cMessenger
|
||||
MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Sub DELETE_STATUS()
|
||||
Try
|
||||
If SQL.doSQL("DELETE FROM tblMessenger_ChatMessageStatus WHERE chatMgSt_chatMsgId='" & Me.chatMg_id & "'", "ADMIN") Then
|
||||
Me.CHAT_MESSAGES_STATUS_LIST.Clear()
|
||||
End If
|
||||
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
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ Public Class cRechnungsausgang
|
||||
Property Text As Object = Nothing
|
||||
Property SteuerpflichtigerGesamtbetrag As Decimal = 0
|
||||
Property SteuerfreierGesamtbetrag As Decimal = 0
|
||||
Property Status As Object = 0
|
||||
Property Status As Integer = 0
|
||||
Property DruckDatumZeit As Object = Nothing
|
||||
Property Abfertigungskosten As Object = Nothing
|
||||
Property Vorkosten As Object = Nothing
|
||||
|
||||
@@ -42,17 +42,17 @@ Public Class cRechnungsnummern
|
||||
BisRechnungsNr = Now.ToString("yy") & "599999"
|
||||
|
||||
Case 21 ' UNISPED AT
|
||||
VonRechnungsNr = Now.ToString("yy") & "7000000"
|
||||
BisRechnungsNr = Now.ToString("yy") & "7999999"
|
||||
VonRechnungsNr = "7000000"
|
||||
BisRechnungsNr = "7999999"
|
||||
Case 22 ' UNISPED DE
|
||||
VonRechnungsNr = Now.ToString("yy") & "9000000"
|
||||
BisRechnungsNr = Now.ToString("yy") & "9999999"
|
||||
VonRechnungsNr = "9000000"
|
||||
BisRechnungsNr = "9999999"
|
||||
Case 23 ' UNISPED Zollservice
|
||||
VonRechnungsNr = Now.ToString("yy") & "5000000"
|
||||
BisRechnungsNr = Now.ToString("yy") & "5999999"
|
||||
VonRechnungsNr = "5000000"
|
||||
BisRechnungsNr = "5999999"
|
||||
Case 26 ' VERAG-UNISPED
|
||||
VonRechnungsNr = Now.ToString("yy") & "0000001"
|
||||
BisRechnungsNr = Now.ToString("yy") & "9999999"
|
||||
VonRechnungsNr = "0000001"
|
||||
BisRechnungsNr = "9999999"
|
||||
End Select
|
||||
LfdRechnungsNr = VonRechnungsNr
|
||||
'-------------------------------------
|
||||
@@ -75,9 +75,11 @@ Public Class cRechnungsnummern
|
||||
|
||||
Public Function CHECK_RGNR() As Integer ' Prüfung, ob RgNr schon vergeben wurde --> dann +1, bis freie Nr.
|
||||
Dim increased = False
|
||||
While SQL.DLookup("count(*)", "Rechnungsausgang", " RechnungsNr='" & LfdRechnungsNr & "' and Firma_ID='" & SpeditionsbuchNr & "' ", "FMZOLL", 0) > 0
|
||||
System.Threading.Thread.Sleep(200) ' nur, um abzuwarten falls parallel eine Nr vergeben wird
|
||||
While SQL.DLookup("count(*)", "Rechnungsausgang", " RechnungsNr='" & LfdRechnungsNr & "' and Firma_ID='" & SpeditionsbuchNr & "' and Buchungsjahr='" & Buchungsjahr & "' ", "FMZOLL", 0) > 0
|
||||
LfdRechnungsNr += 1
|
||||
increased = True
|
||||
System.Threading.Thread.Sleep(100) ' nur, um abzuwarten falls parallel eine Nr vergeben wird
|
||||
End While
|
||||
If increased Then SAVE()
|
||||
Return LfdRechnungsNr
|
||||
|
||||
@@ -5,6 +5,8 @@ Imports System.Data.SqlClient
|
||||
Imports System.Reflection
|
||||
|
||||
Public Class cSMS
|
||||
Dim API_USER_AUTHORIZATION = "040b08e268d340179d922f867816b8a6"
|
||||
|
||||
Property sms_id As Integer
|
||||
Property sms_Datum As Date = Now
|
||||
Property sms_Firma As Object = Nothing
|
||||
@@ -32,6 +34,12 @@ Public Class cSMS
|
||||
Property sms_Delivered As Object = Nothing
|
||||
Property sms_Failure As Object = Nothing
|
||||
|
||||
Property sms_art as string= "SMS"
|
||||
Property whatsApp_status As Object = Nothing
|
||||
Property whatsApp_gatewayId As Object = Nothing
|
||||
Property whatsApp_error As Object = Nothing
|
||||
Property whatsApp_errorCode As Object = Nothing
|
||||
|
||||
|
||||
Dim ESENDEX_USER As String = "al@verag.ag"
|
||||
Dim ESENDEX_PWD As String = "Developer#2"
|
||||
@@ -78,6 +86,11 @@ Public Class cSMS
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("sms_Failure", sms_Failure))
|
||||
|
||||
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("sms_art", sms_art))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("whatsApp_status", whatsApp_status))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("whatsApp_gatewayId", whatsApp_gatewayId))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("whatsApp_error", whatsApp_error))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("whatsApp_errorCode", whatsApp_errorCode))
|
||||
Return list
|
||||
End Function
|
||||
|
||||
@@ -88,10 +101,10 @@ Public Class cSMS
|
||||
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
|
||||
|
||||
|
||||
Dim sqlstr = " BEGIN TRAN IF EXISTS(SELECT * FROM tblSMS WITH(updlock,serializable) WHERE sms_id=@sms_id) " &
|
||||
" BEGIN " & getUpdateCmd() & " END " &
|
||||
Dim sqlstr = " BEGIN TRAN If EXISTS(Select * FROM tblSMS With(updlock, serializable) WHERE sms_id=@sms_id) " &
|
||||
" BEGIN " & getUpdateCmd() & " End " &
|
||||
" Else " &
|
||||
" BEGIN " & getInsertCmd() & " END " &
|
||||
" BEGIN " & getInsertCmd() & " End " &
|
||||
" commit tran "
|
||||
|
||||
sms_id = SQL.doSQLVarListID(sms_id, sqlstr, "FMZOLL", , list)
|
||||
@@ -102,7 +115,7 @@ Public Class cSMS
|
||||
Public Sub LOAD()
|
||||
Try
|
||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
||||
Using cmd As New SqlCommand("SELECT * FROM tblSMS WHERE sms_id=@sms_id ", conn)
|
||||
Using cmd As New SqlCommand("Select * FROM tblSMS WHERE sms_id=@sms_id ", conn)
|
||||
cmd.Parameters.AddWithValue("@sms_id", sms_id)
|
||||
Dim dr = cmd.ExecuteReader()
|
||||
If dr.Read Then
|
||||
@@ -214,6 +227,178 @@ Public Class cSMS
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Function sendWhatsApp(Originator As String) As Boolean
|
||||
Try
|
||||
VERAG_PROG_ALLGEMEIN.cChilkat_Helper.UnlockCilkat()
|
||||
Dim API_STRING = "https://connect.esendex.com"
|
||||
|
||||
Dim rest As New Chilkat.Rest
|
||||
Dim success As Boolean
|
||||
|
||||
Dim bTls As Boolean = True
|
||||
Dim port As Integer = 443
|
||||
Dim bAutoReconnect As Boolean = True
|
||||
success = rest.Connect(API_STRING, port, bTls, bAutoReconnect)
|
||||
If (success <> True) Then
|
||||
Debug.WriteLine("ConnectFailReason: " & rest.ConnectFailReason)
|
||||
Debug.WriteLine(rest.LastErrorText)
|
||||
|
||||
Return False
|
||||
End If
|
||||
|
||||
rest.AddHeader("Content-Type", "application/json")
|
||||
rest.AddHeader("Authorization", API_USER_AUTHORIZATION)
|
||||
'rest.AddHeader("Accept", "application/vnd.hmrc.1.0+json")
|
||||
|
||||
'Dim sbRequestBody As New Chilkat.StringBuilder
|
||||
'json.EmitSb(sbRequestBody)
|
||||
Me.sms_art = "WHATSAPP"
|
||||
|
||||
|
||||
Dim absenderFirma As String = Me.sms_Firma
|
||||
Dim HandyNr As String = Me.sms_Handynummer
|
||||
If HandyNr.ToString.StartsWith("00") Then HandyNr = "+" & HandyNr.Substring(2)
|
||||
|
||||
If Originator = "" Then Originator = absenderFirma
|
||||
If Originator.Length > 11 Then Originator = Originator.Substring(0, 11)
|
||||
|
||||
Dim json As New Chilkat.JsonObject
|
||||
|
||||
Dim successJsonLoad As Boolean = json.Load("
|
||||
{
|
||||
""accountReference"": """ & Me.sms_Account & """,
|
||||
""channels"": [
|
||||
""WhatsApp""
|
||||
],
|
||||
""metadata"":{
|
||||
""key"": ""value""
|
||||
},
|
||||
""recipient"": {
|
||||
""address"": {
|
||||
""msisdn"": """ & HandyNr & """
|
||||
}
|
||||
},
|
||||
""content"": {
|
||||
""body"": {
|
||||
""text"": {
|
||||
""value"": """ & Me.sms_Nachricht & """
|
||||
}
|
||||
}
|
||||
},
|
||||
""channelSettings"": {
|
||||
""sms"": {
|
||||
""originator"": """ & Originator & """,
|
||||
""characterSet"": ""GSM""
|
||||
}
|
||||
},
|
||||
""expiry"": ""30""
|
||||
}")
|
||||
|
||||
If (successJsonLoad <> True) Then
|
||||
MsgBox(json.LastErrorText)
|
||||
Return False
|
||||
End If
|
||||
|
||||
|
||||
Dim sbRequestBody As New Chilkat.StringBuilder
|
||||
json.EmitSb(sbRequestBody)
|
||||
|
||||
' MsgBox(sbRequestBody.ToString)
|
||||
Dim sbResponseBody As New Chilkat.StringBuilder
|
||||
success = rest.FullRequestSb("POST", "/richcontent/v3/send", sbRequestBody, sbResponseBody)
|
||||
If (success <> True) Then
|
||||
Debug.WriteLine(rest.LastErrorText)
|
||||
Return False
|
||||
End If
|
||||
Dim respStatusCode As Integer = rest.ResponseStatusCode
|
||||
|
||||
Me.whatsApp_status = respStatusCode ' 202 = OK - Gesendet
|
||||
|
||||
If (respStatusCode <> 202) Then
|
||||
|
||||
MsgBox(sbResponseBody.GetAsString())
|
||||
|
||||
Return False
|
||||
End If
|
||||
|
||||
|
||||
Dim jsonResp = New Chilkat.JsonObject()
|
||||
jsonResp.LoadSb(sbResponseBody)
|
||||
|
||||
Dim gatewayId = jsonResp.StringOf("gatewayId")
|
||||
Dim Resp_error = jsonResp.StringOf("error")
|
||||
Dim Resp_errorCode = jsonResp.StringOf("errorCode")
|
||||
|
||||
Me.whatsApp_gatewayId = gatewayId
|
||||
|
||||
If Resp_error <> "" Then Me.whatsApp_error = Resp_error
|
||||
If Resp_errorCode <> "" Then Me.whatsApp_errorCode = Resp_errorCode
|
||||
|
||||
' MsgBox(gatewayId)
|
||||
|
||||
If Not Me.SAVE() Then
|
||||
MsgBox("Fehler: SMS Daten wurden nicht gespeichert!")
|
||||
End If
|
||||
|
||||
|
||||
Return True
|
||||
'productTitle = json.StringOf("product.title");
|
||||
'productBody_html = json.StringOf("product.body_html");
|
||||
'productVendor = json.StringOf("product.vendor");
|
||||
'productProduct_type = json.StringOf("product.product_type");
|
||||
'productCreated_at = json.StringOf("product.created_at");
|
||||
'productHandle = json.StringOf("product.handle");
|
||||
'productUpdated_at = json.StringOf("product.updated_at");
|
||||
'productPublished_at = json.IsNullOf("product.published_at");
|
||||
'productTemplate_suffix = json.IsNullOf("product.template_suffix");
|
||||
'productPublished_scope = json.StringOf("product.published_scope");
|
||||
'productTags = json.StringOf("product.tags");
|
||||
'productImage = json.IsNullOf("product.image");
|
||||
'i = 0;
|
||||
'count_i = json.SizeOfArray("product.variants");
|
||||
'while (i < count_i) {
|
||||
' json.I = i;
|
||||
' id = json.IntOf("product.variants[i].id");
|
||||
' product_id = json.IntOf("product.variants[i].product_id");
|
||||
' title = json.StringOf("product.variants[i].title");
|
||||
' price = json.StringOf("product.variants[i].price");
|
||||
' sku = json.StringOf("product.variants[i].sku");
|
||||
' position = json.IntOf("product.variants[i].position");
|
||||
' grams = json.IntOf("product.variants[i].grams");
|
||||
' inventory_policy = json.StringOf("product.variants[i].inventory_policy");
|
||||
' compare_at_price = json.IsNullOf("product.variants[i].compare_at_price");
|
||||
' fulfillment_service = json.StringOf("product.variants[i].fulfillment_service");
|
||||
' inventory_management = json.IsNullOf("product.variants[i].inventory_management");
|
||||
' option1 = json.StringOf("product.variants[i].option1");
|
||||
' option2 = json.IsNullOf("product.variants[i].option2");
|
||||
' option3 = json.IsNullOf("product.variants[i].option3");
|
||||
' created_at = json.StringOf("product.variants[i].created_at");
|
||||
' updated_at = json.StringOf("product.variants[i].updated_at");
|
||||
' taxable = json.BoolOf("product.variants[i].taxable");
|
||||
' barcode = json.IsNullOf("product.variants[i].barcode");
|
||||
' image_id = json.IsNullOf("product.variants[i].image_id");
|
||||
' inventory_quantity = json.IntOf("product.variants[i].inventory_quantity");
|
||||
' weight = json.IntOf("product.variants[i].weight");
|
||||
' weight_unit = json.StringOf("product.variants[i].weight_unit");
|
||||
' old_inventory_quantity = json.IntOf("product.variants[i].old_inventory_quantity");
|
||||
' requires_shipping = json.BoolOf("product.variants[i].requires_shipping");
|
||||
' i = i + 1;
|
||||
'}
|
||||
Return True
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Fehler beim Senden der WhatsApp-SMS!" & vbNewLine & ex.Message & ex.StackTrace)
|
||||
Return False
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Function checkSMSStatus(Optional silent = False, Optional insertVermerkAviso = True) As String
|
||||
Try
|
||||
|
||||
@@ -279,11 +464,152 @@ Public Class cSMS
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Function checkWhatsAppStatus(Optional silent = False, Optional insertVermerkAviso = True) As String
|
||||
Try
|
||||
|
||||
|
||||
Select Case Me.sms_Status
|
||||
Case MessageStatus.Submitted, MessageStatus.Sent, MessageStatus.Scheduled, MessageStatus.Connecting, -1
|
||||
'Weiter...
|
||||
Case Else
|
||||
' Bereits finaler Status, keine Abfrage nötig
|
||||
Return Me.sms_Status
|
||||
End Select
|
||||
|
||||
|
||||
If If(Me.whatsApp_gatewayId, "") = "" Then
|
||||
If Not silent Then MsgBox("Keine MessageId gefunden!")
|
||||
Return Me.sms_Status ' Keine MsgId
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
Dim API_STRING = "https://connect.esendex.com"
|
||||
|
||||
Dim rest As New Chilkat.Rest
|
||||
Dim success As Boolean
|
||||
|
||||
Dim bTls As Boolean = True
|
||||
Dim port As Integer = 443
|
||||
Dim bAutoReconnect As Boolean = True
|
||||
success = rest.Connect(API_STRING, port, bTls, bAutoReconnect)
|
||||
If (success <> True) Then
|
||||
If Not silent Then MsgBox("ConnectFailReason: " & rest.ConnectFailReason & vbNewLine & rest.LastErrorText)
|
||||
|
||||
Return Me.sms_Status
|
||||
End If
|
||||
|
||||
rest.AddHeader("Content-Type", "application/json")
|
||||
rest.AddHeader("Authorization", API_USER_AUTHORIZATION)
|
||||
|
||||
|
||||
Dim sbRequestBody As New Chilkat.StringBuilder
|
||||
|
||||
' MsgBox(sbRequestBody.ToString)
|
||||
Dim sbResponseBody As New Chilkat.StringBuilder
|
||||
success = rest.FullRequestSb("GET", "/richcontent/v3/accounts/" & Me.sms_Account & "/messages/" & Me.whatsApp_gatewayId, sbRequestBody, sbResponseBody)
|
||||
If (success <> True) Then
|
||||
If Not silent Then MsgBox(rest.LastErrorText)
|
||||
Return Me.sms_Status
|
||||
End If
|
||||
|
||||
Dim respStatusCode As Integer = rest.ResponseStatusCode
|
||||
|
||||
Me.whatsApp_status = respStatusCode ' 200 Abfrage hat funktioniert
|
||||
' MsgBox(respStatusCode)
|
||||
If (respStatusCode <> 200) Then
|
||||
|
||||
'Fehler --> --> FALLBACK SMS!!!
|
||||
If DateDiff(DateInterval.Minute, Me.sms_Datum, Now) > 10 Then
|
||||
Me.FALLBACK_SMS
|
||||
End If
|
||||
|
||||
|
||||
' MsgBox(sbResponseBody.GetAsString())
|
||||
If Not silent Then MsgBox("Error: " & respStatusCode)
|
||||
|
||||
Return Me.sms_Status
|
||||
End If
|
||||
|
||||
|
||||
Dim jsonResp = New Chilkat.JsonObject()
|
||||
jsonResp.LoadSb(sbResponseBody)
|
||||
' MsgBox(sbResponseBody.ToString)
|
||||
Dim allowVermerk = True
|
||||
|
||||
Dim lastUpdatedUtc = jsonResp.StringOf("lastUpdatedUtc")
|
||||
Dim StatusResp = jsonResp.StringOf("status")
|
||||
|
||||
Select Case StatusResp
|
||||
Case "Submitted"
|
||||
Me.sms_Status = MessageStatus.Submitted
|
||||
|
||||
If DateDiff(DateInterval.Minute, Me.sms_Datum, Now) > 10 Then
|
||||
'--> FALLBACK SMS!!!
|
||||
allowVermerk = False
|
||||
Me.FALLBACK_SMS()
|
||||
End If
|
||||
Case "Delivered"
|
||||
Me.sms_Status = MessageStatus.Delivered
|
||||
Me.sms_Delivered = lastUpdatedUtc
|
||||
Case "Failed"
|
||||
Me.sms_Status = MessageStatus.Failed
|
||||
Dim reason = jsonResp.StringOf("reason")
|
||||
Me.sms_Failure = reason
|
||||
|
||||
'--> FALLBACK SMS!!!
|
||||
allowVermerk = False
|
||||
FALLBACK_SMS()
|
||||
End Select
|
||||
|
||||
Me.SAVE()
|
||||
|
||||
If allowVermerk Then
|
||||
Try
|
||||
|
||||
|
||||
If Me.sms_AvisoId IsNot Nothing AndAlso IsNumeric(Me.sms_AvisoId) Then
|
||||
Select Case StatusResp
|
||||
Case "Failed"
|
||||
'Keine Übermittlung.
|
||||
Dim MaId As Integer = SQL.DLookup("LetzterMitarbeiterId", "Aviso", "AvisoId='" & Me.sms_AvisoId & "' ", "AVISO", -1)
|
||||
If MaId > 0 Then
|
||||
VERAG_PROG_ALLGEMEIN.cAvisoBenachrichtigungen.INSERT_BENACHRICHTIGUNG(Me.sms_AvisoId, Nothing, 3, "B", MaId, "*WhatsApp Fehler*", 0, "", "Fehler bei der WhatsApp Übermittlung: " & If(Me.sms_Failure, ""))
|
||||
End If
|
||||
End Select
|
||||
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodBase.GetCurrentMethod.Name)
|
||||
|
||||
End Try
|
||||
End If
|
||||
Return Me.sms_Status
|
||||
Catch ex As Exception
|
||||
If Not silent Then MsgBox("Fehler beim Prüfen des SMS Status!" & vbNewLine & ex.Message & ex.StackTrace)
|
||||
End Try
|
||||
Return ""
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Shared Function SEND_StatusSMS(AVISOId As Integer) As Boolean
|
||||
Dim AVISO = cAviso.getAvisoById(AVISOId, "")
|
||||
Return SEND_StatusSMS(AVISO)
|
||||
End Function
|
||||
|
||||
|
||||
Sub FALLBACK_SMS()
|
||||
'--> FALLBACK SMS!!!
|
||||
Me.sms_art = "SMS"
|
||||
Me.sms_Status = -1
|
||||
Me.sendSMS()
|
||||
Me.SAVE()
|
||||
End Sub
|
||||
|
||||
Shared Function SEND_StatusSMS(AVISO As cAviso) As Boolean
|
||||
If If(AVISO.FahrerHandy, "") <> "" AndAlso IsNumeric(AVISO.FahrerHandy.trim) Then
|
||||
|
||||
@@ -339,3 +665,4 @@ Public Class cSMS
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ Public Class cSendungen
|
||||
Property tblSnd_Bearbeitung_MaId As Integer = Nothing
|
||||
Property tblSnd_aufschub As String = Nothing
|
||||
Property tblSnd_anzahlHandling As Object = Nothing
|
||||
Property tblSnd_anzahlHandlingPos As Object = Nothing
|
||||
Property tblSnd_anzahlPOS As Object = Nothing
|
||||
' Property tblSnd_bar As Object = Nothing
|
||||
' Property tblSnd_barBeleg As Object = Nothing
|
||||
@@ -205,7 +206,7 @@ Public Class cSendungen
|
||||
If allowchangeCurrIndex Then CURRENT_INDEX = IIf(SENDUNG_LIST.Count > 0, 0, -1)
|
||||
End Sub
|
||||
|
||||
Public Sub New(tblSnd_AvisoID, currentHisId, Optional FilialenNr = Nothing, Optional AbfertigungsNr = Nothing, Optional UnterNr = Nothing, Optional tblSnd_anzahlHandling = Nothing)
|
||||
Public Sub New(tblSnd_AvisoID, currentHisId, Optional FilialenNr = Nothing, Optional AbfertigungsNr = Nothing, Optional UnterNr = Nothing, Optional tblSnd_anzahlHandling = Nothing, Optional tblSnd_anzahlHandlingPos = Nothing)
|
||||
Me.tblSnd_SendungID = -1
|
||||
Me.tblSnd_AvisoID = tblSnd_AvisoID
|
||||
Me.tblSnd_PosUnterNr = currentHisId
|
||||
@@ -233,6 +234,7 @@ Public Class cSendungen
|
||||
If AbfertigungsNr IsNot Nothing Then Me.AbfertigungsNr = AbfertigungsNr
|
||||
If UnterNr IsNot Nothing Then Me.UnterNr = UnterNr
|
||||
If tblSnd_anzahlHandling IsNot Nothing Then Me.tblSnd_anzahlHandling = tblSnd_anzahlHandling
|
||||
If tblSnd_anzahlHandlingPos IsNot Nothing Then Me.tblSnd_anzahlHandlingPos = tblSnd_anzahlHandlingPos
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -242,11 +244,11 @@ Public Class cSendungen
|
||||
|
||||
|
||||
|
||||
Public Function SAVE() As Boolean 'obj As Object, tablename As String, where As String) As Boolean
|
||||
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
|
||||
Public Function SAVE(Optional saveStatus = True) As Boolean 'obj As Object, tablename As String, where As String) As Boolean
|
||||
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList(saveStatus)
|
||||
'WITH(updlock,serializable)
|
||||
Dim sqlstr = " BEGIN TRAN IF EXISTS(SELECT * FROM [tblSendungen] WHERE tblSnd_SendungID=@tblSnd_SendungID) " &
|
||||
" BEGIN " & getUpdateCmd() & " END " &
|
||||
" BEGIN " & getUpdateCmd(saveStatus) & " END " &
|
||||
" Else " &
|
||||
" BEGIN " & getInsertCmd() & " END " &
|
||||
" commit tran "
|
||||
@@ -341,6 +343,7 @@ Public Class cSendungen
|
||||
Me.tblSnd_Bearbeitung_MaId = SQL.checkNullReturnValue(dr.Item("tblSnd_Bearbeitung_MaId"), Nothing)
|
||||
Me.tblSnd_aufschub = SQL.checkNullReturnValue(dr.Item("tblSnd_aufschub"), Nothing)
|
||||
Me.tblSnd_anzahlHandling = SQL.checkNullReturnValue(dr.Item("tblSnd_anzahlHandling"), Nothing)
|
||||
Me.tblSnd_anzahlHandlingPos = SQL.checkNullReturnValue(dr.Item("tblSnd_anzahlHandlingPos"), Nothing)
|
||||
Me.tblSnd_anzahlPOS = SQL.checkNullReturnValue(dr.Item("tblSnd_anzahlPOS"), Nothing)
|
||||
' Me.tblSnd_bar = SQL.checkNullReturnValue(dr.Item("tblSnd_bar"), Nothing)
|
||||
' Me.tblSnd_barBeleg = SQL.checkNullReturnValue(dr.Item("tblSnd_barBeleg"), Nothing)
|
||||
@@ -530,7 +533,7 @@ Public Class cSendungen
|
||||
End Sub
|
||||
|
||||
|
||||
Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
|
||||
Function getParameterList(Optional saveStatus = True) As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
|
||||
Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_SendungID", tblSnd_SendungID, , True)) 'UPDATE INSERT ISPRIMARY!
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_PosUnterNr", tblSnd_PosUnterNr))
|
||||
@@ -558,6 +561,7 @@ Public Class cSendungen
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_Bearbeitung_MaId", tblSnd_Bearbeitung_MaId))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_aufschub", tblSnd_aufschub))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_anzahlHandling", tblSnd_anzahlHandling))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_anzahlHandlingPos", tblSnd_anzahlHandlingPos))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_anzahlPOS", tblSnd_anzahlPOS))
|
||||
|
||||
' list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_bar", tblSnd_bar))
|
||||
@@ -594,11 +598,7 @@ Public Class cSendungen
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_Warenwert", tblSnd_Warenwert))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_WarenwertWaehrung", tblSnd_WarenwertWaehrung))
|
||||
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_QS_MA", tblSnd_QS_MA,,, Not saveSachbearbeiter))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_Status", tblSnd_Status,,, Not saveSachbearbeiter))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_Vorbereitet", tblSnd_Vorbereitet,,, Not saveSachbearbeiter))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_Vorgeschrieben", tblSnd_Vorgeschrieben,,, Not saveSachbearbeiter))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_VG_MA", tblSnd_VG_MA,,, Not saveSachbearbeiter))
|
||||
|
||||
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("LetzterMitarbeiter", LetzterMitarbeiter,,, Not saveSachbearbeiter))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("LetzterMitarbeiterId", LetzterMitarbeiterId,,, Not saveSachbearbeiter))
|
||||
@@ -615,8 +615,6 @@ Public Class cSendungen
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_FilialeAbklaerung", tblSnd_FilialeAbklaerung))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("VORSYSTEM", VORSYSTEM))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("VORSYSTEM_Id", VORSYSTEM_Id))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_AbklaerungTR", tblSnd_AbklaerungTR))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_AbklaerungTR_MA", tblSnd_AbklaerungTR_MA))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_ATB_Nr", tblSnd_ATB_Nr))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_ATB_T1", tblSnd_ATB_T1))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_Vorpapier", tblSnd_Vorpapier))
|
||||
@@ -626,22 +624,45 @@ Public Class cSendungen
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_Vorpapier3", tblSnd_Vorpapier3))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_Vorpapier3_Pos", tblSnd_Vorpapier3_Pos))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_Frachtkosten", tblSnd_Frachtkosten))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_AbfertigungTR", tblSnd_AbfertigungTR))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_AbfertigungTR_MA", tblSnd_AbfertigungTR_MA))
|
||||
|
||||
|
||||
'If saveStatus Then --> in getUpdateCmd
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_Status", tblSnd_Status,,, Not saveSachbearbeiter))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_QS_MA", tblSnd_QS_MA,,, Not saveSachbearbeiter))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_Vorbereitet", tblSnd_Vorbereitet,,, Not saveSachbearbeiter))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_Vorgeschrieben", tblSnd_Vorgeschrieben,,, Not saveSachbearbeiter))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_VG_MA", tblSnd_VG_MA,,, Not saveSachbearbeiter))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_AbklaerungTR", tblSnd_AbklaerungTR))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_AbklaerungTR_MA", tblSnd_AbklaerungTR_MA))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_AbfertigungTR", tblSnd_AbfertigungTR))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_AbfertigungTR_MA", tblSnd_AbfertigungTR_MA))
|
||||
'End If
|
||||
Return list
|
||||
End Function
|
||||
|
||||
|
||||
Public Function getUpdateCmd() As String
|
||||
Public Function getUpdateCmd(Optional saveStatus = True) 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 And Not i.isonlyForLoad Then
|
||||
str &= "[" & i.Text & "] = @" & i.Text.Replace("-", "").Replace(" ", "") & ","
|
||||
Dim jump = False
|
||||
|
||||
If Not saveStatus Then
|
||||
If i.Text = "tblSnd_Status" Then jump = True
|
||||
If i.Text = "tblSnd_QS_MA" Then jump = True
|
||||
If i.Text = "tblSnd_Vorbereitet" Then jump = True
|
||||
If i.Text = "tblSnd_Vorgeschrieben" Then jump = True
|
||||
If i.Text = "tblSnd_VG_MA" Then jump = True
|
||||
If i.Text = "tblSnd_AbklaerungTR" Then jump = True
|
||||
If i.Text = "tblSnd_AbklaerungTR_MA" Then jump = True
|
||||
If i.Text = "tblSnd_AbfertigungTR" Then jump = True
|
||||
If i.Text = "tblSnd_AbfertigungTR_MA" Then jump = True
|
||||
End If
|
||||
|
||||
|
||||
If Not jump Then str &= "[" & i.Text & "] = @" & i.Text.Replace("-", "").Replace(" ", "") & ","
|
||||
End If
|
||||
Next
|
||||
str = str.Substring(0, str.Length - 1) 'wg. ','
|
||||
|
||||
@@ -50,6 +50,11 @@ Public Class cTrdInvoice
|
||||
LOAD()
|
||||
End Sub
|
||||
|
||||
Sub New(Rechnungsdatum, Rechnungsnummer, Buchungsjahr)
|
||||
Me.Rechnungsnummer = Buchungsjahr.ToString.Substring(2, 2) & Rechnungsnummer
|
||||
Me.Rechnungsdatum = Rechnungsdatum
|
||||
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("Rechnungsdatum", Rechnungsdatum))
|
||||
@@ -324,7 +329,7 @@ Class TrdInvoice_FUNCTIONS
|
||||
|
||||
Shared SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
|
||||
Shared Function TrdinSchreiben(Optional Firma As Integer = -1) As Boolean 'Lädt die Daten aus der Tabelle Rechnungsausgang/RechnungsausgangPositionen in die Tabelle trdInvoice/trdProduct
|
||||
Shared Function TrdinSchreiben(Optional Firma As Integer = -1, Optional Buchungsjahr As Integer = -1) As Boolean 'Lädt die Daten aus der Tabelle Rechnungsausgang/RechnungsausgangPositionen in die Tabelle trdInvoice/trdProduct
|
||||
Try
|
||||
|
||||
Dim LOKALWÄHRUNG = "EUR"
|
||||
@@ -332,10 +337,17 @@ Class TrdInvoice_FUNCTIONS
|
||||
Dim WährungsdifferenzSteuerpflichtigerBetrag As Double
|
||||
Dim WährungsdifferenzSteuerfreierBetrag As Integer
|
||||
|
||||
Dim dt As DataTable = SQL.loadDgvBySql(getSQLString_SELECTForTrdInvoice(Firma), "FMZOLL", 9800)
|
||||
Dim dt As DataTable = SQL.loadDgvBySql(getSQLString_SELECTForTrdInvoice(Firma, Buchungsjahr), "FMZOLL", 9800)
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
For Each ROW In dt.Rows
|
||||
Dim TRD_INVOICE As New VERAG_PROG_ALLGEMEIN.cTrdInvoice(ROW("RK_RechnungsDatum"), ROW("RK_RechnungsNr"))
|
||||
Dim TRD_INVOICE As VERAG_PROG_ALLGEMEIN.cTrdInvoice
|
||||
If Buchungsjahr > 2000 Then
|
||||
TRD_INVOICE = New VERAG_PROG_ALLGEMEIN.cTrdInvoice(ROW("RK_RechnungsDatum"), ROW("RK_RechnungsNr"), Buchungsjahr) 'nur UNISPED!!!!
|
||||
Else
|
||||
TRD_INVOICE = New VERAG_PROG_ALLGEMEIN.cTrdInvoice(ROW("RK_RechnungsDatum"), ROW("RK_RechnungsNr"))
|
||||
End If
|
||||
|
||||
|
||||
If TRD_INVOICE.hasEntry Then
|
||||
' MsgBox("RG-Nr. bereits vorhanden!")
|
||||
Else
|
||||
@@ -360,9 +372,9 @@ Class TrdInvoice_FUNCTIONS
|
||||
TRD_INVOICE.SteuerbetragFremd = ROW("RK_Steuerbetrag")
|
||||
TRD_INVOICE.RechnungsbetragFremd = ROW("RK_Rechnungsbetrag")
|
||||
|
||||
TRD_INVOICE.SteuerpflichtigerBetragLokal = VERAG_PROG_ALLGEMEIN.cProgramFunctions.fktEuro(ROW("[RK_SteuerpflichtigerBetrag]"), ROW("[RK_Währungscode]"), LOKALWÄHRUNG)
|
||||
TRD_INVOICE.SteuerfreierBetragLokal = VERAG_PROG_ALLGEMEIN.cProgramFunctions.fktEuro(ROW("[RK_SteuerfreierBetrag]"), ROW("[RK_Währungscode]"), LOKALWÄHRUNG)
|
||||
TRD_INVOICE.SteuerbetragLokal = CDbl(TRD_INVOICE.SteuerpflichtigerBetragLokal * ROW("[RK_SteuersatzProzent]") * 100) / 100
|
||||
TRD_INVOICE.SteuerpflichtigerBetragLokal = VERAG_PROG_ALLGEMEIN.cProgramFunctions.fktEuro(ROW("RK_SteuerpflichtigerBetrag"), ROW("RK_Währungscode"), LOKALWÄHRUNG)
|
||||
TRD_INVOICE.SteuerfreierBetragLokal = VERAG_PROG_ALLGEMEIN.cProgramFunctions.fktEuro(ROW("RK_SteuerfreierBetrag"), ROW("RK_Währungscode"), LOKALWÄHRUNG)
|
||||
TRD_INVOICE.SteuerbetragLokal = CDbl(TRD_INVOICE.SteuerpflichtigerBetragLokal * ROW("RK_SteuersatzProzent") * 100) / 100
|
||||
TRD_INVOICE.RechnungsbetragLokal = TRD_INVOICE.SteuerpflichtigerBetragLokal + TRD_INVOICE.SteuerfreierBetragLokal + TRD_INVOICE.SteuerbetragLokal
|
||||
' Basis zur Feststellung von Rundungsdifferenzen schaffen.
|
||||
|
||||
@@ -401,9 +413,11 @@ Class TrdInvoice_FUNCTIONS
|
||||
TRD_INVOICE.UStVAn_ID = Nothing
|
||||
|
||||
If TRD_INVOICE.SAVE Then
|
||||
If TrdinSchreibenProduct(TRD_INVOICE.Rechnungsdatum, TRD_INVOICE.Rechnungsnummer, RK_Währungscode, ROW("RK_RechnungsLandKz"), ROW("RK_Buchungstext"), TRD_INVOICE.Firma_ID, lngSatzzähler, WährungsdifferenzSteuerpflichtigerBetrag, WährungsdifferenzSteuerfreierBetrag) Then
|
||||
If TrdinSchreibenProduct(TRD_INVOICE.Rechnungsdatum, ROW("RK_RechnungsNr"), TRD_INVOICE.Rechnungsnummer, RK_Währungscode, ROW("RK_RechnungsLandKz"), ROW("RK_Buchungstext"), TRD_INVOICE.Firma_ID, lngSatzzähler, WährungsdifferenzSteuerpflichtigerBetrag, WährungsdifferenzSteuerfreierBetrag, Buchungsjahr) Then
|
||||
'UPDATE rechnugnsausgang
|
||||
SQL.doSQL("UPDATE [Rechnungsausgang] SET [Trdin] = 1 WHERE convert(date,[RechnungsDatum] ,104) = '" & TRD_INVOICE.Rechnungsdatum.ToShortDateString & "' AND RechnungsNr = " & TRD_INVOICE.Rechnungsnummer & " ", "FMZOLL")
|
||||
Dim firmaTmpsql = If(Firma > 0, " AND Firma_ID= '" & Firma & "' ", "")
|
||||
Dim buchungsjahrTmpsql = If(Buchungsjahr > 0, " AND Buchungsjahr= '" & Buchungsjahr & "' ", "")
|
||||
SQL.doSQL("UPDATE [Rechnungsausgang] SET [Trdin] = 1 WHERE convert(date,[RechnungsDatum] ,104) = '" & TRD_INVOICE.Rechnungsdatum.ToShortDateString & "' AND RechnungsNr = " & ROW("RK_RechnungsNr") & firmaTmpsql & buchungsjahrTmpsql, "FMZOLL")
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -425,18 +439,18 @@ Class TrdInvoice_FUNCTIONS
|
||||
|
||||
|
||||
|
||||
Shared Function TrdinSchreibenProduct(RechnungsDatum, RK_RechnungsNr, RK_Währungscode, RK_RechnungsLandKz, RK_Buchungstext, RK_Firma_ID, ByRef lngSatzzähler, ByRef WährungsdifferenzSteuerpflichtigerBetrag, ByRef WährungsdifferenzSteuerfreierBetrag) As Boolean
|
||||
Shared Function TrdinSchreibenProduct(RechnungsDatum, RK_RechnungsNr, TRD_RechnungsNr, RK_Währungscode, RK_RechnungsLandKz, RK_Buchungstext, RK_Firma_ID, ByRef lngSatzzähler, ByRef WährungsdifferenzSteuerpflichtigerBetrag, ByRef WährungsdifferenzSteuerfreierBetrag, Buchungsjahr) As Boolean
|
||||
Try
|
||||
|
||||
Dim LOKALWÄHRUNG = "EUR"
|
||||
|
||||
Dim dt As DataTable = SQL.loadDgvBySql(getSQLString_SELECTForTrdProduct(RechnungsDatum, RK_RechnungsNr), "FMZOLL")
|
||||
Dim dt As DataTable = SQL.loadDgvBySql(getSQLString_SELECTForTrdProduct(RechnungsDatum, RK_RechnungsNr, RK_Firma_ID, Buchungsjahr), "FMZOLL")
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
For Each ROW In dt.Rows
|
||||
Dim TRD_PRODUCT As New VERAG_PROG_ALLGEMEIN.cTrdProduct()
|
||||
|
||||
TRD_PRODUCT.Rechnungsdatum = RechnungsDatum
|
||||
TRD_PRODUCT.Rechnungsnummer = RK_RechnungsNr
|
||||
TRD_PRODUCT.Rechnungsnummer = TRD_RechnungsNr
|
||||
|
||||
|
||||
If RK_Währungscode = LOKALWÄHRUNG Then
|
||||
@@ -475,7 +489,7 @@ Class TrdInvoice_FUNCTIONS
|
||||
TRD_PRODUCT.Belegdaten = ROW("RP_Belegdaten")
|
||||
TRD_PRODUCT.Sachkonto = getSachkonto(RK_Firma_ID, ROW("RP_LeistungsNr"), RK_RechnungsLandKz, ROW("RP_Steuerpflichtig"), ROW("AufschubkontoNr"))
|
||||
TRD_PRODUCT.Buchungstext = RK_Buchungstext
|
||||
|
||||
|
||||
|
||||
|
||||
TRD_PRODUCT.SAVE()
|
||||
@@ -586,7 +600,7 @@ Class TrdInvoice_FUNCTIONS
|
||||
getSachkonto = CInt(getSachkonto)
|
||||
End Function
|
||||
|
||||
Shared Function getSQLString_SELECTForTrdInvoice(Optional Firma As Integer = -1)
|
||||
Shared Function getSQLString_SELECTForTrdInvoice(Optional Firma As Integer = -1, Optional Buchungsjahr As Integer = -1)
|
||||
getSQLString_SELECTForTrdInvoice = "SELECT Rechnungsausgang.RechnungsDatum AS RK_RechnungsDatum, Rechnungsausgang.RechnungsNr AS RK_RechnungsNr, min(Rechnungsausgang.Abfertigungsdatum) AS RK_Abfertigungsdatum, min(Rechnungsausgang.FilialenNr) AS RK_FilialenNr,
|
||||
min(Rechnungsausgang.AbfertigungsNr) AS RK_AbfertigungsNr, min(Rechnungsausgang.UnterNr) AS RK_UnterNr, min(Rechnungsausgang.BelegartenNr) AS RK_BelegartenNr,
|
||||
(min(cast([FilialenNr] as varchar(4))) + '/' + min(cast([AbfertigungsNr] as varchar(8))) + '/' + min(cast([UnterNr] as varchar(2)))) AS RK_Buchungstext,
|
||||
@@ -599,19 +613,19 @@ Class TrdInvoice_FUNCTIONS
|
||||
Sum(RechnungsausgangPositionen.SteuerpflichtigerBetrag)+Sum(RechnungsausgangPositionen.SteuerfreierBetrag)+((Sum(RechnungsausgangPositionen.SteuerpflichtigerBetrag)*min(Rechnungsausgang.[Steuersatz %])*100)/100) AS RK_Rechnungsbetrag,
|
||||
Count(1) AS RK_Satzzähler
|
||||
FROM Rechnungsausgang INNER JOIN RechnungsausgangPositionen ON Rechnungsausgang.RK_ID = RechnungsausgangPositionen.RK_ID
|
||||
WHERE (((Rechnungsausgang.RechnungsDatum) Is Not Null) AND ((Rechnungsausgang.RechnungsNr) Is Not Null) AND ((Rechnungsausgang.Trdin)=0)) " & If(Firma > 0, " and Firma_ID=" & Firma, "") & "
|
||||
WHERE (((Rechnungsausgang.RechnungsDatum) Is Not Null) AND ((Rechnungsausgang.RechnungsNr) Is Not Null) AND ((Rechnungsausgang.Trdin)=0)) " & If(Firma > 0, " and Firma_ID=" & Firma, "") & If(Buchungsjahr > 0, " and Buchungsjahr=" & Buchungsjahr, "") & "
|
||||
GROUP BY Rechnungsausgang.RechnungsDatum, Rechnungsausgang.RechnungsNr
|
||||
ORDER BY Rechnungsausgang.RechnungsDatum, Rechnungsausgang.RechnungsNr, min(Rechnungsausgang.Abfertigungsdatum), min(Rechnungsausgang.FilialenNr), min(Rechnungsausgang.AbfertigungsNr), min(Rechnungsausgang.UnterNr);"
|
||||
End Function
|
||||
|
||||
|
||||
Shared Function getSQLString_SELECTForTrdProduct(RechnungsDatum As Date, RechnungsNr As Integer)
|
||||
Shared Function getSQLString_SELECTForTrdProduct(RechnungsDatum As Date, RechnungsNr As Integer, Optional Firma As Integer = -1, Optional Buchungsjahr As Integer = -1)
|
||||
getSQLString_SELECTForTrdProduct = "SELECT Rechnungsausgang.RechnungsDatum AS RP_RechnungsDatum, Rechnungsausgang.RechnungsNr AS RP_RechnungsNr, RechnungsausgangPositionen.LeistungsNr AS RP_LeistungsNr, RechnungsausgangPositionen.LeistungsBez AS RP_LeistungsBez,
|
||||
RechnungsausgangPositionen.Steuerpflichtig AS RP_Steuerpflichtig, Sum(RechnungsausgangPositionen.SteuerpflichtigerBetrag) AS RP_SteuerpflichtigerBetrag, Sum(RechnungsausgangPositionen.SteuerfreierBetrag) AS RP_SteuerfreierBetrag,
|
||||
min(RechnungsausgangPositionen.Belegdaten) AS RP_Belegdaten, Count(1) AS RP_Satzzähler, min(AufschubkontoNr) as AufschubkontoNr
|
||||
FROM RechnungsausgangPositionen INNER JOIN Rechnungsausgang ON RechnungsausgangPositionen.RK_ID = Rechnungsausgang.RK_ID
|
||||
GROUP BY Rechnungsausgang.RechnungsDatum, Rechnungsausgang.RechnungsNr, RechnungsausgangPositionen.LeistungsNr, RechnungsausgangPositionen.LeistungsBez, RechnungsausgangPositionen.Steuerpflichtig
|
||||
HAVING (((Rechnungsausgang.RechnungsDatum)='" & RechnungsDatum.ToShortDateString & "') AND ((Rechnungsausgang.RechnungsNr)=" & RechnungsNr & "))
|
||||
GROUP BY Rechnungsausgang.RechnungsDatum, Rechnungsausgang.RechnungsNr, RechnungsausgangPositionen.LeistungsNr, RechnungsausgangPositionen.LeistungsBez, RechnungsausgangPositionen.Steuerpflichtig " & If(Firma > 0, " ,Rechnungsausgang.Firma_ID ", "") & If(Buchungsjahr > 0, " ,Rechnungsausgang.Buchungsjahr ", "") & "
|
||||
HAVING (((Rechnungsausgang.RechnungsDatum)='" & RechnungsDatum.ToShortDateString & "') AND ((Rechnungsausgang.RechnungsNr)=" & RechnungsNr & ")) " & If(Firma > 0, " and Rechnungsausgang.Firma_ID=" & Firma, "") & If(Buchungsjahr > 0, " and Rechnungsausgang.Buchungsjahr=" & Buchungsjahr, "") & "
|
||||
ORDER BY Rechnungsausgang.RechnungsDatum, Rechnungsausgang.RechnungsNr, RechnungsausgangPositionen.LeistungsNr, RechnungsausgangPositionen.LeistungsBez, RechnungsausgangPositionen.Steuerpflichtig;"
|
||||
End Function
|
||||
End Class
|
||||
@@ -135,7 +135,7 @@ Public Class cUIDPruefung
|
||||
|
||||
dt = SQL.loadDgvBySql("SELECT " & Top & " [AdressenNr] as KdNr,[Ordnungsbegriff] as Firma,UstIdGeprüft as [letzte Prüfung],Adressen.UstIdKz,Adressen.UstIdnr " &
|
||||
" From [Adressen] inner Join kunden On KundenNr=AdressenNr inner join Filialen on Filialen.FilialenNr=Kunden.FilialenNr " &
|
||||
" where (UstIdGeprüft <= '" & datum.ToShortDateString & "' OR (Adressen.UstIdKz is not null and Adressen.UstIdNr is not null)) " &
|
||||
" where (UstIdGeprüft <= '" & datum.ToShortDateString & "' OR UstIdGeprüft is null) and (Adressen.UstIdKz is not null and Adressen.UstIdNr is not null) " &
|
||||
" And Auswahl='A' " & where & " ORDER BY Ordnungsbegriff", "FMZOLL")
|
||||
|
||||
If dt IsNot Nothing Then
|
||||
@@ -148,18 +148,58 @@ Public Class cUIDPruefung
|
||||
Dim c As New DataColumn
|
||||
c.ColumnName = "Ergebnis"
|
||||
dt.Columns.Add(c)
|
||||
For Each r As DataRow In dt.Rows
|
||||
Dim UID_TMP = doUIDPruefung(r("KdNr"),, SaveErgInAdressen, showErr)
|
||||
If UID_TMP IsNot Nothing Then
|
||||
If UID_TMP.uid_valid Then
|
||||
r("Ergebnis") = "OK"
|
||||
Else
|
||||
r("Ergebnis") = "UNGÜLTIG"
|
||||
|
||||
|
||||
'------------------------------------------------
|
||||
'ENTWEDER ÜBER EU-KOMISSION ODER FINANZONLINE::::
|
||||
Dim ART = "FINANZONLINE"
|
||||
'------------------------------------------------
|
||||
Select Case ART
|
||||
Case "EUROPE"
|
||||
|
||||
For Each r As DataRow In dt.Rows
|
||||
Dim UID_TMP = doUIDPruefung(r("KdNr"),, SaveErgInAdressen, showErr)
|
||||
If UID_TMP IsNot Nothing Then
|
||||
If UID_TMP.uid_valid Then
|
||||
r("Ergebnis") = "OK"
|
||||
Else
|
||||
r("Ergebnis") = "UNGÜLTIG"
|
||||
End If
|
||||
Else
|
||||
r("Ergebnis") = "ERROR"
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
Case "FINANZONLINE"
|
||||
Dim FO As New VERAG_PROG_ALLGEMEIN.cFinanzOnlineWebService
|
||||
VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "VERAG"
|
||||
FO.initValues()
|
||||
|
||||
If FO.Call_Web_Service_MethodUID_Login_NEU2020() = 0 Then
|
||||
|
||||
For Each r As DataRow In dt.Rows
|
||||
Dim UID_TMP = FO.Call_Web_Service_MethodUID_Abfrage_NEU2020(r("KdNr"),, SaveErgInAdressen, showErr)
|
||||
If UID_TMP IsNot Nothing Then
|
||||
If UID_TMP.uid_valid Then
|
||||
r("Ergebnis") = "OK"
|
||||
Else
|
||||
r("Ergebnis") = "UNGÜLTIG"
|
||||
End If
|
||||
Else
|
||||
r("Ergebnis") = "ERROR"
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
FO.Call_Web_Service_MethodUID_Logout_NEU2020()
|
||||
|
||||
End If
|
||||
Else
|
||||
r("Ergebnis") = "ERROR"
|
||||
End If
|
||||
Next
|
||||
|
||||
End Select
|
||||
'------------------------------------------------
|
||||
|
||||
|
||||
End If
|
||||
|
||||
Return dt
|
||||
|
||||
@@ -96,10 +96,13 @@ Public Class frmMessenger
|
||||
|
||||
' If IO.Directory.Exists(My.Application.roo "") Then
|
||||
|
||||
Dim spezialEmoji = False
|
||||
If VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME = "ADMIN" Then spezialEmoji = True
|
||||
|
||||
If IO.Directory.Exists(EMOJI_PATH) Then
|
||||
For Each aa In IO.Directory.GetFiles(EMOJI_PATH) '.OrderBy(Function(f) f)
|
||||
If alloweasteregg Or Not aa.Contains("easteregg") Then
|
||||
If IO.File.Exists(aa) And aa.Contains(".png") And aa.Contains("emoji_") Then
|
||||
If IO.File.Exists(aa) And aa.Contains(".png") And (aa.Contains("emoji_") Or spezialEmoji) Then
|
||||
|
||||
Dim p As New PictureBox
|
||||
p.Size = New Size(40, 40)
|
||||
@@ -349,7 +352,11 @@ Public Class frmMessenger
|
||||
' CHAT_ITEM.txtChatmessage.Text = MSG.chatMg_text
|
||||
'CHAT_ITEM.lblName.Text = MSG.chatMg_maId
|
||||
Return (CHAT_ITEM)
|
||||
Case "DEL_TEXT", "DEL_ATTACHMENT", "DEL_EMOJI"
|
||||
|
||||
Dim CHAT_ITEM As New usrCntlMessenger_ChatElementDEL(MSG)
|
||||
checkUsrId(MSG, CHAT_ITEM)
|
||||
Return (CHAT_ITEM)
|
||||
End Select
|
||||
Return Nothing
|
||||
End Function
|
||||
@@ -378,6 +385,10 @@ Public Class frmMessenger
|
||||
If DirectCast(I, usrCntlMessenger_ChatEmoji).CHAT_MSG.chatMg_id = MSG.chatMg_id Then
|
||||
found = True
|
||||
End If
|
||||
Case GetType(usrCntlMessenger_ChatElementDEL).ToString
|
||||
If DirectCast(I, usrCntlMessenger_ChatElementDEL).CHAT_MSG.chatMg_id = MSG.chatMg_id Then
|
||||
found = True
|
||||
End If
|
||||
End Select
|
||||
|
||||
Next
|
||||
@@ -437,6 +448,16 @@ Public Class frmMessenger
|
||||
CHAT_ITEM.setBgCOLOR(Color.FromArgb(192, 255, 192))
|
||||
End If
|
||||
End Sub
|
||||
Sub checkUsrId(MSG As VERAG_PROG_ALLGEMEIN.cMessenger.cMessenger_ChatMessages, CHAT_ITEM As usrCntlMessenger_ChatElementDEL)
|
||||
If MSG.chatMg_maId = VERAG_PROG_ALLGEMEIN.cAllgemein.USRID Then
|
||||
CHAT_ITEM.Margin = New Padding(MyFlowLayoutPanel1.Width - CHAT_ITEM.Width - 30, 0, 0, 0)
|
||||
'CHAT_ITEM.Left = (MyFlowLayoutPanel1.Width - CHAT_ITEM.Width - 30)
|
||||
'CHAT_ITEM.Anchor = AnchorStyles.None
|
||||
'CHAT_ITEM.Dock = DockStyle.Right
|
||||
' CHAT_ITEM.Dock = DockStyle.Right
|
||||
' CHAT_ITEM.setBgCOLOR(Color.FromArgb(192, 255, 192))
|
||||
End If
|
||||
End Sub
|
||||
Sub checkUsrId(MSG As VERAG_PROG_ALLGEMEIN.cMessenger.cMessenger_ChatMessages, CHAT_ITEM As usrCntlMessenger_ChatEmoji)
|
||||
If MSG.chatMg_maId = VERAG_PROG_ALLGEMEIN.cAllgemein.USRID Then
|
||||
CHAT_ITEM.Margin = New Padding(MyFlowLayoutPanel1.Width - CHAT_ITEM.Width - 30, 0, 0, 0)
|
||||
|
||||
@@ -24,19 +24,23 @@ Partial Class usrCntlMessenger_ChatAnhang
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.pnl = New System.Windows.Forms.Panel()
|
||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||
Me.txtChatmessage = New VERAG_PROG_ALLGEMEIN.MyRichTextBox()
|
||||
Me.pic = New System.Windows.Forms.PictureBox()
|
||||
Me.lblDateTime = New System.Windows.Forms.Label()
|
||||
Me.lblNewMsg = New System.Windows.Forms.Label()
|
||||
Me.lblName = New System.Windows.Forms.Label()
|
||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||
Me.txtChatmessage = New VERAG_PROG_ALLGEMEIN.MyRichTextBox()
|
||||
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
|
||||
Me.lblDel = New System.Windows.Forms.Label()
|
||||
Me.pnl.SuspendLayout()
|
||||
CType(Me.pic, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'pnl
|
||||
'
|
||||
Me.pnl.Controls.Add(Me.lblDel)
|
||||
Me.pnl.Controls.Add(Me.Panel1)
|
||||
Me.pnl.Controls.Add(Me.txtChatmessage)
|
||||
Me.pnl.Controls.Add(Me.pic)
|
||||
@@ -46,6 +50,34 @@ Partial Class usrCntlMessenger_ChatAnhang
|
||||
Me.pnl.Size = New System.Drawing.Size(378, 72)
|
||||
Me.pnl.TabIndex = 0
|
||||
'
|
||||
'Panel1
|
||||
'
|
||||
Me.Panel1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.Panel1.BackColor = System.Drawing.Color.Azure
|
||||
Me.Panel1.Location = New System.Drawing.Point(2, 55)
|
||||
Me.Panel1.Name = "Panel1"
|
||||
Me.Panel1.Size = New System.Drawing.Size(375, 3)
|
||||
Me.Panel1.TabIndex = 4
|
||||
'
|
||||
'txtChatmessage
|
||||
'
|
||||
Me.txtChatmessage.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.txtChatmessage.BackColor = System.Drawing.Color.White
|
||||
Me.txtChatmessage.BorderStyle = System.Windows.Forms.BorderStyle.None
|
||||
Me.txtChatmessage.Cursor = System.Windows.Forms.Cursors.Hand
|
||||
Me.txtChatmessage.Font = New System.Drawing.Font("Comic Sans MS", 12.0!)
|
||||
Me.txtChatmessage.Location = New System.Drawing.Point(113, 17)
|
||||
Me.txtChatmessage.MaxLineLength = -1
|
||||
Me.txtChatmessage.MaxLines_Warning = ""
|
||||
Me.txtChatmessage.MaxLines_Warning_Label = Nothing
|
||||
Me.txtChatmessage.Name = "txtChatmessage"
|
||||
Me.txtChatmessage.ReadOnly = True
|
||||
Me.txtChatmessage.Size = New System.Drawing.Size(260, 37)
|
||||
Me.txtChatmessage.TabIndex = 1
|
||||
Me.txtChatmessage.Text = "Anhangdokument.pdf"
|
||||
'
|
||||
'pic
|
||||
'
|
||||
Me.pic.BackgroundImage = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.docAllgemein
|
||||
@@ -95,33 +127,23 @@ Partial Class usrCntlMessenger_ChatAnhang
|
||||
Me.lblName.TabIndex = 4
|
||||
Me.lblName.Text = "Max Mustermann (VERAG)"
|
||||
'
|
||||
'Panel1
|
||||
'Timer1
|
||||
'
|
||||
Me.Panel1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.Panel1.BackColor = System.Drawing.Color.Azure
|
||||
Me.Panel1.Location = New System.Drawing.Point(2, 55)
|
||||
Me.Panel1.Name = "Panel1"
|
||||
Me.Panel1.Size = New System.Drawing.Size(375, 3)
|
||||
Me.Panel1.TabIndex = 4
|
||||
Me.Timer1.Interval = 2000
|
||||
'
|
||||
'txtChatmessage
|
||||
'lblDel
|
||||
'
|
||||
Me.txtChatmessage.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.txtChatmessage.BackColor = System.Drawing.Color.White
|
||||
Me.txtChatmessage.BorderStyle = System.Windows.Forms.BorderStyle.None
|
||||
Me.txtChatmessage.Cursor = System.Windows.Forms.Cursors.Hand
|
||||
Me.txtChatmessage.Font = New System.Drawing.Font("Comic Sans MS", 12.0!)
|
||||
Me.txtChatmessage.Location = New System.Drawing.Point(113, 17)
|
||||
Me.txtChatmessage.MaxLineLength = -1
|
||||
Me.txtChatmessage.MaxLines_Warning = ""
|
||||
Me.txtChatmessage.MaxLines_Warning_Label = Nothing
|
||||
Me.txtChatmessage.Name = "txtChatmessage"
|
||||
Me.txtChatmessage.ReadOnly = True
|
||||
Me.txtChatmessage.Size = New System.Drawing.Size(260, 37)
|
||||
Me.txtChatmessage.TabIndex = 1
|
||||
Me.txtChatmessage.Text = "Anhangdokument.pdf"
|
||||
Me.lblDel.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.lblDel.AutoSize = True
|
||||
Me.lblDel.BackColor = System.Drawing.Color.Red
|
||||
Me.lblDel.Font = New System.Drawing.Font("Arial Black", 7.0!, System.Drawing.FontStyle.Bold)
|
||||
Me.lblDel.ForeColor = System.Drawing.Color.White
|
||||
Me.lblDel.Location = New System.Drawing.Point(360, 0)
|
||||
Me.lblDel.Name = "lblDel"
|
||||
Me.lblDel.Size = New System.Drawing.Size(15, 14)
|
||||
Me.lblDel.TabIndex = 7
|
||||
Me.lblDel.Text = "X"
|
||||
Me.lblDel.Visible = False
|
||||
'
|
||||
'usrCntlMessenger_ChatAnhang
|
||||
'
|
||||
@@ -135,6 +157,7 @@ Partial Class usrCntlMessenger_ChatAnhang
|
||||
Me.Name = "usrCntlMessenger_ChatAnhang"
|
||||
Me.Size = New System.Drawing.Size(378, 72)
|
||||
Me.pnl.ResumeLayout(False)
|
||||
Me.pnl.PerformLayout()
|
||||
CType(Me.pic, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
@@ -148,4 +171,6 @@ Partial Class usrCntlMessenger_ChatAnhang
|
||||
Friend WithEvents lblNewMsg As Label
|
||||
Friend WithEvents lblName As Label
|
||||
Friend WithEvents Panel1 As Panel
|
||||
Friend WithEvents Timer1 As Timer
|
||||
Friend WithEvents lblDel As Label
|
||||
End Class
|
||||
|
||||
@@ -117,4 +117,7 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="Timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -3,6 +3,7 @@
|
||||
Public Class usrCntlMessenger_ChatAnhang
|
||||
Property BG_COLOR As Color = Color.FromArgb(192, 255, 192) ' Color.Azure
|
||||
Property CHAT_MSG As VERAG_PROG_ALLGEMEIN.cMessenger.cMessenger_ChatMessages
|
||||
Dim ttp As New System.Windows.Forms.ToolTip
|
||||
|
||||
'Public FI As String = ""
|
||||
|
||||
@@ -29,21 +30,35 @@ Public Class usrCntlMessenger_ChatAnhang
|
||||
Panel1.BackColor = BG_COLOR
|
||||
End Sub
|
||||
|
||||
Private Sub usrCntlMessenger_ChatAnhang_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
Private Sub usrCntlMessenger_ChatAnhang_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
ttp.SetToolTip(lblDel, "Element innerhalb 60 Sek. löschen")
|
||||
init()
|
||||
End Sub
|
||||
|
||||
Sub init()
|
||||
If CHAT_MSG IsNot Nothing Then
|
||||
txtChatmessage.Text = CHAT_MSG.chatMg_text
|
||||
lblDateTime.Text = CHAT_MSG.chatMg_datetime.ToString("dd.MM.yyyy HH:mm:ss")
|
||||
lblName.Text = CHAT_MSG.chatMg_maName & " (" & CHAT_MSG.chatMg_maFirma & ")"
|
||||
If CHAT_MSG.chatMg_type.Contains("DEL_") Then
|
||||
txtChatmessage.Text = "*gelöscht"
|
||||
Else
|
||||
txtChatmessage.Text = CHAT_MSG.chatMg_text
|
||||
lblDateTime.Text = CHAT_MSG.chatMg_datetime.ToString("dd.MM.yyyy HH:mm:ss")
|
||||
lblName.Text = CHAT_MSG.chatMg_maName & " (" & CHAT_MSG.chatMg_maFirma & ")"
|
||||
|
||||
Dim cnt = 0
|
||||
While (txtChatmessage.Size.Width - txtChatmessage.ClientSize.Width > 10) And cnt < 20 ' (txtChatmessage.Height - txtChatmessage.ClientSize.Height) > MyRTBInnerSize Or cnt > 100
|
||||
Me.Height += 20 : cnt += 1
|
||||
End While
|
||||
setRead()
|
||||
Dim cnt = 0
|
||||
While (txtChatmessage.Size.Width - txtChatmessage.ClientSize.Width > 10) And cnt < 20 ' (txtChatmessage.Height - txtChatmessage.ClientSize.Height) > MyRTBInnerSize Or cnt > 100
|
||||
Me.Height += 20 : cnt += 1
|
||||
End While
|
||||
setRead()
|
||||
|
||||
|
||||
If CHAT_MSG.chatMg_maId = VERAG_PROG_ALLGEMEIN.cAllgemein.USRID Then
|
||||
If CHAT_MSG.chatMg_datetime > Now.AddSeconds(-60) Then
|
||||
lblDel.Visible = True
|
||||
Timer1.Enabled = True
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -55,12 +70,29 @@ Public Class usrCntlMessenger_ChatAnhang
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub pic_Click(sender As Object, e As EventArgs) Handles pic.Click, txtChatmessage.Click
|
||||
Private Sub pic_Click(sender As Object, e As EventArgs) Handles txtChatmessage.Click, pic.Click
|
||||
If CHAT_MSG IsNot Nothing Then
|
||||
Dim PATH = cDATENSERVER.GET_PDFPath_BY_DocID(CHAT_MSG.chatMg_anhang_docId, True)
|
||||
'Process.Start(PATH)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
|
||||
If CHAT_MSG IsNot Nothing Then
|
||||
If CHAT_MSG.chatMg_maId = VERAG_PROG_ALLGEMEIN.cAllgemein.USRID Then
|
||||
If CHAT_MSG.chatMg_datetime > Now.AddSeconds(-60) Then
|
||||
lblDel.Visible = True
|
||||
Else
|
||||
lblDel.Visible = False
|
||||
Timer1.Enabled = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub lblDel_Click(sender As Object, e As EventArgs) Handles lblDel.Click
|
||||
CHAT_MSG.DELETE_MESSAGE()
|
||||
usrCntlMessenger_ChatAnhang_Load(Me, New EventArgs)
|
||||
lblDel.Visible = False
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -24,12 +24,15 @@ Partial Class usrCntlMessenger_ChatElement
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.pnl = New System.Windows.Forms.Panel()
|
||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||
Me.txtChatmessage = New VERAG_PROG_ALLGEMEIN.MyRichTextBox()
|
||||
Me.lblDel = New System.Windows.Forms.Label()
|
||||
Me.lblDateTime = New System.Windows.Forms.Label()
|
||||
Me.lblName = New System.Windows.Forms.Label()
|
||||
Me.lblNewMsg = New System.Windows.Forms.Label()
|
||||
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
|
||||
Me.txtChatmessage = New VERAG_PROG_ALLGEMEIN.MyRichTextBox()
|
||||
Me.pnl.SuspendLayout()
|
||||
Me.Panel1.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
@@ -52,29 +55,26 @@ Partial Class usrCntlMessenger_ChatElement
|
||||
Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.Panel1.BackColor = System.Drawing.Color.Azure
|
||||
Me.Panel1.Controls.Add(Me.lblDel)
|
||||
Me.Panel1.Controls.Add(Me.txtChatmessage)
|
||||
Me.Panel1.Location = New System.Drawing.Point(3, 3)
|
||||
Me.Panel1.Name = "Panel1"
|
||||
Me.Panel1.Size = New System.Drawing.Size(375, 32)
|
||||
Me.Panel1.TabIndex = 2
|
||||
'
|
||||
'txtChatmessage
|
||||
'lblDel
|
||||
'
|
||||
Me.txtChatmessage.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.txtChatmessage.BackColor = System.Drawing.Color.Azure
|
||||
Me.txtChatmessage.BorderStyle = System.Windows.Forms.BorderStyle.None
|
||||
Me.txtChatmessage.Font = New System.Drawing.Font("Comic Sans MS", 12.0!)
|
||||
Me.txtChatmessage.Location = New System.Drawing.Point(4, 4)
|
||||
Me.txtChatmessage.MaxLineLength = -1
|
||||
Me.txtChatmessage.MaxLines_Warning = ""
|
||||
Me.txtChatmessage.MaxLines_Warning_Label = Nothing
|
||||
Me.txtChatmessage.Name = "txtChatmessage"
|
||||
Me.txtChatmessage.ReadOnly = True
|
||||
Me.txtChatmessage.Size = New System.Drawing.Size(368, 25)
|
||||
Me.txtChatmessage.TabIndex = 0
|
||||
Me.txtChatmessage.Text = "Hallo, wie gehts?"
|
||||
Me.lblDel.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.lblDel.AutoSize = True
|
||||
Me.lblDel.BackColor = System.Drawing.Color.Red
|
||||
Me.lblDel.Font = New System.Drawing.Font("Arial Black", 7.0!, System.Drawing.FontStyle.Bold)
|
||||
Me.lblDel.ForeColor = System.Drawing.Color.White
|
||||
Me.lblDel.Location = New System.Drawing.Point(357, 0)
|
||||
Me.lblDel.Name = "lblDel"
|
||||
Me.lblDel.Size = New System.Drawing.Size(15, 14)
|
||||
Me.lblDel.TabIndex = 5
|
||||
Me.lblDel.Text = "X"
|
||||
Me.lblDel.Visible = False
|
||||
'
|
||||
'lblDateTime
|
||||
'
|
||||
@@ -114,6 +114,28 @@ Partial Class usrCntlMessenger_ChatElement
|
||||
Me.lblNewMsg.Text = "!"
|
||||
Me.lblNewMsg.Visible = False
|
||||
'
|
||||
'Timer1
|
||||
'
|
||||
Me.Timer1.Interval = 2000
|
||||
'
|
||||
'txtChatmessage
|
||||
'
|
||||
Me.txtChatmessage.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.txtChatmessage.BackColor = System.Drawing.Color.Azure
|
||||
Me.txtChatmessage.BorderStyle = System.Windows.Forms.BorderStyle.None
|
||||
Me.txtChatmessage.Font = New System.Drawing.Font("Comic Sans MS", 12.0!)
|
||||
Me.txtChatmessage.Location = New System.Drawing.Point(4, 4)
|
||||
Me.txtChatmessage.MaxLineLength = -1
|
||||
Me.txtChatmessage.MaxLines_Warning = ""
|
||||
Me.txtChatmessage.MaxLines_Warning_Label = Nothing
|
||||
Me.txtChatmessage.Name = "txtChatmessage"
|
||||
Me.txtChatmessage.ReadOnly = True
|
||||
Me.txtChatmessage.Size = New System.Drawing.Size(368, 25)
|
||||
Me.txtChatmessage.TabIndex = 0
|
||||
Me.txtChatmessage.Text = "Hallo, wie gehts?"
|
||||
'
|
||||
'usrCntlMessenger_ChatElement
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@@ -125,6 +147,7 @@ Partial Class usrCntlMessenger_ChatElement
|
||||
Me.pnl.ResumeLayout(False)
|
||||
Me.pnl.PerformLayout()
|
||||
Me.Panel1.ResumeLayout(False)
|
||||
Me.Panel1.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
@@ -135,4 +158,6 @@ Partial Class usrCntlMessenger_ChatElement
|
||||
Friend WithEvents Panel1 As Panel
|
||||
Friend WithEvents txtChatmessage As VERAG_PROG_ALLGEMEIN.MyRichTextBox
|
||||
Friend WithEvents lblNewMsg As Label
|
||||
Friend WithEvents lblDel As Label
|
||||
Friend WithEvents Timer1 As Timer
|
||||
End Class
|
||||
|
||||
@@ -117,4 +117,7 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="Timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -3,6 +3,7 @@
|
||||
Public Class usrCntlMessenger_ChatElement
|
||||
Property CHAT_MSG As VERAG_PROG_ALLGEMEIN.cMessenger.cMessenger_ChatMessages
|
||||
'Property BG_COLOR As Color = Color.FromArgb(192, 255, 192) ' Color.Azure
|
||||
Dim ttp As New System.Windows.Forms.ToolTip
|
||||
|
||||
Sub New()
|
||||
|
||||
@@ -28,17 +29,32 @@ Public Class usrCntlMessenger_ChatElement
|
||||
End Sub
|
||||
|
||||
Private Sub usrCntlMessenger_ChatElement_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
ttp.SetToolTip(lblDel, "Element innerhalb 60 Sek. löschen")
|
||||
' setBgCOLOR(Color.Azure)
|
||||
If CHAT_MSG IsNot Nothing Then
|
||||
lblDateTime.Text = CHAT_MSG.chatMg_datetime.ToString("dd.MM.yyyy HH:mm:ss")
|
||||
lblName.Text = CHAT_MSG.chatMg_maName & " (" & CHAT_MSG.chatMg_maFirma & ")"
|
||||
txtChatmessage.Text = CHAT_MSG.chatMg_text
|
||||
Dim cnt = 0
|
||||
While (txtChatmessage.Size.Width - txtChatmessage.ClientSize.Width > 10) And cnt < 20 ' (txtChatmessage.Height - txtChatmessage.ClientSize.Height) > MyRTBInnerSize Or cnt > 100
|
||||
Me.Height += 20 : cnt += 1
|
||||
End While
|
||||
setRead()
|
||||
If CHAT_MSG.chatMg_type.Contains("DEL_") Then
|
||||
txtChatmessage.Text = "*gelöscht"
|
||||
Else
|
||||
|
||||
lblDateTime.Text = CHAT_MSG.chatMg_datetime.ToString("dd.MM.yyyy HH:mm:ss")
|
||||
lblName.Text = CHAT_MSG.chatMg_maName & " (" & CHAT_MSG.chatMg_maFirma & ")"
|
||||
txtChatmessage.Text = CHAT_MSG.chatMg_text
|
||||
Dim cnt = 0
|
||||
While (txtChatmessage.Size.Width - txtChatmessage.ClientSize.Width > 10) And cnt < 20 ' (txtChatmessage.Height - txtChatmessage.ClientSize.Height) > MyRTBInnerSize Or cnt > 100
|
||||
Me.Height += 20 : cnt += 1
|
||||
End While
|
||||
setRead()
|
||||
|
||||
If CHAT_MSG.chatMg_maId = VERAG_PROG_ALLGEMEIN.cAllgemein.USRID Then
|
||||
If CHAT_MSG.chatMg_datetime > Now.AddSeconds(-60) Then
|
||||
lblDel.Visible = True
|
||||
Timer1.Enabled = True
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Sub setRead()
|
||||
@@ -48,4 +64,23 @@ Public Class usrCntlMessenger_ChatElement
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
|
||||
If CHAT_MSG IsNot Nothing Then
|
||||
If CHAT_MSG.chatMg_maId = VERAG_PROG_ALLGEMEIN.cAllgemein.USRID Then
|
||||
If CHAT_MSG.chatMg_datetime > Now.AddSeconds(-60) Then
|
||||
lblDel.Visible = True
|
||||
Else
|
||||
lblDel.Visible = False
|
||||
Timer1.Enabled = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub lblDel_Click(sender As Object, e As EventArgs) Handles lblDel.Click
|
||||
CHAT_MSG.DELETE_MESSAGE()
|
||||
usrCntlMessenger_ChatElement_Load(Me, New EventArgs)
|
||||
lblDel.Visible = False
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
66
VERAG_PROG_ALLGEMEIN/Messenger/usrCntlMessenger_ChatElementDEL.Designer.vb
generated
Normal file
66
VERAG_PROG_ALLGEMEIN/Messenger/usrCntlMessenger_ChatElementDEL.Designer.vb
generated
Normal file
@@ -0,0 +1,66 @@
|
||||
Imports System.Windows.Forms
|
||||
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Class usrCntlMessenger_ChatElementDEL
|
||||
Inherits System.Windows.Forms.UserControl
|
||||
|
||||
'UserControl überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||
<System.Diagnostics.DebuggerNonUserCode()>
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Wird vom Windows Form-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Me.pnl = New System.Windows.Forms.Panel()
|
||||
Me.lblName = New System.Windows.Forms.Label()
|
||||
Me.pnl.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'pnl
|
||||
'
|
||||
Me.pnl.Controls.Add(Me.lblName)
|
||||
Me.pnl.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.pnl.Location = New System.Drawing.Point(0, 0)
|
||||
Me.pnl.Name = "pnl"
|
||||
Me.pnl.Size = New System.Drawing.Size(378, 18)
|
||||
Me.pnl.TabIndex = 0
|
||||
'
|
||||
'lblName
|
||||
'
|
||||
Me.lblName.Font = New System.Drawing.Font("Microsoft Sans Serif", 7.0!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle))
|
||||
Me.lblName.ForeColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
|
||||
Me.lblName.Location = New System.Drawing.Point(4, 1)
|
||||
Me.lblName.Name = "lblName"
|
||||
Me.lblName.Size = New System.Drawing.Size(193, 13)
|
||||
Me.lblName.TabIndex = 0
|
||||
Me.lblName.Text = "*gelöschtes Element"
|
||||
'
|
||||
'usrCntlMessenger_ChatElementDEL
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.BackColor = System.Drawing.Color.White
|
||||
Me.Controls.Add(Me.pnl)
|
||||
Me.Name = "usrCntlMessenger_ChatElementDEL"
|
||||
Me.Size = New System.Drawing.Size(378, 18)
|
||||
Me.pnl.ResumeLayout(False)
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents pnl As Panel
|
||||
Friend WithEvents lblName As Label
|
||||
End Class
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,27 @@
|
||||
Imports System.Drawing
|
||||
|
||||
Public Class usrCntlMessenger_ChatElementDEL
|
||||
Property CHAT_MSG As VERAG_PROG_ALLGEMEIN.cMessenger.cMessenger_ChatMessages
|
||||
'Property BG_COLOR As Color = Color.FromArgb(192, 255, 192) ' Color.Azure
|
||||
|
||||
Sub New()
|
||||
|
||||
' Dieser Aufruf ist für den Designer erforderlich.
|
||||
InitializeComponent()
|
||||
|
||||
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
||||
|
||||
End Sub
|
||||
|
||||
Sub New(CHAT_MSG As VERAG_PROG_ALLGEMEIN.cMessenger.cMessenger_ChatMessages)
|
||||
|
||||
' Dieser Aufruf ist für den Designer erforderlich.
|
||||
InitializeComponent()
|
||||
Me.CHAT_MSG = CHAT_MSG
|
||||
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
@@ -24,18 +24,22 @@ Partial Class usrCntlMessenger_ChatEmoji
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.pnl = New System.Windows.Forms.Panel()
|
||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||
Me.pic = New System.Windows.Forms.PictureBox()
|
||||
Me.lblDateTime = New System.Windows.Forms.Label()
|
||||
Me.lblNewMsg = New System.Windows.Forms.Label()
|
||||
Me.lblName = New System.Windows.Forms.Label()
|
||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
|
||||
Me.lblDel = New System.Windows.Forms.Label()
|
||||
Me.pnl.SuspendLayout()
|
||||
CType(Me.pic, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'pnl
|
||||
'
|
||||
Me.pnl.Controls.Add(Me.lblDel)
|
||||
Me.pnl.Controls.Add(Me.Panel1)
|
||||
Me.pnl.Controls.Add(Me.pic)
|
||||
Me.pnl.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
@@ -44,6 +48,16 @@ Partial Class usrCntlMessenger_ChatEmoji
|
||||
Me.pnl.Size = New System.Drawing.Size(378, 72)
|
||||
Me.pnl.TabIndex = 0
|
||||
'
|
||||
'Panel1
|
||||
'
|
||||
Me.Panel1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.Panel1.BackColor = System.Drawing.Color.Azure
|
||||
Me.Panel1.Location = New System.Drawing.Point(2, 55)
|
||||
Me.Panel1.Name = "Panel1"
|
||||
Me.Panel1.Size = New System.Drawing.Size(375, 3)
|
||||
Me.Panel1.TabIndex = 3
|
||||
'
|
||||
'pic
|
||||
'
|
||||
Me.pic.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
@@ -95,15 +109,23 @@ Partial Class usrCntlMessenger_ChatEmoji
|
||||
Me.lblName.TabIndex = 4
|
||||
Me.lblName.Text = "Max Mustermann (VERAG)"
|
||||
'
|
||||
'Panel1
|
||||
'Timer1
|
||||
'
|
||||
Me.Panel1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.Panel1.BackColor = System.Drawing.Color.Azure
|
||||
Me.Panel1.Location = New System.Drawing.Point(2, 55)
|
||||
Me.Panel1.Name = "Panel1"
|
||||
Me.Panel1.Size = New System.Drawing.Size(375, 3)
|
||||
Me.Panel1.TabIndex = 3
|
||||
Me.Timer1.Interval = 2000
|
||||
'
|
||||
'lblDel
|
||||
'
|
||||
Me.lblDel.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.lblDel.AutoSize = True
|
||||
Me.lblDel.BackColor = System.Drawing.Color.Red
|
||||
Me.lblDel.Font = New System.Drawing.Font("Arial Black", 7.0!, System.Drawing.FontStyle.Bold)
|
||||
Me.lblDel.ForeColor = System.Drawing.Color.White
|
||||
Me.lblDel.Location = New System.Drawing.Point(364, 0)
|
||||
Me.lblDel.Name = "lblDel"
|
||||
Me.lblDel.Size = New System.Drawing.Size(15, 14)
|
||||
Me.lblDel.TabIndex = 8
|
||||
Me.lblDel.Text = "X"
|
||||
Me.lblDel.Visible = False
|
||||
'
|
||||
'usrCntlMessenger_ChatEmoji
|
||||
'
|
||||
@@ -117,6 +139,7 @@ Partial Class usrCntlMessenger_ChatEmoji
|
||||
Me.Name = "usrCntlMessenger_ChatEmoji"
|
||||
Me.Size = New System.Drawing.Size(378, 72)
|
||||
Me.pnl.ResumeLayout(False)
|
||||
Me.pnl.PerformLayout()
|
||||
CType(Me.pic, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
@@ -129,4 +152,6 @@ Partial Class usrCntlMessenger_ChatEmoji
|
||||
Friend WithEvents lblNewMsg As Label
|
||||
Friend WithEvents lblName As Label
|
||||
Friend WithEvents Panel1 As Panel
|
||||
Friend WithEvents Timer1 As Timer
|
||||
Friend WithEvents lblDel As Label
|
||||
End Class
|
||||
|
||||
@@ -117,4 +117,7 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="Timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -5,6 +5,7 @@ Public Class usrCntlMessenger_ChatEmoji
|
||||
Property CHAT_MSG As VERAG_PROG_ALLGEMEIN.cMessenger.cMessenger_ChatMessages
|
||||
Dim frmM As frmMessenger
|
||||
'Public FI As String = ""
|
||||
Dim ttp As New System.Windows.Forms.ToolTip
|
||||
|
||||
Sub New()
|
||||
|
||||
@@ -29,40 +30,52 @@ Public Class usrCntlMessenger_ChatEmoji
|
||||
Panel1.BackColor = BG_COLOR
|
||||
End Sub
|
||||
|
||||
Private Sub usrCntlMessenger_ChatAnhang_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
Private Sub usrCntlMessenger_ChatAnhang_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
ttp.SetToolTip(lblDel, "Element innerhalb 60 Sek. löschen")
|
||||
init()
|
||||
End Sub
|
||||
|
||||
Sub init()
|
||||
If CHAT_MSG IsNot Nothing Then
|
||||
' txtChatmessage.Text = CHAT_MSG.chatMg_text
|
||||
If CHAT_MSG.chatMg_type.Contains("DEL_") Then
|
||||
pic.Visible = False
|
||||
Else
|
||||
' txtChatmessage.Text = CHAT_MSG.chatMg_text
|
||||
|
||||
Dim imgPath = CHAT_MSG.chatMg_text
|
||||
Try
|
||||
'Dim frmM As frmMessenger = DirectCast(Me.Parent, frmMessenger)
|
||||
If frmM.EMOJI_PATH <> frmM.EMOJI_PATH_MAIN Then
|
||||
If IO.File.Exists(imgPath.Replace(frmM.EMOJI_PATH_MAIN, frmM.EMOJI_PATH)) Then
|
||||
imgPath = imgPath.Replace(frmM.EMOJI_PATH_MAIN, frmM.EMOJI_PATH)
|
||||
Dim imgPath = CHAT_MSG.chatMg_text
|
||||
Try
|
||||
'Dim frmM As frmMessenger = DirectCast(Me.Parent, frmMessenger)
|
||||
If frmM.EMOJI_PATH <> frmM.EMOJI_PATH_MAIN Then
|
||||
If IO.File.Exists(imgPath.Replace(frmM.EMOJI_PATH_MAIN, frmM.EMOJI_PATH)) Then
|
||||
imgPath = imgPath.Replace(frmM.EMOJI_PATH_MAIN, frmM.EMOJI_PATH)
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & ex.StackTrace)
|
||||
End Try
|
||||
|
||||
Try
|
||||
pic.BackgroundImage = Image.FromFile(imgPath)
|
||||
pic.BackgroundImageLayout = Windows.Forms.ImageLayout.Zoom
|
||||
Catch ex As Exception
|
||||
' MsgBox(ex.Message & ex.StackTrace)
|
||||
End Try
|
||||
lblDateTime.Text = CHAT_MSG.chatMg_datetime.ToString("dd.MM.yyyy HH:mm:ss")
|
||||
lblName.Text = CHAT_MSG.chatMg_maName & " (" & CHAT_MSG.chatMg_maFirma & ")"
|
||||
|
||||
Dim cnt = 0
|
||||
|
||||
setRead()
|
||||
|
||||
|
||||
If CHAT_MSG.chatMg_maId = VERAG_PROG_ALLGEMEIN.cAllgemein.USRID Then
|
||||
If CHAT_MSG.chatMg_datetime > Now.AddSeconds(-60) Then
|
||||
lblDel.Visible = True
|
||||
Timer1.Enabled = True
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & ex.StackTrace)
|
||||
End Try
|
||||
|
||||
Try
|
||||
pic.BackgroundImage = Image.FromFile(imgPath)
|
||||
pic.BackgroundImageLayout = Windows.Forms.ImageLayout.Zoom
|
||||
Catch ex As Exception
|
||||
' MsgBox(ex.Message & ex.StackTrace)
|
||||
End Try
|
||||
lblDateTime.Text = CHAT_MSG.chatMg_datetime.ToString("dd.MM.yyyy HH:mm:ss")
|
||||
lblName.Text = CHAT_MSG.chatMg_maName & " (" & CHAT_MSG.chatMg_maFirma & ")"
|
||||
|
||||
Dim cnt = 0
|
||||
|
||||
setRead()
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -81,5 +94,22 @@ Public Class usrCntlMessenger_ChatEmoji
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
|
||||
If CHAT_MSG IsNot Nothing Then
|
||||
If CHAT_MSG.chatMg_maId = VERAG_PROG_ALLGEMEIN.cAllgemein.USRID Then
|
||||
If CHAT_MSG.chatMg_datetime > Now.AddSeconds(-60) Then
|
||||
lblDel.Visible = True
|
||||
Else
|
||||
lblDel.Visible = False
|
||||
Timer1.Enabled = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub lblDel_Click(sender As Object, e As EventArgs) Handles lblDel.Click
|
||||
CHAT_MSG.DELETE_MESSAGE()
|
||||
usrCntlMessenger_ChatAnhang_Load(Me, New EventArgs)
|
||||
lblDel.Visible = False
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
12
VERAG_PROG_ALLGEMEIN/My Project/Settings.Designer.vb
generated
12
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.0.3.0"), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.1.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Public NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
@@ -324,6 +324,16 @@ Namespace My
|
||||
Return CType(Me("VERAG_PROG_ALLGEMEIN_RKSV_DE_DSFinVKService_DSFinVKServer"),String)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.SpecialSettingAttribute(Global.System.Configuration.SpecialSetting.WebServiceUrl), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("http://ec.europa.eu/taxation_customs/vies/services/checkVatTestService")> _
|
||||
Public ReadOnly Property VERAG_PROG_ALLGEMEIN_eu_europa_ec_checkVatTestService() As String
|
||||
Get
|
||||
Return CType(Me("VERAG_PROG_ALLGEMEIN_eu_europa_ec_checkVatTestService"),String)
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
|
||||
@@ -142,5 +142,8 @@
|
||||
<Setting Name="VERAG_PROG_ALLGEMEIN_RKSV_DE_DSFinVKService_DSFinVKServer" Type="(Web Service URL)" Scope="Application">
|
||||
<Value Profile="(Default)">http://localhost:8733/DSFinVKService</Value>
|
||||
</Setting>
|
||||
<Setting Name="VERAG_PROG_ALLGEMEIN_eu_europa_ec_checkVatTestService" Type="(Web Service URL)" Scope="Application">
|
||||
<Value Profile="(Default)">http://ec.europa.eu/taxation_customs/vies/services/checkVatTestService</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@@ -0,0 +1,275 @@
|
||||
Imports SDL.at.gv.bmf.finanzonlineLogin
|
||||
|
||||
|
||||
' Aufruf des Webservice von FinanzOnline zur prüfung der UID-Nummer
|
||||
' Aufgrund von verzögerten Bestätigungen wurd diese Funktion deaktiviert!!!
|
||||
|
||||
Public Class cFinanzOnlineWebService
|
||||
' Private tid As String = My.Resources.tid
|
||||
' Private benid As String = My.Resources.benid
|
||||
' Private pin As String = My.Resources.pin
|
||||
|
||||
' 'VERAG:
|
||||
'Shared tid As String = "1000103u3032"
|
||||
'Shared benid As String = "webserv99"
|
||||
'Shared pin As String = "webserv99"
|
||||
'Shared uid As String = "ATU53187000"
|
||||
|
||||
' 'VERAG CS:
|
||||
'Shared tid As String = "19379933"
|
||||
'Shared benid As String = "WEBserv99"
|
||||
'Shared pin As String = "WEBserv99"
|
||||
'Shared uid As String = "XXXX"
|
||||
|
||||
|
||||
''FRONT-Office:
|
||||
'Shared tid As String = "67493371k039"
|
||||
'Shared benid As String = "WEBserv99"
|
||||
'Shared pin As String = "WEBserv99"
|
||||
'Shared uid As String = "ATU74813856"
|
||||
|
||||
|
||||
'IMEX:
|
||||
Shared tid As String = "19435107n654"
|
||||
Shared benid As String = "WEBserv99"
|
||||
Shared pin As String = "WEBserv99"
|
||||
Shared uid As String = "ATU68490714"
|
||||
|
||||
|
||||
Public SESSION_ID As String = ""
|
||||
|
||||
Sub initValues()
|
||||
|
||||
Select Case VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA
|
||||
Case "IMEX"
|
||||
tid = "19435107n654"
|
||||
benid = "WEBserv99"
|
||||
pin = "WEBserv99"
|
||||
uid = "ATU68490714"
|
||||
Case "FRONTOFFICE"
|
||||
tid = "67493371k039"
|
||||
benid = "WEBserv99"
|
||||
pin = "WEBserv99"
|
||||
uid = "ATU74813856"
|
||||
Case "UNISPED"
|
||||
tid = "18778752z632"
|
||||
benid = "Webmaster1"
|
||||
pin = "Webmaster1"
|
||||
uid = "ATU67001200"
|
||||
Case Else 'VERAG:
|
||||
tid = "13390891m005"
|
||||
benid = "WEBserv99"
|
||||
pin = "WEBserv99"
|
||||
uid = "ATU53187000"
|
||||
'tid = "1000103u3032"
|
||||
'benid = "webserv99"
|
||||
'pin = "webserv99"
|
||||
'uid = "ATU53187000"
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Function Call_Web_Service_MethodUID_Login_NEU2020() As Integer
|
||||
Dim CallWebService As New VERAG_PROG_ALLGEMEIN.at.gv.bmf.finanzonline.session.sessionService
|
||||
Try
|
||||
Dim rc As Integer = -1
|
||||
Dim msg = ""
|
||||
|
||||
SESSION_ID = CallWebService.login(tid, benid, pin, uid, rc, msg)
|
||||
|
||||
Return rc
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & ex.StackTrace)
|
||||
End Try
|
||||
Return -99
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
Function Call_Web_Service_MethodUID_Abfrage_NEU2020(ba_KundenNr, Optional AskIfDouble = False, Optional SaveErgInAdressen = True, Optional showErr = True, Optional Stufe = 1) As VERAG_PROG_ALLGEMEIN.cUIDPruefung
|
||||
Dim AD As New cAdressen(ba_KundenNr)
|
||||
If AD IsNot Nothing Then
|
||||
If AD.UstIdKz IsNot Nothing AndAlso AD.UstIdNr IsNot Nothing Then
|
||||
Try
|
||||
If AskIfDouble Then
|
||||
If IsDate(AD.UstIdGeprüft) AndAlso CDate(AD.UstIdGeprüft).ToShortDateString = Now.ToShortDateString Then
|
||||
If vbYes <> MsgBox("Die UID-Nummer wurde heute bereits geprüft. Soll die Prüfung nochmal durchgeführt werden?", vbYesNoCancel) Then
|
||||
Return Nothing
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim tmp_SESSION_ID = SESSION_ID
|
||||
Dim CallWebService As New VERAG_PROG_ALLGEMEIN.at.gv.bmf.finanzonline.uidAbfrageService
|
||||
|
||||
Dim msg As String = ""
|
||||
Dim name As String = ""
|
||||
Dim adrz1 As String = ""
|
||||
Dim adrz2 As String = ""
|
||||
Dim adrz3 As String = ""
|
||||
Dim adrz4 As String = ""
|
||||
Dim adrz5 As String = ""
|
||||
Dim adrz6 As String = ""
|
||||
Dim countryCode As String = AD.UstIdKz
|
||||
Dim vatNumber As String = AD.UstIdNr
|
||||
|
||||
Dim StufeAbf = VERAG_PROG_ALLGEMEIN.at.gv.bmf.finanzonline.uidAbfrageServiceRequestStufe.Item1
|
||||
Select Case Stufe
|
||||
Case 1
|
||||
StufeAbf = VERAG_PROG_ALLGEMEIN.at.gv.bmf.finanzonline.uidAbfrageServiceRequestStufe.Item1
|
||||
Case 2
|
||||
StufeAbf = VERAG_PROG_ALLGEMEIN.at.gv.bmf.finanzonline.uidAbfrageServiceRequestStufe.Item2
|
||||
End Select
|
||||
|
||||
Dim returnInt As Integer = CallWebService.uidAbfrage(tid, benid, SESSION_ID, uid, countryCode & vatNumber, StufeAbf, msg, name, adrz1, adrz2, adrz3, adrz4, adrz5, adrz6)
|
||||
|
||||
If returnInt = 0 Or returnInt = 1 Then
|
||||
|
||||
Dim UID_TMP As New VERAG_PROG_ALLGEMEIN.cUIDPruefung
|
||||
|
||||
UID_TMP.uid_Datum = Now
|
||||
UID_TMP.uid_Sachbearbeiter = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME
|
||||
If If(UID_TMP.uid_Sachbearbeiter, "") = "" Then UID_TMP.uid_Sachbearbeiter = "AUTO"
|
||||
UID_TMP.uid_MaId = VERAG_PROG_ALLGEMEIN.cAllgemein.USRID
|
||||
UID_TMP.uid_valid = (returnInt = 0)
|
||||
UID_TMP.uid_KundenNr = ba_KundenNr
|
||||
|
||||
|
||||
UID_TMP.uid_UstIdKz = countryCode
|
||||
UID_TMP.uid_UstIdNr = vatNumber
|
||||
|
||||
UID_TMP.Firma = If(VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA, "VERAG")
|
||||
UID_TMP.uid_abfrageUid = uid
|
||||
UID_TMP.uid_sessionId = tmp_SESSION_ID
|
||||
|
||||
UID_TMP.uid_firma = name
|
||||
UID_TMP.uid_adr1 = adrz1
|
||||
UID_TMP.uid_adr2 = adrz2
|
||||
UID_TMP.uid_adr3 = adrz3
|
||||
UID_TMP.uid_adr4 = adrz4
|
||||
UID_TMP.uid_adr5 = adrz5
|
||||
UID_TMP.uid_adr6 = adrz6
|
||||
|
||||
UID_TMP.uid_stufe = Stufe
|
||||
|
||||
UID_TMP.SAVE()
|
||||
If (returnInt = 0) Then 'OK
|
||||
If SaveErgInAdressen Then
|
||||
AD.UstIdGeprüft = Now.ToShortDateString
|
||||
AD.SAVE()
|
||||
End If
|
||||
|
||||
End If
|
||||
Return UID_TMP
|
||||
End If
|
||||
Catch ex As Exception
|
||||
If showErr Then MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
|
||||
' Call_Web_Service_MethodUID_Logout_NEU2020()
|
||||
End Try
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'If returnInt = 0 Then
|
||||
' Firma = name & vbNewLine & adrz1
|
||||
' If adrz2 <> "" Then Firma = Firma & vbNewLine & adrz2
|
||||
' If adrz3 <> "" Then Firma = Firma & vbNewLine & adrz3
|
||||
' If adrz4 <> "" Then Firma = Firma & vbNewLine & adrz4
|
||||
' If adrz5 <> "" Then Firma = Firma & vbNewLine & adrz5
|
||||
' If adrz6 <> "" Then Firma = Firma & vbNewLine & adrz6
|
||||
|
||||
' ' frmUIDCheck.firmaUIDFinanzOnline = firma
|
||||
' ' frmUIDCheck.firmaUIDProgramm = txtFirma
|
||||
' ' frmUIDCheck.uidnr = txtUid
|
||||
' ' frmUIDCheck.Show()
|
||||
|
||||
|
||||
'Else
|
||||
' MsgBox(GetCodeText(returnInt))
|
||||
'End If
|
||||
' msgErgebnis = msg
|
||||
' Call_Web_Service_MethodUID_Logout_NEU2020()
|
||||
|
||||
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
Function GetUIDLand(uid As String)
|
||||
If uid.Length > 2 Then
|
||||
Return uid.Substring(0, 2)
|
||||
End If
|
||||
'Dim uidLand = ""
|
||||
'For Each s In uid
|
||||
' If IsNumeric(s) Then Return uidLand
|
||||
' uidLand &= s
|
||||
'Next
|
||||
'Return uidLand
|
||||
End Function
|
||||
|
||||
|
||||
Function GetUidNr(uid As String)
|
||||
If uid.Length > 2 Then
|
||||
Return uid.Substring(2, uid.Length - 2)
|
||||
End If
|
||||
'Dim uidLand = ""
|
||||
'For Each s In uid
|
||||
' If IsNumeric(s) Then uidLand &= s
|
||||
'Next
|
||||
'Return uidLand
|
||||
|
||||
End Function
|
||||
Function GetCodeText(rc As Integer)
|
||||
Select Case rc
|
||||
Case 0 : Return "Die UID des Erwerbers ist gültig."
|
||||
Case -1 : Return "Die Session ID ist ungültig oder abgelaufen."
|
||||
Case -2 : Return "Der Aufruf des Webservices ist derzeit wegen Wartungsarbeiten nicht möglich."
|
||||
Case -3 : Return "Es ist ein technischer Fehler aufgetreten."
|
||||
Case -4 : Return "Dieser Teilnehmer ist für diese Funktion nicht berechtigt."
|
||||
Case 1 : Return "Die UID des Erwerbers ist nicht gültig."
|
||||
Case 4 : Return "Die UID-Nummer des Erwerbers ist falsch."
|
||||
Case 5 : Return "Die UID-Nummer des Antragstellers ist ungültig."
|
||||
Case 10 : Return "Der angegebene Mitgliedstaat verbietet diese Abfrage."
|
||||
Case 101 : Return "UID beginnt nicht mit ATU."
|
||||
Case 103 : Return "Die angefragte UID-Nummer kann im FinanzOnline nur in Stufe 1 bestätigt werden,
|
||||
da diese UID-Nummer zu einer Unternehmensgruppe (Umsatzsteuergruppe) gehört.
|
||||
Aus technischen Gründen werden aus Tschechien keine Firmendaten angezeigt. Für
|
||||
eine gültige Stufe 2 Abfrage ist es daher erforderlich, dass Sie unter
|
||||
http://adisreg.mfcr.cz die Daten der CZ-Umsatzsteuergruppe aufrufen und
|
||||
kontrollieren, ob das angefragte Unternehmen auch tatsächlich zu dieser Gruppe
|
||||
gehört.Bitte bewahren Sie den Ausdruck dieser Anfrage in Ihren Unterlagen als
|
||||
Beleg gemäß § 132 BAO auf. Für jede Anfrage Stufe 2 ist sowohl das
|
||||
Bestätigungsverfahren in Stufe 1 im FinanzOnline als auch das Gruppenregister im
|
||||
anderen Mitgliedsstaat laut o.a. Link zu konsultieren. Im Falle von Fragen wenden
|
||||
Sie sich bitte an Ihr zuständiges Finanzamt."
|
||||
Case 104 : Return "Die angefragte UID-Nummer kann im FinanzOnline nur in Stufe 1 bestätigt werden,
|
||||
da diese UID-Nummer zu einer Unternehmensgruppe (Umsatzsteuergruppe) gehört.
|
||||
Aus technischen Gründen werden aus der Slowakei keine Firmendaten angezeigt.
|
||||
Für eine gültige Stufe 2 Abfrage ist es daher erforderlich, dass Sie unter
|
||||
http://www.drsr.sk die Daten der SK-Umsatzsteuergruppe aufrufen und kontrollieren,
|
||||
ob das angefragte Unternehmen auch tatsächlich zu dieser Gruppe gehört. Bitte
|
||||
bewahren Sie den Ausdruck dieser Anfrage in Ihren Unterlagen als Beleg gemäß §Bundesministerium für Finanzen Seite 3 von 3
|
||||
Stand: 27.10.2016 BAO auf. Für jede Anfrage Stufe 2 ist sowohl das Bestätigungsverfahren In Stufe
|
||||
1 im FinanzOnline als auch das Gruppenregister im anderen Mitgliedsstaat laut o.a.
|
||||
Link zu konsultieren. Im Falle von Fragen wenden Sie sich bitte an Ihr zuständiges
|
||||
Finanzamt."
|
||||
Case 105 : Return "Die UID-Nummer ist über FinanzOnline einzeln abzufragen."
|
||||
Case 1511 : Return "Der angegebene Mitgliedstaat ist derzeit nicht erreichbar"
|
||||
Case Else : Return "Unbekannter Fehler: " & rc
|
||||
End Select
|
||||
End Function
|
||||
Function Call_Web_Service_MethodUID_Logout_NEU2020() As String
|
||||
Dim CallWebService As New VERAG_PROG_ALLGEMEIN.at.gv.bmf.finanzonline.session.sessionService
|
||||
Try
|
||||
Dim msg = ""
|
||||
Dim sGetValue As String = CallWebService.logout(tid, benid, SESSION_ID, msg)
|
||||
Return sGetValue
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
End Try
|
||||
Return ""
|
||||
End Function
|
||||
End Class
|
||||
3136
VERAG_PROG_ALLGEMEIN/Schnittstellen/IDEV_Intrastat/instat6.2.Designer.vb
generated
Normal file
3136
VERAG_PROG_ALLGEMEIN/Schnittstellen/IDEV_Intrastat/instat6.2.Designer.vb
generated
Normal file
File diff suppressed because it is too large
Load Diff
236
VERAG_PROG_ALLGEMEIN/Schnittstellen/IDEV_Intrastat/instat6.2.xsd
Normal file
236
VERAG_PROG_ALLGEMEIN/Schnittstellen/IDEV_Intrastat/instat6.2.xsd
Normal file
@@ -0,0 +1,236 @@
|
||||
<?xml version = "1.0" encoding = "ISO-8859-1"?>
|
||||
<xsd:schema xmlns:xsd = "http://www.w3.org/2001/XMLSchema">
|
||||
<xsd:element name = "INSTAT">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element ref = "Envelope"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name = "Envelope">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element ref = "envelopeId"/>
|
||||
<xsd:element ref = "DateTime"/>
|
||||
<xsd:element ref = "Party" maxOccurs = "unbounded"/>
|
||||
<xsd:element ref = "acknowlegementRequest" minOccurs = "0"/>
|
||||
<xsd:element ref = "authentication" minOccurs = "0"/>
|
||||
<xsd:element ref = "testIndicator" minOccurs = "0"/>
|
||||
<xsd:element ref = "applicationReference" minOccurs = "0"/>
|
||||
<xsd:element ref = "softwareUsed" minOccurs = "0"/>
|
||||
<xsd:element ref = "Declaration" maxOccurs = "unbounded"/>
|
||||
<xsd:element ref = "numberOfDeclarations" minOccurs = "0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name = "envelopeId" type = "xsd:string"/>
|
||||
<xsd:element name = "DateTime">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element ref = "date"/>
|
||||
<xsd:element ref = "time" minOccurs = "0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name = "Party">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element ref = "partyId"/>
|
||||
<xsd:element ref = "partyName" minOccurs = "0"/>
|
||||
<xsd:element ref = "interchangeAgreementId" minOccurs = "0"/>
|
||||
<xsd:element ref = "password" minOccurs = "0"/>
|
||||
<xsd:element ref = "Address" minOccurs = "0"/>
|
||||
<xsd:element ref = "ContactPerson" minOccurs = "0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name = "partyType" use = "required">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base = "xsd:NMTOKEN">
|
||||
<xsd:enumeration value = "PSI"/>
|
||||
<xsd:enumeration value = "TDP"/>
|
||||
<xsd:enumeration value = "CC"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name = "partyRole" use = "required">
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base = "xsd:NMTOKEN">
|
||||
<xsd:enumeration value = "sender"/>
|
||||
<xsd:enumeration value = "receiver"/>
|
||||
<xsd:enumeration value = "PSI"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name = "partyId" type = "xsd:string"/>
|
||||
<xsd:element name = "partyName" type = "xsd:string"/>
|
||||
<xsd:element name = "interchangeAgreementId" type = "xsd:string"/>
|
||||
<xsd:element name = "password" type = "xsd:string"/>
|
||||
<xsd:element name = "Address">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element ref = "streetName" minOccurs = "0"/>
|
||||
<xsd:element ref = "streetNumber" minOccurs = "0"/>
|
||||
<xsd:element ref = "postalCode" minOccurs = "0"/>
|
||||
<xsd:element ref = "cityName" minOccurs = "0"/>
|
||||
<xsd:element ref = "countryName" minOccurs = "0"/>
|
||||
<xsd:element ref = "phoneNumber" minOccurs = "0"/>
|
||||
<xsd:element ref = "faxNumber" minOccurs = "0"/>
|
||||
<xsd:element ref = "e-mail" minOccurs = "0"/>
|
||||
<xsd:element ref = "URL" minOccurs = "0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name = "streetName" type = "xsd:string"/>
|
||||
<xsd:element name = "streetNumber" type = "xsd:string"/>
|
||||
<xsd:element name = "postalCode" type = "xsd:string"/>
|
||||
<xsd:element name = "cityName" type = "xsd:string"/>
|
||||
<xsd:element name = "countryName" type = "xsd:string"/>
|
||||
<xsd:element name = "phoneNumber" type = "xsd:string"/>
|
||||
<xsd:element name = "faxNumber" type = "xsd:string"/>
|
||||
<xsd:element name = "e-mail" type = "xsd:string"/>
|
||||
<xsd:element name = "URL" type = "xsd:anyURI"/>
|
||||
<xsd:element name = "ContactPerson">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element ref = "contactPersonName"/>
|
||||
<xsd:element ref = "Address" minOccurs = "0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name = "contactPersonName" type = "xsd:string"/>
|
||||
<xsd:element name = "numberOfDeclarations" type = "xsd:integer"/>
|
||||
<xsd:element name = "acknowlegementRequest" type = "xsd:boolean"/>
|
||||
<xsd:element name = "authentication" type = "xsd:string"/>
|
||||
<xsd:element name = "testIndicator" type = "xsd:boolean"/>
|
||||
<xsd:element name = "applicationReference" type = "xsd:string"/>
|
||||
<xsd:element name = "softwareUsed" type = "xsd:string"/>
|
||||
<xsd:element name = "Declaration">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element ref = "declarationId"/>
|
||||
<xsd:element ref = "DateTime" minOccurs = "0"/>
|
||||
<xsd:element ref = "referencePeriod"/>
|
||||
<xsd:element ref = "PSIId"/>
|
||||
<xsd:element ref = "Function"/>
|
||||
<xsd:element ref = "declarationTypeCode"/>
|
||||
<xsd:element ref = "flowCode"/>
|
||||
<xsd:element ref = "currencyCode"/>
|
||||
<xsd:element ref = "firstLast" minOccurs = "0"/>
|
||||
<xsd:element ref = "totalNetMass" minOccurs = "0"/>
|
||||
<xsd:element ref = "totalInvoicedAmount" minOccurs = "0"/>
|
||||
<xsd:element ref = "totalStatisticalValue" minOccurs = "0"/>
|
||||
<xsd:element ref = "Item" minOccurs = "0" maxOccurs = "unbounded"/>
|
||||
<xsd:element ref = "totalNumberLines" minOccurs = "0"/>
|
||||
<xsd:element ref = "totalNumberDetailedLines" minOccurs = "0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name = "declarationId" type = "xsd:string"/>
|
||||
<xsd:element name = "referencePeriod" type = "xsd:string"/>
|
||||
<xsd:element name = "PSIId" type = "xsd:string"/>
|
||||
<xsd:element name = "Function">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element ref = "functionCode"/>
|
||||
<xsd:element ref = "previousDeclarationId" minOccurs = "0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name = "functionCode" type = "xsd:string"/>
|
||||
<xsd:element name = "previousDeclarationId" type = "xsd:string"/>
|
||||
<xsd:element name = "declarationTypeCode" type = "xsd:string"/>
|
||||
<xsd:element name = "flowCode" type = "xsd:string"/>
|
||||
<xsd:element name = "currencyCode" type = "xsd:string"/>
|
||||
<xsd:element name = "firstLast" type = "xsd:string"/>
|
||||
<xsd:element name = "totalNumberLines" type = "xsd:integer"/>
|
||||
<xsd:element name = "totalNetMass" type = "xsd:integer"/>
|
||||
<xsd:element name = "totalInvoicedAmount" type = "xsd:decimal"/>
|
||||
<xsd:element name = "totalStatisticalValue" type = "xsd:decimal"/>
|
||||
<xsd:element name = "Item">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element ref = "itemNumber"/>
|
||||
<xsd:element ref = "CN8" minOccurs = "0"/>
|
||||
<xsd:element ref = "goodsDescription" minOccurs = "0"/>
|
||||
<xsd:element ref = "MSConsDestCode" minOccurs = "0"/>
|
||||
<xsd:element ref = "countryOfOriginCode" minOccurs = "0"/>
|
||||
<xsd:element ref = "netMass" minOccurs = "0"/>
|
||||
<xsd:element ref = "quantityInSU" minOccurs = "0"/>
|
||||
<xsd:element ref = "invoicedAmount" minOccurs = "0" maxOccurs = "2"/>
|
||||
<xsd:element ref = "statisticalValue" minOccurs = "0"/>
|
||||
<xsd:element ref = "invoiceNumber" minOccurs = "0"/>
|
||||
<xsd:element ref = "partnerId" minOccurs = "0"/>
|
||||
<xsd:element ref = "statisticalProcedureCode" minOccurs = "0"/>
|
||||
<xsd:element ref = "NatureOfTransaction" minOccurs = "0"/>
|
||||
<xsd:element ref = "modeOfTransportCode" minOccurs = "0"/>
|
||||
<xsd:element ref = "regionCode" minOccurs = "0"/>
|
||||
<xsd:element ref = "portAirportInlandportCode" minOccurs = "0"/>
|
||||
<xsd:element ref = "DeliveryTerms" minOccurs = "0"/>
|
||||
<xsd:element ref = "numberOfConsignments" minOccurs = "0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name = "itemNumber" type = "xsd:integer"/>
|
||||
<xsd:element name = "CN8">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element ref = "CN8Code"/>
|
||||
<xsd:element ref = "SUCode" minOccurs = "0"/>
|
||||
<xsd:element ref = "additionalGoodsCode" minOccurs = "0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name = "CN8Code" type = "xsd:string"/>
|
||||
<xsd:element name = "SUCode" type = "xsd:string"/>
|
||||
<xsd:element name = "additionalGoodsCode" type = "xsd:string"/>
|
||||
<xsd:element name = "goodsDescription" type = "xsd:string"/>
|
||||
<xsd:element name = "MSConsDestCode" type = "xsd:string"/>
|
||||
<xsd:element name = "countryOfOriginCode" type = "xsd:string"/>
|
||||
<xsd:element name = "netMass" type = "xsd:integer"/>
|
||||
<xsd:element name = "quantityInSU" type = "xsd:integer"/>
|
||||
<xsd:element name = "invoicedAmount">
|
||||
<xsd:complexType>
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base = "xsd:decimal">
|
||||
<xsd:attribute name = "currencyCode" use = "optional" type = "xsd:string"/>
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name = "statisticalValue" type = "xsd:decimal"/>
|
||||
<xsd:element name = "invoiceNumber" type = "xsd:string"/>
|
||||
<xsd:element name = "partnerId" type = "xsd:string"/>
|
||||
<xsd:element name = "statisticalProcedureCode" type = "xsd:string"/>
|
||||
<xsd:element name = "NatureOfTransaction">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element ref = "natureOfTransactionACode"/>
|
||||
<xsd:element ref = "natureOfTransactionBCode" minOccurs = "0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name = "natureOfTransactionACode" type = "xsd:string"/>
|
||||
<xsd:element name = "natureOfTransactionBCode" type = "xsd:string"/>
|
||||
<xsd:element name = "modeOfTransportCode" type = "xsd:string"/>
|
||||
<xsd:element name = "regionCode" type = "xsd:string"/>
|
||||
<xsd:element name = "portAirportInlandportCode" type = "xsd:string"/>
|
||||
<xsd:element name = "DeliveryTerms">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element ref = "TODCode"/>
|
||||
<xsd:element ref = "locationCode" minOccurs = "0"/>
|
||||
<xsd:element ref = "TODPlace" minOccurs = "0"/>
|
||||
<xsd:element ref = "TODDetails" minOccurs = "0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name = "TODCode" type = "xsd:string"/>
|
||||
<xsd:element name = "locationCode" type = "xsd:string"/>
|
||||
<xsd:element name = "TODPlace" type = "xsd:string"/>
|
||||
<xsd:element name = "TODDetails" type = "xsd:string"/>
|
||||
<xsd:element name = "numberOfConsignments" type = "xsd:integer"/>
|
||||
<xsd:element name = "totalNumberDetailedLines" type = "xsd:integer"/>
|
||||
<xsd:element name = "date" type = "xsd:date"/>
|
||||
<xsd:element name = "time" type = "xsd:time"/>
|
||||
</xsd:schema>
|
||||
@@ -135,7 +135,8 @@
|
||||
Dim FIRMA As New VERAG_PROG_ALLGEMEIN.cFirmen(Firma_ID)
|
||||
|
||||
Dim bool_DatenVorhanden As Boolean = False
|
||||
Dim Geschaeftsjahr = Now.Year 'If(Now.Month = 1, Now.Year - 1, Now.Year) --> Bei IMEX ist das GJ=Wirtschaftsjahr
|
||||
Dim Geschaeftsjahr = Now.Year 'If(Now.Month = 1, Now.Year - 1, Now.Year) --> Bei IMEX ist das GJ=Wirtschaftsjahr
|
||||
'nur UNISPED!!
|
||||
|
||||
'DATEIPFAD für Buchungsdaten
|
||||
'-------------------------------------------------------------------------------------------
|
||||
@@ -152,16 +153,17 @@
|
||||
|
||||
|
||||
Dim NameZusatz = ""
|
||||
Dim Buchungsjahr = -1
|
||||
Select Case FIRMA.Firma_ID
|
||||
Case 21 : NameZusatz = "UNISPED_AT_"
|
||||
Case 22 : NameZusatz = "UNISPED_DE_"
|
||||
Case 23 : NameZusatz = "UNISPED_ZS_"
|
||||
Case 21 : NameZusatz = "UNISPED_AT_" : Buchungsjahr = Geschaeftsjahr
|
||||
Case 22 : NameZusatz = "UNISPED_DE_" : Buchungsjahr = Geschaeftsjahr
|
||||
Case 23 : NameZusatz = "UNISPED_ZS_" : Buchungsjahr = Geschaeftsjahr
|
||||
End Select
|
||||
|
||||
|
||||
'----------------- Buchungssätze -----------------
|
||||
If True Then 'boolBuchungen Then
|
||||
TrdInvoice_FUNCTIONS.TrdinSchreiben(FIRMA.Firma_ID) 'Lädt die Daten aus der Tabelle Rechnungsausgang in die Tabelle trdInvoice (nur für 20 = IMEX )
|
||||
TrdInvoice_FUNCTIONS.TrdinSchreiben(FIRMA.Firma_ID, Buchungsjahr) 'Lädt die Daten aus der Tabelle Rechnungsausgang in die Tabelle trdInvoice (nur für 20 = IMEX )
|
||||
Dim dt_Buchungen As DataTable = getBuchungen(FIRMA.Firma_ID)
|
||||
If dt_Buchungen IsNot Nothing AndAlso dt_Buchungen.Rows.Count > 0 Then
|
||||
Try
|
||||
@@ -260,14 +262,23 @@
|
||||
genBuchungsZeile &= (initKDNr2(row("KundenNrZentrale"))) & ";"
|
||||
genBuchungsZeile &= fill0Stellen(row("Sachkonto"), 4) & ";"
|
||||
genBuchungsZeile &= "" & CDate(row("Rechnungsdatum")).ToString("dd.MM.yyyy") & ";"
|
||||
'Dim GJ_short = Geschäftsjahr.ToString.Substring(2, 2)
|
||||
'Select Case FIRMA.Firma_ID
|
||||
' Case 21 : genBuchungsZeile &= GJ_short & "-" & FormatStringDVO(row("Rechnungsnummer")) & ";"
|
||||
' Case 22 : genBuchungsZeile &= GJ_short & "-" & FormatStringDVO(row("Rechnungsnummer")) & ";"
|
||||
' Case 23 : genBuchungsZeile &= GJ_short & "-" & FormatStringDVO(row("Rechnungsnummer")) & ";"
|
||||
'End Select
|
||||
Dim GJ_short = Geschäftsjahr.ToString.Substring(2, 2)
|
||||
Dim RgNrOld = FormatStringDVO(row("Rechnungsnummer")).Substring(2)
|
||||
Select Case FIRMA.Firma_ID
|
||||
Case 21 : genBuchungsZeile &= GJ_short & "-" & FormatStringDVO(row("Rechnungsnummer")) & ";"
|
||||
Case 22 : genBuchungsZeile &= GJ_short & "-" & FormatStringDVO(row("Rechnungsnummer")) & ";"
|
||||
Case 23 : genBuchungsZeile &= GJ_short & "-" & FormatStringDVO(row("Rechnungsnummer")) & ";"
|
||||
Case 21 : genBuchungsZeile &= FormatStringDVO(row("Rechnungsnummer")).Substring(0, 2) & "-" & FormatStringDVO(row("Rechnungsnummer")).Substring(2) & ";"
|
||||
Case 22 : genBuchungsZeile &= FormatStringDVO(row("Rechnungsnummer")).Substring(0, 2) & "-" & FormatStringDVO(row("Rechnungsnummer")).Substring(2) & ";"
|
||||
Case 23 : genBuchungsZeile &= FormatStringDVO(row("Rechnungsnummer")).Substring(0, 2) & "-" & FormatStringDVO(row("Rechnungsnummer")).Substring(2) & ";"
|
||||
End Select
|
||||
|
||||
genBuchungsZeile &= SQL.DLookup("KdAuftragsNr", "Rechnungsausgang", "rechnungsnr=" & row("Rechnungsnummer") & " and Firma_ID=" & FIRMA.Firma_ID & "", "FMZOLL", "") & ";".Replace(Environment.NewLine, "") 'extbelegnr
|
||||
Dim KdAtrNr = SQL.DLookup("KdAuftragsNr", "Rechnungsausgang", "rechnungsnr=" & RgNrOld & " and Buchungsjahr='" & Geschäftsjahr & "' and Firma_ID=" & FIRMA.Firma_ID & "", "FMZOLL", "")
|
||||
KdAtrNr = KdAtrNr.ToString.Replace(vbNewLine, "").Replace(vbCr, "").Replace(vbLf, "").Replace(vbCrLf, "").Replace(System.Environment.NewLine, " ")
|
||||
genBuchungsZeile &= KdAtrNr & ";".Replace(Environment.NewLine, "") 'extbelegnr
|
||||
|
||||
genBuchungsZeile &= If(row("BelegartenNr") = "70", "AR", "AG") & ";" ' Rg/GS 70=Rechnung 'AG ????????
|
||||
genBuchungsZeile &= If(row("BelegartenNr") = "70", "1", "2") & ";" ' Rg/GS 70=Rechnung 'AG ????????
|
||||
|
||||
@@ -1345,11 +1345,12 @@ Public Class cSyska_Interface
|
||||
OP.INSERT()
|
||||
|
||||
OP_ID_CNT += 1
|
||||
tmpFirma_Id = OP.Firma_ID
|
||||
tmpKonotnr = OP.Kontonummer
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & ex.StackTrace)
|
||||
End Try
|
||||
|
||||
Next
|
||||
|
||||
Else
|
||||
@@ -1430,7 +1431,6 @@ Public Class cSyska_Interface
|
||||
For Each r In dt.Rows
|
||||
|
||||
If KdNr = -1 OrElse r("KundenNrZentrale") = KdNr Then 'TEST!!
|
||||
|
||||
Dim strRisiko = Format(CDbl(r("Risiko")), fmt).Replace(",", ".")
|
||||
SQL.doSQL("UPDATE [FIBU2].[dbo].[fibu_konto]
|
||||
SET [dec_wert3] = '" & strRisiko & "'
|
||||
|
||||
@@ -17,7 +17,8 @@ Public Class cTherefore
|
||||
'Return saveFileTo_ImportFolderCat(Path, FilialeAbfertigungsNr, AvisoId, 394, 394, deleteFileAfterImport)
|
||||
Case 1, 11, 20, 17 ', 15
|
||||
' Return saveFileTo_ImportFolderCat(Path, FilialeAbfertigungsNr, AvisoId, "Import an Jänner 2019", "Import ab Jänner 2019", deleteFileAfterImport)
|
||||
Return saveFileTo_ImportFolderCat(Path, FilialeAbfertigungsNr, AvisoId, "Import ab Jänner 2021", "Import ab Jänner 2021", deleteFileAfterImport)
|
||||
'Return saveFileTo_ImportFolderCat(Path, FilialeAbfertigungsNr, AvisoId, "Import ab Jänner 2021", "Import ab Jänner 2021", deleteFileAfterImport)
|
||||
Return saveFileTo_ImportFolderCat(Path, FilialeAbfertigungsNr, AvisoId, "Import ab Jänner 2022", "Import ab Jänner 2022", deleteFileAfterImport)
|
||||
' Return saveFileTo_ImportFolderCat(Path, FilialeAbfertigungsNr, AvisoId, "Import ab Jänner 2020", "Import ab Jänner 2020", deleteFileAfterImport)
|
||||
Case Else
|
||||
Return False
|
||||
|
||||
@@ -67,9 +67,12 @@
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ChilkatDotNet47">
|
||||
<HintPath>..\..\..\dll\ChillKat64\ChilkatDotNet47.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ClosedXML, Version=0.76.0.0, Culture=neutral, PublicKeyToken=fd1eb21b62ae805b, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\dll\ClosedXML.dll</HintPath>
|
||||
<HintPath>..\..\..\AVISO\Aviso\packages\ClosedXML.0.95.4\lib\net46\ClosedXML.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Dynamsoft.Forms.Viewer, Version=8.0.0.510, Culture=neutral, PublicKeyToken=298ad97013b423eb, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
@@ -311,10 +314,13 @@
|
||||
<Compile Include="Classes\cAbfertigungsarten.vb" />
|
||||
<Compile Include="Classes\cAbgaben.vb" />
|
||||
<Compile Include="Classes\cAbrechnung_NCTSBrg.vb" />
|
||||
<Compile Include="Classes\cAPI.vb" />
|
||||
<Compile Include="Classes\cAufschubKonten.vb" />
|
||||
<Compile Include="Classes\cAvisoAnhaenge.vb" />
|
||||
<Compile Include="Classes\cAvisoBenachrichtigungen.vb" />
|
||||
<Compile Include="Classes\cBesuchsbericht.vb" />
|
||||
<Compile Include="Classes\cBonitaetsauskunft.vb" />
|
||||
<Compile Include="Classes\cChilkat_Helper.vb" />
|
||||
<Compile Include="Classes\cCryptography.vb" />
|
||||
<Compile Include="Classes\cDEBundeslaenderPLZ.vb" />
|
||||
<Compile Include="Classes\cDHF_Anhaenge.vb" />
|
||||
@@ -329,6 +335,7 @@
|
||||
<Compile Include="Classes\cGelangensbestaetigung.vb" />
|
||||
<Compile Include="Classes\cGestellungsgarantien.vb" />
|
||||
<Compile Include="Classes\cGestellungsmitteilung.vb" />
|
||||
<Compile Include="Classes\cGVMS.vb" />
|
||||
<Compile Include="Classes\cHandlingssaetzeIntern.vb" />
|
||||
<Compile Include="Classes\cKundenAufschubkonten.vb" />
|
||||
<Compile Include="Classes\cKundenBesonderheiten.vb" />
|
||||
@@ -440,6 +447,12 @@
|
||||
<Compile Include="Messenger\frmMessenger_NeuerChat.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Messenger\usrCntlMessenger_ChatElementDEL.Designer.vb">
|
||||
<DependentUpon>usrCntlMessenger_ChatElementDEL.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Messenger\usrCntlMessenger_ChatElementDEL.vb">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Messenger\usrCntlMessenger_ChatEmoji.Designer.vb">
|
||||
<DependentUpon>usrCntlMessenger_ChatEmoji.vb</DependentUpon>
|
||||
</Compile>
|
||||
@@ -499,7 +512,9 @@
|
||||
<Compile Include="Schnittstellen\cNCTS_Helper.vb" />
|
||||
<Compile Include="Schnittstellen\cSyska_Interface.vb" />
|
||||
<Compile Include="Schnittstellen\cTherefore.vb" />
|
||||
<Compile Include="Schnittstellen\Finanzonline\cFinanzOnlineWebService.vb" />
|
||||
<Compile Include="Schnittstellen\GASTON_SCHUL\agsCustomsExchange.Designer.vb" />
|
||||
<Compile Include="Schnittstellen\IDEV_Intrastat\instat6.2.Designer.vb" />
|
||||
<Compile Include="Schnittstellen\MIC\cMIC.vb" />
|
||||
<Compile Include="Schnittstellen\MIC\cMICInterface.vb" />
|
||||
<Compile Include="Schnittstellen\MIC\MicCustExportBasicTypes.Designer.vb" />
|
||||
@@ -538,6 +553,11 @@
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Reference.map</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Web References\eu.europa.ec\Reference.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Reference.map</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Web References\RKSV_DE_DSFinVKService\Reference.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
@@ -604,6 +624,9 @@
|
||||
<EmbeddedResource Include="Messenger\frmMessenger_NeuerChat.resx">
|
||||
<DependentUpon>frmMessenger_NeuerChat.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Messenger\usrCntlMessenger_ChatElementDEL.resx">
|
||||
<DependentUpon>usrCntlMessenger_ChatElementDEL.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Messenger\usrCntlMessenger_ChatEmoji.resx">
|
||||
<DependentUpon>usrCntlMessenger_ChatEmoji.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
@@ -636,6 +659,9 @@
|
||||
<None Include="Schnittstellen\GASTON_SCHUL\agsCustomsExchange.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="Schnittstellen\IDEV_Intrastat\instat6.2.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="Schnittstellen\MIC\MicCustExportBasicTypes.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
@@ -768,6 +794,14 @@
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="Web References\at.gv.bmf.finanzonline\uidAbfrageService.wsdl" />
|
||||
<None Include="Web References\eu.europa.ec\checkVatTestService.wsdl" />
|
||||
<None Include="Web References\eu.europa.ec\matchCode.datasource">
|
||||
<DependentUpon>Reference.map</DependentUpon>
|
||||
</None>
|
||||
<None Include="Web References\eu.europa.ec\Reference.map">
|
||||
<Generator>MSDiscoCodeGenerator</Generator>
|
||||
<LastGenOutput>Reference.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="Web References\RKSV_DE_DSFinVKService\DSFinVKServer.wsdl" />
|
||||
<None Include="Web References\RKSV_DE_DSFinVKService\ErrorCode.datasource">
|
||||
<DependentUpon>Reference.map</DependentUpon>
|
||||
@@ -939,6 +973,17 @@
|
||||
<CachedAppSettingsObjectName>MySettings</CachedAppSettingsObjectName>
|
||||
<CachedSettingsPropName>VERAG_PROG_ALLGEMEIN_RKSV_DE_DSFinVKService_DSFinVKServer</CachedSettingsPropName>
|
||||
</WebReferenceUrl>
|
||||
<WebReferenceUrl Include="https://ec.europa.eu/taxation_customs/vies/checkVatTestService.wsdl">
|
||||
<UrlBehavior>Dynamic</UrlBehavior>
|
||||
<RelPath>Web References\eu.europa.ec\</RelPath>
|
||||
<UpdateFromURL>https://ec.europa.eu/taxation_customs/vies/checkVatTestService.wsdl</UpdateFromURL>
|
||||
<ServiceLocationURL>
|
||||
</ServiceLocationURL>
|
||||
<CachedDynamicPropName>
|
||||
</CachedDynamicPropName>
|
||||
<CachedAppSettingsObjectName>MySettings</CachedAppSettingsObjectName>
|
||||
<CachedSettingsPropName>VERAG_PROG_ALLGEMEIN_eu_europa_ec_checkVatTestService</CachedSettingsPropName>
|
||||
</WebReferenceUrl>
|
||||
<WebReferenceUrl Include="https://finanzonline.bmf.gv.at/fon/ws/uidAbfrage.wsdl">
|
||||
<UrlBehavior>Dynamic</UrlBehavior>
|
||||
<RelPath>Web References\at.gv.bmf.finanzonline\</RelPath>
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<DiscoveryClientResultsFile xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<Results>
|
||||
<DiscoveryClientResult referenceType="System.Web.Services.Discovery.ContractReference" url="https://ec.europa.eu/taxation_customs/vies/checkVatTestService.wsdl" filename="checkVatTestService.wsdl" />
|
||||
</Results>
|
||||
</DiscoveryClientResultsFile>
|
||||
474
VERAG_PROG_ALLGEMEIN/Web References/eu.europa.ec/Reference.vb
Normal file
474
VERAG_PROG_ALLGEMEIN/Web References/eu.europa.ec/Reference.vb
Normal file
@@ -0,0 +1,474 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' Dieser Code wurde von einem Tool generiert.
|
||||
' Laufzeitversion:4.0.30319.42000
|
||||
'
|
||||
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
' der Code erneut generiert wird.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict Off
|
||||
Option Explicit On
|
||||
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.Diagnostics
|
||||
Imports System.Web.Services
|
||||
Imports System.Web.Services.Protocols
|
||||
Imports System.Xml.Serialization
|
||||
|
||||
'
|
||||
'Der Quellcode wurde automatisch mit Microsoft.VSDesigner generiert. Version 4.0.30319.42000.
|
||||
'
|
||||
Namespace eu.europa.ec
|
||||
|
||||
'''<remarks/>
|
||||
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.3761.0"), _
|
||||
System.Diagnostics.DebuggerStepThroughAttribute(), _
|
||||
System.ComponentModel.DesignerCategoryAttribute("code"), _
|
||||
System.Web.Services.WebServiceBindingAttribute(Name:="checkVatTestBinding", [Namespace]:="urn:ec.europa.eu:taxud:vies:services:checkVat")> _
|
||||
Partial Public Class checkVatTestService
|
||||
Inherits System.Web.Services.Protocols.SoapHttpClientProtocol
|
||||
|
||||
Private checkVatOperationCompleted As System.Threading.SendOrPostCallback
|
||||
|
||||
Private checkVatApproxOperationCompleted As System.Threading.SendOrPostCallback
|
||||
|
||||
Private useDefaultCredentialsSetExplicitly As Boolean
|
||||
|
||||
'''<remarks/>
|
||||
Public Sub New()
|
||||
MyBase.New
|
||||
Me.Url = Global.VERAG_PROG_ALLGEMEIN.My.MySettings.Default.VERAG_PROG_ALLGEMEIN_eu_europa_ec_checkVatTestService
|
||||
If (Me.IsLocalFileSystemWebService(Me.Url) = true) Then
|
||||
Me.UseDefaultCredentials = true
|
||||
Me.useDefaultCredentialsSetExplicitly = false
|
||||
Else
|
||||
Me.useDefaultCredentialsSetExplicitly = true
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Shadows Property Url() As String
|
||||
Get
|
||||
Return MyBase.Url
|
||||
End Get
|
||||
Set
|
||||
If (((Me.IsLocalFileSystemWebService(MyBase.Url) = true) _
|
||||
AndAlso (Me.useDefaultCredentialsSetExplicitly = false)) _
|
||||
AndAlso (Me.IsLocalFileSystemWebService(value) = false)) Then
|
||||
MyBase.UseDefaultCredentials = false
|
||||
End If
|
||||
MyBase.Url = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Shadows Property UseDefaultCredentials() As Boolean
|
||||
Get
|
||||
Return MyBase.UseDefaultCredentials
|
||||
End Get
|
||||
Set
|
||||
MyBase.UseDefaultCredentials = value
|
||||
Me.useDefaultCredentialsSetExplicitly = true
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
Public Event checkVatCompleted As checkVatCompletedEventHandler
|
||||
|
||||
'''<remarks/>
|
||||
Public Event checkVatApproxCompleted As checkVatApproxCompletedEventHandler
|
||||
|
||||
'''<remarks/>
|
||||
<System.Web.Services.Protocols.SoapDocumentMethodAttribute("", RequestNamespace:="urn:ec.europa.eu:taxud:vies:services:checkVat:types", ResponseNamespace:="urn:ec.europa.eu:taxud:vies:services:checkVat:types", Use:=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)> _
|
||||
Public Function checkVat(ByRef countryCode As String, ByRef vatNumber As String, ByRef valid As Boolean, <System.Xml.Serialization.XmlElementAttribute(IsNullable:=true)> ByRef name As String, <System.Xml.Serialization.XmlElementAttribute(IsNullable:=true)> ByRef address As String) As <System.Xml.Serialization.XmlElementAttribute("requestDate", DataType:="date")> Date
|
||||
Dim results() As Object = Me.Invoke("checkVat", New Object() {countryCode, vatNumber})
|
||||
countryCode = CType(results(1),String)
|
||||
vatNumber = CType(results(2),String)
|
||||
valid = CType(results(3),Boolean)
|
||||
name = CType(results(4),String)
|
||||
address = CType(results(5),String)
|
||||
Return CType(results(0),Date)
|
||||
End Function
|
||||
|
||||
'''<remarks/>
|
||||
Public Overloads Sub checkVatAsync(ByVal countryCode As String, ByVal vatNumber As String)
|
||||
Me.checkVatAsync(countryCode, vatNumber, Nothing)
|
||||
End Sub
|
||||
|
||||
'''<remarks/>
|
||||
Public Overloads Sub checkVatAsync(ByVal countryCode As String, ByVal vatNumber As String, ByVal userState As Object)
|
||||
If (Me.checkVatOperationCompleted Is Nothing) Then
|
||||
Me.checkVatOperationCompleted = AddressOf Me.OncheckVatOperationCompleted
|
||||
End If
|
||||
Me.InvokeAsync("checkVat", New Object() {countryCode, vatNumber}, Me.checkVatOperationCompleted, userState)
|
||||
End Sub
|
||||
|
||||
Private Sub OncheckVatOperationCompleted(ByVal arg As Object)
|
||||
If (Not (Me.checkVatCompletedEvent) Is Nothing) Then
|
||||
Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg,System.Web.Services.Protocols.InvokeCompletedEventArgs)
|
||||
RaiseEvent checkVatCompleted(Me, New checkVatCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'''<remarks/>
|
||||
<System.Web.Services.Protocols.SoapDocumentMethodAttribute("", RequestNamespace:="urn:ec.europa.eu:taxud:vies:services:checkVat:types", ResponseNamespace:="urn:ec.europa.eu:taxud:vies:services:checkVat:types", Use:=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)> _
|
||||
Public Function checkVatApprox( _
|
||||
ByRef countryCode As String, _
|
||||
ByRef vatNumber As String, _
|
||||
ByRef traderName As String, _
|
||||
ByRef traderCompanyType As String, _
|
||||
ByRef traderStreet As String, _
|
||||
ByRef traderPostcode As String, _
|
||||
ByRef traderCity As String, _
|
||||
ByVal requesterCountryCode As String, _
|
||||
ByVal requesterVatNumber As String, _
|
||||
ByRef valid As Boolean, _
|
||||
ByRef traderAddress As String, _
|
||||
ByRef traderNameMatch As matchCode, _
|
||||
<System.Xml.Serialization.XmlIgnoreAttribute()> ByRef traderNameMatchSpecified As Boolean, _
|
||||
ByRef traderCompanyTypeMatch As matchCode, _
|
||||
<System.Xml.Serialization.XmlIgnoreAttribute()> ByRef traderCompanyTypeMatchSpecified As Boolean, _
|
||||
ByRef traderStreetMatch As matchCode, _
|
||||
<System.Xml.Serialization.XmlIgnoreAttribute()> ByRef traderStreetMatchSpecified As Boolean, _
|
||||
ByRef traderPostcodeMatch As matchCode, _
|
||||
<System.Xml.Serialization.XmlIgnoreAttribute()> ByRef traderPostcodeMatchSpecified As Boolean, _
|
||||
ByRef traderCityMatch As matchCode, _
|
||||
<System.Xml.Serialization.XmlIgnoreAttribute()> ByRef traderCityMatchSpecified As Boolean, _
|
||||
ByRef requestIdentifier As String) As <System.Xml.Serialization.XmlElementAttribute("requestDate", DataType:="date")> Date
|
||||
Dim results() As Object = Me.Invoke("checkVatApprox", New Object() {countryCode, vatNumber, traderName, traderCompanyType, traderStreet, traderPostcode, traderCity, requesterCountryCode, requesterVatNumber})
|
||||
countryCode = CType(results(1),String)
|
||||
vatNumber = CType(results(2),String)
|
||||
traderName = CType(results(3),String)
|
||||
traderCompanyType = CType(results(4),String)
|
||||
traderStreet = CType(results(5),String)
|
||||
traderPostcode = CType(results(6),String)
|
||||
traderCity = CType(results(7),String)
|
||||
valid = CType(results(8),Boolean)
|
||||
traderAddress = CType(results(9),String)
|
||||
traderNameMatch = CType(results(10),matchCode)
|
||||
traderNameMatchSpecified = CType(results(11),Boolean)
|
||||
traderCompanyTypeMatch = CType(results(12),matchCode)
|
||||
traderCompanyTypeMatchSpecified = CType(results(13),Boolean)
|
||||
traderStreetMatch = CType(results(14),matchCode)
|
||||
traderStreetMatchSpecified = CType(results(15),Boolean)
|
||||
traderPostcodeMatch = CType(results(16),matchCode)
|
||||
traderPostcodeMatchSpecified = CType(results(17),Boolean)
|
||||
traderCityMatch = CType(results(18),matchCode)
|
||||
traderCityMatchSpecified = CType(results(19),Boolean)
|
||||
requestIdentifier = CType(results(20),String)
|
||||
Return CType(results(0),Date)
|
||||
End Function
|
||||
|
||||
'''<remarks/>
|
||||
Public Overloads Sub checkVatApproxAsync(ByVal countryCode As String, ByVal vatNumber As String, ByVal traderName As String, ByVal traderCompanyType As String, ByVal traderStreet As String, ByVal traderPostcode As String, ByVal traderCity As String, ByVal requesterCountryCode As String, ByVal requesterVatNumber As String)
|
||||
Me.checkVatApproxAsync(countryCode, vatNumber, traderName, traderCompanyType, traderStreet, traderPostcode, traderCity, requesterCountryCode, requesterVatNumber, Nothing)
|
||||
End Sub
|
||||
|
||||
'''<remarks/>
|
||||
Public Overloads Sub checkVatApproxAsync(ByVal countryCode As String, ByVal vatNumber As String, ByVal traderName As String, ByVal traderCompanyType As String, ByVal traderStreet As String, ByVal traderPostcode As String, ByVal traderCity As String, ByVal requesterCountryCode As String, ByVal requesterVatNumber As String, ByVal userState As Object)
|
||||
If (Me.checkVatApproxOperationCompleted Is Nothing) Then
|
||||
Me.checkVatApproxOperationCompleted = AddressOf Me.OncheckVatApproxOperationCompleted
|
||||
End If
|
||||
Me.InvokeAsync("checkVatApprox", New Object() {countryCode, vatNumber, traderName, traderCompanyType, traderStreet, traderPostcode, traderCity, requesterCountryCode, requesterVatNumber}, Me.checkVatApproxOperationCompleted, userState)
|
||||
End Sub
|
||||
|
||||
Private Sub OncheckVatApproxOperationCompleted(ByVal arg As Object)
|
||||
If (Not (Me.checkVatApproxCompletedEvent) Is Nothing) Then
|
||||
Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg,System.Web.Services.Protocols.InvokeCompletedEventArgs)
|
||||
RaiseEvent checkVatApproxCompleted(Me, New checkVatApproxCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'''<remarks/>
|
||||
Public Shadows Sub CancelAsync(ByVal userState As Object)
|
||||
MyBase.CancelAsync(userState)
|
||||
End Sub
|
||||
|
||||
Private Function IsLocalFileSystemWebService(ByVal url As String) As Boolean
|
||||
If ((url Is Nothing) _
|
||||
OrElse (url Is String.Empty)) Then
|
||||
Return false
|
||||
End If
|
||||
Dim wsUri As System.Uri = New System.Uri(url)
|
||||
If ((wsUri.Port >= 1024) _
|
||||
AndAlso (String.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) = 0)) Then
|
||||
Return true
|
||||
End If
|
||||
Return false
|
||||
End Function
|
||||
End Class
|
||||
|
||||
'''<remarks/>
|
||||
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3761.0"), _
|
||||
System.SerializableAttribute(), _
|
||||
System.Xml.Serialization.XmlTypeAttribute([Namespace]:="urn:ec.europa.eu:taxud:vies:services:checkVat:types")> _
|
||||
Public Enum matchCode
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlEnumAttribute("1")> _
|
||||
Item1
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlEnumAttribute("2")> _
|
||||
Item2
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlEnumAttribute("3")> _
|
||||
Item3
|
||||
End Enum
|
||||
|
||||
'''<remarks/>
|
||||
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.3761.0")> _
|
||||
Public Delegate Sub checkVatCompletedEventHandler(ByVal sender As Object, ByVal e As checkVatCompletedEventArgs)
|
||||
|
||||
'''<remarks/>
|
||||
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.3761.0"), _
|
||||
System.Diagnostics.DebuggerStepThroughAttribute(), _
|
||||
System.ComponentModel.DesignerCategoryAttribute("code")> _
|
||||
Partial Public Class checkVatCompletedEventArgs
|
||||
Inherits System.ComponentModel.AsyncCompletedEventArgs
|
||||
|
||||
Private results() As Object
|
||||
|
||||
Friend Sub New(ByVal results() As Object, ByVal exception As System.Exception, ByVal cancelled As Boolean, ByVal userState As Object)
|
||||
MyBase.New(exception, cancelled, userState)
|
||||
Me.results = results
|
||||
End Sub
|
||||
|
||||
'''<remarks/>
|
||||
Public ReadOnly Property Result() As Date
|
||||
Get
|
||||
Me.RaiseExceptionIfNecessary
|
||||
Return CType(Me.results(0),Date)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
Public ReadOnly Property countryCode() As String
|
||||
Get
|
||||
Me.RaiseExceptionIfNecessary
|
||||
Return CType(Me.results(1),String)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
Public ReadOnly Property vatNumber() As String
|
||||
Get
|
||||
Me.RaiseExceptionIfNecessary
|
||||
Return CType(Me.results(2),String)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
Public ReadOnly Property valid() As Boolean
|
||||
Get
|
||||
Me.RaiseExceptionIfNecessary
|
||||
Return CType(Me.results(3),Boolean)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
Public ReadOnly Property name() As String
|
||||
Get
|
||||
Me.RaiseExceptionIfNecessary
|
||||
Return CType(Me.results(4),String)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
Public ReadOnly Property address() As String
|
||||
Get
|
||||
Me.RaiseExceptionIfNecessary
|
||||
Return CType(Me.results(5),String)
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
|
||||
'''<remarks/>
|
||||
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.3761.0")> _
|
||||
Public Delegate Sub checkVatApproxCompletedEventHandler(ByVal sender As Object, ByVal e As checkVatApproxCompletedEventArgs)
|
||||
|
||||
'''<remarks/>
|
||||
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.3761.0"), _
|
||||
System.Diagnostics.DebuggerStepThroughAttribute(), _
|
||||
System.ComponentModel.DesignerCategoryAttribute("code")> _
|
||||
Partial Public Class checkVatApproxCompletedEventArgs
|
||||
Inherits System.ComponentModel.AsyncCompletedEventArgs
|
||||
|
||||
Private results() As Object
|
||||
|
||||
Friend Sub New(ByVal results() As Object, ByVal exception As System.Exception, ByVal cancelled As Boolean, ByVal userState As Object)
|
||||
MyBase.New(exception, cancelled, userState)
|
||||
Me.results = results
|
||||
End Sub
|
||||
|
||||
'''<remarks/>
|
||||
Public ReadOnly Property Result() As Date
|
||||
Get
|
||||
Me.RaiseExceptionIfNecessary
|
||||
Return CType(Me.results(0),Date)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
Public ReadOnly Property countryCode() As String
|
||||
Get
|
||||
Me.RaiseExceptionIfNecessary
|
||||
Return CType(Me.results(1),String)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
Public ReadOnly Property vatNumber() As String
|
||||
Get
|
||||
Me.RaiseExceptionIfNecessary
|
||||
Return CType(Me.results(2),String)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
Public ReadOnly Property traderName() As String
|
||||
Get
|
||||
Me.RaiseExceptionIfNecessary
|
||||
Return CType(Me.results(3),String)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
Public ReadOnly Property traderCompanyType() As String
|
||||
Get
|
||||
Me.RaiseExceptionIfNecessary
|
||||
Return CType(Me.results(4),String)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
Public ReadOnly Property traderStreet() As String
|
||||
Get
|
||||
Me.RaiseExceptionIfNecessary
|
||||
Return CType(Me.results(5),String)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
Public ReadOnly Property traderPostcode() As String
|
||||
Get
|
||||
Me.RaiseExceptionIfNecessary
|
||||
Return CType(Me.results(6),String)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
Public ReadOnly Property traderCity() As String
|
||||
Get
|
||||
Me.RaiseExceptionIfNecessary
|
||||
Return CType(Me.results(7),String)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
Public ReadOnly Property valid() As Boolean
|
||||
Get
|
||||
Me.RaiseExceptionIfNecessary
|
||||
Return CType(Me.results(8),Boolean)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
Public ReadOnly Property traderAddress() As String
|
||||
Get
|
||||
Me.RaiseExceptionIfNecessary
|
||||
Return CType(Me.results(9),String)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
Public ReadOnly Property traderNameMatch() As matchCode
|
||||
Get
|
||||
Me.RaiseExceptionIfNecessary
|
||||
Return CType(Me.results(10),matchCode)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
Public ReadOnly Property traderNameMatchSpecified() As Boolean
|
||||
Get
|
||||
Me.RaiseExceptionIfNecessary
|
||||
Return CType(Me.results(11),Boolean)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
Public ReadOnly Property traderCompanyTypeMatch() As matchCode
|
||||
Get
|
||||
Me.RaiseExceptionIfNecessary
|
||||
Return CType(Me.results(12),matchCode)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
Public ReadOnly Property traderCompanyTypeMatchSpecified() As Boolean
|
||||
Get
|
||||
Me.RaiseExceptionIfNecessary
|
||||
Return CType(Me.results(13),Boolean)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
Public ReadOnly Property traderStreetMatch() As matchCode
|
||||
Get
|
||||
Me.RaiseExceptionIfNecessary
|
||||
Return CType(Me.results(14),matchCode)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
Public ReadOnly Property traderStreetMatchSpecified() As Boolean
|
||||
Get
|
||||
Me.RaiseExceptionIfNecessary
|
||||
Return CType(Me.results(15),Boolean)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
Public ReadOnly Property traderPostcodeMatch() As matchCode
|
||||
Get
|
||||
Me.RaiseExceptionIfNecessary
|
||||
Return CType(Me.results(16),matchCode)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
Public ReadOnly Property traderPostcodeMatchSpecified() As Boolean
|
||||
Get
|
||||
Me.RaiseExceptionIfNecessary
|
||||
Return CType(Me.results(17),Boolean)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
Public ReadOnly Property traderCityMatch() As matchCode
|
||||
Get
|
||||
Me.RaiseExceptionIfNecessary
|
||||
Return CType(Me.results(18),matchCode)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
Public ReadOnly Property traderCityMatchSpecified() As Boolean
|
||||
Get
|
||||
Me.RaiseExceptionIfNecessary
|
||||
Return CType(Me.results(19),Boolean)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
Public ReadOnly Property requestIdentifier() As String
|
||||
Get
|
||||
Me.RaiseExceptionIfNecessary
|
||||
Return CType(Me.results(20),String)
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
@@ -0,0 +1,155 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<wsdl:definitions xmlns:impl="urn:ec.europa.eu:taxud:vies:services:checkVat" xmlns:tns1="urn:ec.europa.eu:taxud:vies:services:checkVat:types" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:apachesoap="http://xml.apache.org/xml-soap" targetNamespace="urn:ec.europa.eu:taxud:vies:services:checkVat" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
|
||||
<xsd:documentation>
|
||||
Specific disclaimer for this service -----------------------------------------
|
||||
Here is the list of VAT Number to use to receive each kind of answer :
|
||||
100 = Valid request with Valid VAT Number
|
||||
200 = Valid request with an Invalid VAT Number
|
||||
201 = Error : INVALID_INPUT
|
||||
202 = Error : INVALID_REQUESTER_INFO
|
||||
300 = Error : SERVICE_UNAVAILABLE
|
||||
301 = Error : MS_UNAVAILABLE
|
||||
302 = Error : TIMEOUT
|
||||
400 = Error : VAT_BLOCKED
|
||||
401 = Error : IP_BLOCKED
|
||||
500 = Error : GLOBAL_MAX_CONCURRENT_REQ
|
||||
501 = Error : GLOBAL_MAX_CONCURRENT_REQ_TIME
|
||||
600 = Error : MS_MAX_CONCURRENT_REQ
|
||||
601 = Error : MS_MAX_CONCURRENT_REQ_TIME
|
||||
|
||||
For all the other cases, The web service will responds with a "SERVICE_UNAVAILABLE" error.
|
||||
</xsd:documentation>
|
||||
<wsdl:types>
|
||||
<xsd:schema xmlns="urn:ec.europa.eu:taxud:vies:services:checkVat:types" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="urn:ec.europa.eu:taxud:vies:services:checkVat:types">
|
||||
<xsd:element name="checkVat">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="countryCode" type="xsd:string" />
|
||||
<xsd:element name="vatNumber" type="xsd:string" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="checkVatResponse">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="countryCode" type="xsd:string" />
|
||||
<xsd:element name="vatNumber" type="xsd:string" />
|
||||
<xsd:element name="requestDate" type="xsd:date" />
|
||||
<xsd:element name="valid" type="xsd:boolean" />
|
||||
<xsd:element minOccurs="0" maxOccurs="1" name="name" nillable="true" type="xsd:string" />
|
||||
<xsd:element minOccurs="0" maxOccurs="1" name="address" nillable="true" type="xsd:string" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="checkVatApprox">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="countryCode" type="xsd:string" />
|
||||
<xsd:element name="vatNumber" type="xsd:string" />
|
||||
<xsd:element minOccurs="0" maxOccurs="1" name="traderName" type="xsd:string" />
|
||||
<xsd:element minOccurs="0" maxOccurs="1" name="traderCompanyType" type="tns1:companyTypeCode" />
|
||||
<xsd:element minOccurs="0" maxOccurs="1" name="traderStreet" type="xsd:string" />
|
||||
<xsd:element minOccurs="0" maxOccurs="1" name="traderPostcode" type="xsd:string" />
|
||||
<xsd:element minOccurs="0" maxOccurs="1" name="traderCity" type="xsd:string" />
|
||||
<xsd:element minOccurs="0" maxOccurs="1" name="requesterCountryCode" type="xsd:string" />
|
||||
<xsd:element minOccurs="0" maxOccurs="1" name="requesterVatNumber" type="xsd:string" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="checkVatApproxResponse">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="countryCode" type="xsd:string" />
|
||||
<xsd:element name="vatNumber" type="xsd:string" />
|
||||
<xsd:element name="requestDate" type="xsd:date" />
|
||||
<xsd:element name="valid" type="xsd:boolean" />
|
||||
<xsd:element minOccurs="0" maxOccurs="1" name="traderName" nillable="true" type="xsd:string" />
|
||||
<xsd:element minOccurs="0" maxOccurs="1" name="traderCompanyType" nillable="true" type="tns1:companyTypeCode" />
|
||||
<xsd:element minOccurs="0" maxOccurs="1" name="traderAddress" type="xsd:string" />
|
||||
<xsd:element minOccurs="0" maxOccurs="1" name="traderStreet" type="xsd:string" />
|
||||
<xsd:element minOccurs="0" maxOccurs="1" name="traderPostcode" type="xsd:string" />
|
||||
<xsd:element minOccurs="0" maxOccurs="1" name="traderCity" type="xsd:string" />
|
||||
<xsd:element minOccurs="0" maxOccurs="1" name="traderNameMatch" type="tns1:matchCode" />
|
||||
<xsd:element minOccurs="0" maxOccurs="1" name="traderCompanyTypeMatch" type="tns1:matchCode" />
|
||||
<xsd:element minOccurs="0" maxOccurs="1" name="traderStreetMatch" type="tns1:matchCode" />
|
||||
<xsd:element minOccurs="0" maxOccurs="1" name="traderPostcodeMatch" type="tns1:matchCode" />
|
||||
<xsd:element minOccurs="0" maxOccurs="1" name="traderCityMatch" type="tns1:matchCode" />
|
||||
<xsd:element name="requestIdentifier" type="xsd:string" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:simpleType name="companyTypeCode">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:pattern value="[A-Z]{2}\-[1-9][0-9]?" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="matchCode">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>VALID</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:enumeration>
|
||||
<xsd:enumeration value="2">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>INVALID</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:enumeration>
|
||||
<xsd:enumeration value="3">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>NOT_PROCESSED</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:enumeration>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name="checkVatRequest">
|
||||
<wsdl:part name="parameters" element="tns1:checkVat" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="checkVatApproxResponse">
|
||||
<wsdl:part name="parameters" element="tns1:checkVatApproxResponse" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="checkVatApproxRequest">
|
||||
<wsdl:part name="parameters" element="tns1:checkVatApprox" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="checkVatResponse">
|
||||
<wsdl:part name="parameters" element="tns1:checkVatResponse" />
|
||||
</wsdl:message>
|
||||
<wsdl:portType name="checkVatPortType">
|
||||
<wsdl:operation name="checkVat">
|
||||
<wsdl:input name="checkVatRequest" message="impl:checkVatRequest" />
|
||||
<wsdl:output name="checkVatResponse" message="impl:checkVatResponse" />
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="checkVatApprox">
|
||||
<wsdl:input name="checkVatApproxRequest" message="impl:checkVatApproxRequest" />
|
||||
<wsdl:output name="checkVatApproxResponse" message="impl:checkVatApproxResponse" />
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
<wsdl:binding name="checkVatTestBinding" type="impl:checkVatPortType">
|
||||
<wsdlsoap:binding transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
<wsdl:operation name="checkVat">
|
||||
<wsdlsoap:operation soapAction="" />
|
||||
<wsdl:input name="checkVatRequest">
|
||||
<wsdlsoap:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output name="checkVatResponse">
|
||||
<wsdlsoap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="checkVatApprox">
|
||||
<wsdlsoap:operation soapAction="" />
|
||||
<wsdl:input name="checkVatApproxRequest">
|
||||
<wsdlsoap:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output name="checkVatApproxResponse">
|
||||
<wsdlsoap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:service name="checkVatTestService">
|
||||
<wsdl:port name="checkVatPort" binding="impl:checkVatTestBinding">
|
||||
<wsdlsoap:address location="http://ec.europa.eu/taxation_customs/vies/services/checkVatTestService" />
|
||||
</wsdl:port>
|
||||
</wsdl:service>
|
||||
</wsdl:definitions>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is automatically generated by Visual Studio .Net. It is
|
||||
used to store generic object data source configuration information.
|
||||
Renaming the file extension or editing the content of this file may
|
||||
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.eu.europa.ec.matchCode, Web References.eu.europa.ec.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
|
||||
</GenericObjectDataSource>
|
||||
@@ -32,7 +32,7 @@ Public Class cAllgemein
|
||||
Public Shared TESTSYSTEM As Boolean = True
|
||||
|
||||
Public Shared PROGNAME = ""
|
||||
Public Shared PROGID As Integer = 16
|
||||
Public Shared PROGID As Integer = 16 'AVISO
|
||||
Public Shared PROGVERSION As String = ""
|
||||
|
||||
Public Shared USRNAME As String
|
||||
@@ -388,3 +388,33 @@ Public Class cAllgemein
|
||||
Return ""
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Public Class cNCTS_GUARANTEES
|
||||
|
||||
Public Shared TOBB() As String = {"17TR0004000032349", "20TR0004000069756", "13TR0004000009323", "21TR0004000097157", "12TR0004000004665", "15TR0004000020917", "17TR0004000029518", "20DE0000000078205", "19IT01TR000003323", "21TR0004000079552", "21TR0004000078157", "21TR0004000090364", "21TR0004000092350"}
|
||||
'old: {"15TR0004000020917", "12TR0004000004665", "17TR0004000032349", "17TR0004000029518", "21TR0004000079552", "21TR0004000078157", "21TR0004000092350", "20TR0004000069756", "21TR0004000090364", "21TR0004000097157"}
|
||||
Public Shared OREGON() As String = {"18DE0000000073276", "19DE0000000075520", "18DE0000000075520", "15TR0004000020500", "ITTR0000000000153", "21DE0000000079716"}
|
||||
Public Shared VERAG() As String = {"17DE0000000071678", "05AT510000G000FP7"}
|
||||
Public Shared IMEX() As String = {"16AT520000G000VA6"}
|
||||
Public Shared ATILLA() As String = {"20AT520000G000092"}
|
||||
Public Shared SGS() As String = {"16DE0000000068410"}
|
||||
Public Shared MARS() As String = {"15TR0004000020908"}
|
||||
Public Shared EKOL() As String = {"13TR0004000005094"}
|
||||
'cboBRG.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("TOBB - 15TR0004000020917 / 12TR0004000004665 / 17TR0004000032349 / 17TR0004000029518 / 21TR0004000079552 / 21TR0004000078157 / 21TR0004000092350", " '12TR0004000004665','15TR0004000020917','17TR0004000032349','17TR0004000029518','21TR0004000079552','21TR0004000078157','21TR0004000092350'"))
|
||||
|
||||
Public Shared Function getSQLList(arr() As String) As String
|
||||
getSQLList = ""
|
||||
For Each i In arr
|
||||
getSQLList &= "'" & i & "',"
|
||||
Next
|
||||
If getSQLList <> "" Then getSQLList = getSQLList.Substring(0, getSQLList.Length - 1)
|
||||
End Function
|
||||
Public Shared Function getSlashList(arr) As String
|
||||
getSlashList = ""
|
||||
For Each i In arr
|
||||
getSlashList &= "" & i & " / "
|
||||
Next
|
||||
If getSlashList <> "" Then getSlashList = getSlashList.Substring(0, getSlashList.Length - 3)
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
@@ -144,7 +144,7 @@ Public Class cProgramFunctions
|
||||
Try
|
||||
wb.Worksheets(0).Range(r).Style.NumberFormat.SetFormat("###,###,##0.00 €")
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & ex.StackTrace)
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
Next
|
||||
End If
|
||||
@@ -179,12 +179,12 @@ Public Class cProgramFunctions
|
||||
|
||||
Return filename
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & ex.StackTrace)
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Shared Function sendMail(eMailTo, betreff, text, Optional eMailfrom = "support@verag.ag", Optional prio = False, Optional uhrzeitAngeben = True, Optional cc = "", Optional bcc = "", Optional anhaenge = Nothing)
|
||||
Public Shared Function sendMail(eMailTo, betreff, text, Optional eMailfrom = "support@verag.ag", Optional prio = False, Optional uhrzeitAngeben = True, Optional cc = "", Optional bcc = "", Optional anhaenge = Nothing, Optional art = 0)
|
||||
Dim Msg As New MailMessage
|
||||
Dim myCredentials As New System.Net.NetworkCredential
|
||||
Msg.IsBodyHtml = True
|
||||
@@ -201,14 +201,26 @@ Public Class cProgramFunctions
|
||||
mySmtpsvr.Host = "owa.verag.ag"
|
||||
mySmtpsvr.Port = 587
|
||||
Case "AMBAR"
|
||||
' myCredentials.UserName = "office@ambarlog.com"
|
||||
' myCredentials.Password = "Naq30716"
|
||||
myCredentials.UserName = "import@ambarlog.com"
|
||||
myCredentials.Password = "Meh062020"
|
||||
mySmtpsvr.Host = "smtp.office365.com"
|
||||
mySmtpsvr.Port = 587
|
||||
mySmtpsvr.EnableSsl = True
|
||||
' eMailfrom = "import@ambarlog.com"
|
||||
Select Case art
|
||||
Case "3", "4" 'Export
|
||||
myCredentials.UserName = "office@ambarlog.com"
|
||||
' myCredentials.Password = "Naq30716"
|
||||
' myCredentials.UserName = "import@ambarlog.com"
|
||||
myCredentials.Password = "Naq30716"
|
||||
mySmtpsvr.Host = "smtp.office365.com"
|
||||
mySmtpsvr.Port = 587
|
||||
mySmtpsvr.EnableSsl = True
|
||||
text = text.replace("import@ambarlog.com", "office@ambarlog.com")
|
||||
eMailfrom = "office@ambarlog.com"
|
||||
Case Else
|
||||
|
||||
myCredentials.UserName = "import@ambarlog.com"
|
||||
myCredentials.Password = "Meh062020"
|
||||
mySmtpsvr.Host = "smtp.office365.com"
|
||||
mySmtpsvr.Port = 587
|
||||
mySmtpsvr.EnableSsl = True
|
||||
' eMailfrom = "import@ambarlog.com"
|
||||
End Select
|
||||
Case Else
|
||||
myCredentials.UserName = "support@verag.ag"
|
||||
myCredentials.Password = "$up0Rt2809!"
|
||||
@@ -273,7 +285,7 @@ Public Class cProgramFunctions
|
||||
mySmtpsvr.Send(Msg)
|
||||
|
||||
Catch ex3 As Exception
|
||||
MsgBox(ex3.Message & ex3.StackTrace)
|
||||
MsgBox(ex3.Message & ex3.StackTrace & vbNewLine & vbNewLine & "TO: " & eMailTo & vbNewLine & "cc: " & cc & vbNewLine & "bcc: " & bcc)
|
||||
Return False
|
||||
End Try
|
||||
End Try
|
||||
@@ -336,7 +348,7 @@ Public Class cProgramFunctions
|
||||
mySmtpsvr.Send(Msg)
|
||||
|
||||
Catch ex2 As Exception
|
||||
MsgBox(ex.Message & ex.StackTrace)
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user