ATEZ und Digicust
This commit is contained in:
@@ -82,11 +82,11 @@ Public Class frmDigicust
|
||||
Try
|
||||
|
||||
If atez_data.status = "Sent" Then
|
||||
MsgBox(IIf(atez_data.json <> "", atez_data.json, ""))
|
||||
Exit Sub
|
||||
|
||||
End If
|
||||
|
||||
If Not checkAttachment() Then
|
||||
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
@@ -100,41 +100,38 @@ Public Class frmDigicust
|
||||
|
||||
lblInfo.Text = ""
|
||||
|
||||
With atez_data
|
||||
'With atez_data
|
||||
|
||||
.AvisoId = AVISO.AvisoID
|
||||
.SendungsId = SENDUNG.tblSnd_SendungID
|
||||
.VERAG_LRN = lblBezugsnummer.Text
|
||||
.LicensePlateContainerNo = txtLKWId.Text
|
||||
.DAKOSY_TemplateCode = cboStammreferenz._value
|
||||
.DAKOSY_IOPartner = txtDyMandant.Text
|
||||
.DAKOSY_Division3 = txtDyNiederlassung.Text
|
||||
.DepartureCustomsOffice = sbAbgangZollstelle._value
|
||||
.DestinationCustomsOffice = sbBestimmungsZollstelle._value
|
||||
.DatDeterminationLimit = txtDat.Text
|
||||
.CoolingTemperature = IIf(cbxTemperatur.Checked, txtTransporttemp.Text, "")
|
||||
.Carrier_Name = usrCntl_Carrier.kdFirma.Text
|
||||
.Carrier_Adress_City = usrCntl_Carrier.txtOrt.Text
|
||||
.Carrier_Adress_Country = usrCntl_Carrier.sbLand._value
|
||||
.Carrier_Adress_Postcode = usrCntl_Carrier.txtPlz.Text
|
||||
.Carrier_Adress_Street = usrCntl_Carrier.txtStrasse.Text
|
||||
.Carrier_EORI = usrCntl_Carrier.txtEORI.Text
|
||||
.Guarantee_GRN = "" 'leer
|
||||
' .AvisoId = AVISO.AvisoID
|
||||
' .SendungsId = SENDUNG.tblSnd_SendungID
|
||||
' .VERAG_LRN = lblBezugsnummer.Text
|
||||
' .LicensePlateContainerNo = txtLKWId.Text
|
||||
' .DAKOSY_TemplateCode = cboStammreferenz._value
|
||||
' .DAKOSY_IOPartner = txtDyMandant.Text
|
||||
' .DAKOSY_Division3 = txtDyNiederlassung.Text
|
||||
' .DestinationCustomsOffice = sbBestimmungsZollstelle._value
|
||||
' .Carrier_Name = usrCntl_Carrier.kdFirma.Text
|
||||
' .Carrier_Adress_City = usrCntl_Carrier.txtOrt.Text
|
||||
' .Carrier_Adress_Country = usrCntl_Carrier.sbLand._value
|
||||
' .Carrier_Adress_Postcode = usrCntl_Carrier.txtPlz.Text
|
||||
' .Carrier_Adress_Street = usrCntl_Carrier.txtStrasse.Text
|
||||
' .Carrier_EORI = usrCntl_Carrier.txtEORI.Text
|
||||
' .Guarantee_GRN = "" 'leer
|
||||
|
||||
For Each doc As DataGridViewRow In dgvAnhaenge.Rows
|
||||
Dim isSelected = IIf(DBNull.Value Is doc.Cells("anh_selekt").Value, False, doc.Cells("anh_selekt").Value)
|
||||
If isSelected Then
|
||||
.selectedDocuments &= doc.Cells("anh_docId").Value & ", "
|
||||
End If
|
||||
Next
|
||||
' For Each doc As DataGridViewRow In dgvAnhaenge.Rows
|
||||
' Dim isSelected = IIf(DBNull.Value Is doc.Cells("anh_selekt").Value, False, doc.Cells("anh_selekt").Value)
|
||||
' If isSelected Then
|
||||
' .selectedDocuments &= doc.Cells("anh_docId").Value & ", "
|
||||
' End If
|
||||
' Next
|
||||
|
||||
.SAVE()
|
||||
' .SAVE()
|
||||
|
||||
End With
|
||||
'End With
|
||||
|
||||
saveRoute(atez_data)
|
||||
|
||||
sendAtezData(atez_data, atez)
|
||||
|
||||
'sendAtezData(atez_data, atez)
|
||||
|
||||
Me.Cursor = Cursors.Default
|
||||
|
||||
@@ -241,7 +238,6 @@ Public Class frmDigicust
|
||||
Case "AMBAR" : txtDyMandant.Text = "ATIL" : txtDyNiederlassung.Text = "AMBWO"
|
||||
End Select
|
||||
|
||||
initSeachboxes()
|
||||
initAttachment()
|
||||
|
||||
'If openExisting Then
|
||||
@@ -403,43 +399,6 @@ Public Class frmDigicust
|
||||
End Sub
|
||||
|
||||
|
||||
Sub initSeachboxes()
|
||||
|
||||
sbAbgangZollstelle.initSearchBox(Me.FindForm, "[Code] ,[Code] as Nr,Description as Dienststelle,left(Code,2) as Land,[Description] +' (' +left(Code,2)+')' as display FROM [tbl_DY_ZollDE_C0141_Zollstellen]", {" [Code]", "Description"}, " (StartDate is null OR StartDate< GETDATE()) AND (EndDate is null OR EndDate> GETDATE()) ", " left(Code,2),[Description]", "Code", "display", "FMZOLL", , 400, 200, {"display", "Code"})
|
||||
sbBestimmungsZollstelle.initSearchBox(Me.FindForm, "[Code] ,[Code] as Nr,Description as Dienststelle,left(Code,2) as Land,[Description] +' (' +left(Code,2)+')' as display FROM [tbl_DY_ZollDE_C0141_Zollstellen]", {" [Code]", "Description"}, " (StartDate is null OR StartDate< GETDATE()) AND (EndDate is null OR EndDate> GETDATE()) ", " left(Code,2),[Description]", "Code", "display", "FMZOLL", , 400, 200, {"display", "Code"})
|
||||
|
||||
sbRoute1.initSearchBox(Me.FindForm, " [Code] ,[Description] as Land,[Code]+' - ' +[Description] as display FROM tbl_DY_ZollDE_C0008_LaenderFull", {"Code", "Description"}, " (StartDate is null OR StartDate< GETDATE()) AND (EndDate is null OR EndDate> GETDATE()) ", "Code", "Code", "display", "FMZOLL", , 400, 200)
|
||||
sbRoute2.initSearchBox(Me.FindForm, " [Code] ,[Description] as Land,[Code]+' - ' +[Description] as display FROM tbl_DY_ZollDE_C0008_LaenderFull", {"Code", "Description"}, " (StartDate is null OR StartDate< GETDATE()) AND (EndDate is null OR EndDate> GETDATE()) ", "Code", "Code", "display", "FMZOLL", , 400, 200)
|
||||
sbRoute3.initSearchBox(Me.FindForm, " [Code] ,[Description] as Land,[Code]+' - ' +[Description] as display FROM tbl_DY_ZollDE_C0008_LaenderFull", {"Code", "Description"}, " (StartDate is null OR StartDate< GETDATE()) AND (EndDate is null OR EndDate> GETDATE()) ", "Code", "Code", "display", "FMZOLL", , 400, 200)
|
||||
sbRoute4.initSearchBox(Me.FindForm, " [Code] ,[Description] as Land,[Code]+' - ' +[Description] as display FROM tbl_DY_ZollDE_C0008_LaenderFull", {"Code", "Description"}, " (StartDate is null OR StartDate< GETDATE()) AND (EndDate is null OR EndDate> GETDATE()) ", "Code", "Code", "display", "FMZOLL", , 400, 200)
|
||||
sbRoute5.initSearchBox(Me.FindForm, " [Code] ,[Description] as Land,[Code]+' - ' +[Description] as display FROM tbl_DY_ZollDE_C0008_LaenderFull", {"Code", "Description"}, " (StartDate is null OR StartDate< GETDATE()) AND (EndDate is null OR EndDate> GETDATE()) ", "Code", "Code", "display", "FMZOLL", , 400, 200)
|
||||
sbRoute6.initSearchBox(Me.FindForm, " [Code] ,[Description] as Land,[Code]+' - ' +[Description] as display FROM tbl_DY_ZollDE_C0008_LaenderFull", {"Code", "Description"}, " (StartDate is null OR StartDate< GETDATE()) AND (EndDate is null OR EndDate> GETDATE()) ", "Code", "Code", "display", "FMZOLL", , 400, 200)
|
||||
sbRoute7.initSearchBox(Me.FindForm, " [Code] ,[Description] as Land,[Code]+' - ' +[Description] as display FROM tbl_DY_ZollDE_C0008_LaenderFull", {"Code", "Description"}, " (StartDate is null OR StartDate< GETDATE()) AND (EndDate is null OR EndDate> GETDATE()) ", "Code", "Code", "display", "FMZOLL", , 400, 200)
|
||||
sbRoute8.initSearchBox(Me.FindForm, " [Code] ,[Description] as Land,[Code]+' - ' +[Description] as display FROM tbl_DY_ZollDE_C0008_LaenderFull", {"Code", "Description"}, " (StartDate is null OR StartDate< GETDATE()) AND (EndDate is null OR EndDate> GETDATE()) ", "Code", "Code", "display", "FMZOLL", , 400, 200)
|
||||
sbRoute9.initSearchBox(Me.FindForm, " [Code] ,[Description] as Land,[Code]+' - ' +[Description] as display FROM tbl_DY_ZollDE_C0008_LaenderFull", {"Code", "Description"}, " (StartDate is null OR StartDate< GETDATE()) AND (EndDate is null OR EndDate> GETDATE()) ", "Code", "Code", "display", "FMZOLL", , 400, 200)
|
||||
End Sub
|
||||
|
||||
Private Sub lklRoutenauswahl_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles lklRoutenauswahl.LinkClicked
|
||||
Dim frmRoutenauswahl As New frmRoutenauswahl
|
||||
If frmRoutenauswahl.ShowDialog(Me) = DialogResult.OK Then
|
||||
If frmRoutenauswahl.ROUTE.Count > 0 Then sbRoute1.SET_VALUE(frmRoutenauswahl.ROUTE(0)) Else sbRoute1.SET_VALUE("")
|
||||
If frmRoutenauswahl.ROUTE.Count > 1 Then sbRoute2.SET_VALUE(frmRoutenauswahl.ROUTE(1)) Else sbRoute2.SET_VALUE("")
|
||||
If frmRoutenauswahl.ROUTE.Count > 2 Then sbRoute3.SET_VALUE(frmRoutenauswahl.ROUTE(2)) Else sbRoute3.SET_VALUE("")
|
||||
If frmRoutenauswahl.ROUTE.Count > 3 Then sbRoute4.SET_VALUE(frmRoutenauswahl.ROUTE(3)) Else sbRoute4.SET_VALUE("")
|
||||
If frmRoutenauswahl.ROUTE.Count > 4 Then sbRoute5.SET_VALUE(frmRoutenauswahl.ROUTE(4)) Else sbRoute5.SET_VALUE("")
|
||||
If frmRoutenauswahl.ROUTE.Count > 5 Then sbRoute6.SET_VALUE(frmRoutenauswahl.ROUTE(5)) Else sbRoute6.SET_VALUE("")
|
||||
If frmRoutenauswahl.ROUTE.Count > 6 Then sbRoute7.SET_VALUE(frmRoutenauswahl.ROUTE(6)) Else sbRoute7.SET_VALUE("")
|
||||
If frmRoutenauswahl.ROUTE.Count > 7 Then sbRoute8.SET_VALUE(frmRoutenauswahl.ROUTE(7)) Else sbRoute8.SET_VALUE("")
|
||||
If frmRoutenauswahl.ROUTE.Count > 8 Then sbRoute9.SET_VALUE(frmRoutenauswahl.ROUTE(8)) Else sbRoute9.SET_VALUE("")
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub dtpDat_ValueChanged(sender As Object, e As EventArgs) Handles dtpDat.ValueChanged
|
||||
txtDat._value = CDate(sender.value).ToShortDateString
|
||||
End Sub
|
||||
|
||||
|
||||
Public Function checkAttachment() As Boolean
|
||||
|
||||
Dim selectedDocuments As Boolean = False
|
||||
@@ -470,43 +429,7 @@ Public Class frmDigicust
|
||||
End Function
|
||||
|
||||
|
||||
Public Sub setRoute()
|
||||
|
||||
Dim Route_LIST As New List(Of VERAG_PROG_ALLGEMEIN.cATEZ_NCTS_Routen)
|
||||
VERAG_PROG_ALLGEMEIN.cATEZ_NCTS_Routen.LOAD_LIST_ByNCTS(Route_LIST, id)
|
||||
|
||||
Dim i = 0
|
||||
For Each route In Route_LIST
|
||||
If i = 0 Then sbRoute1.SET_VALUE(route.Route_Country)
|
||||
If i = 1 Then sbRoute2.SET_VALUE(route.Route_Country)
|
||||
If i = 2 Then sbRoute3.SET_VALUE(route.Route_Country)
|
||||
If i = 3 Then sbRoute4.SET_VALUE(route.Route_Country)
|
||||
If i = 4 Then sbRoute5.SET_VALUE(route.Route_Country)
|
||||
If i = 5 Then sbRoute6.SET_VALUE(route.Route_Country)
|
||||
If i = 6 Then sbRoute7.SET_VALUE(route.Route_Country)
|
||||
If i = 7 Then sbRoute8.SET_VALUE(route.Route_Country)
|
||||
If i = 8 Then sbRoute9.SET_VALUE(route.Route_Country)
|
||||
i = i + 1
|
||||
Next
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Sub saveRoute(atezData As cATEZ_NCTS_DATA)
|
||||
|
||||
|
||||
If sbRoute1._value <> "" Then Dim route As New cATEZ_NCTS_Routen(atezData.Id, sbRoute1._value)
|
||||
If sbRoute2._value <> "" Then Dim route As New cATEZ_NCTS_Routen(atezData.Id, sbRoute2._value)
|
||||
If sbRoute3._value <> "" Then Dim route As New cATEZ_NCTS_Routen(atezData.Id, sbRoute3._value)
|
||||
If sbRoute4._value <> "" Then Dim route As New cATEZ_NCTS_Routen(atezData.Id, sbRoute4._value)
|
||||
If sbRoute5._value <> "" Then Dim route As New cATEZ_NCTS_Routen(atezData.Id, sbRoute5._value)
|
||||
If sbRoute6._value <> "" Then Dim route As New cATEZ_NCTS_Routen(atezData.Id, sbRoute6._value)
|
||||
If sbRoute7._value <> "" Then Dim route As New cATEZ_NCTS_Routen(atezData.Id, sbRoute7._value)
|
||||
If sbRoute8._value <> "" Then Dim route As New cATEZ_NCTS_Routen(atezData.Id, sbRoute8._value)
|
||||
If sbRoute9._value <> "" Then Dim route As New cATEZ_NCTS_Routen(atezData.Id, sbRoute9._value)
|
||||
End Sub
|
||||
|
||||
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
|
||||
rtfToken.Text = ""
|
||||
|
||||
Reference in New Issue
Block a user