mergekonfl.
This commit is contained in:
524
Aviso/frmDigicust.vb
Normal file
524
Aviso/frmDigicust.vb
Normal file
@@ -0,0 +1,524 @@
|
||||
Imports DocumentFormat.OpenXml.Vml.Presentation
|
||||
Imports GrapeCity.ActiveReports.Design.DdrDesigner.Designers
|
||||
Imports GrapeCity.ActiveReports.ReportsCore.Tools
|
||||
Imports Newtonsoft.Json.Linq
|
||||
Imports SDL
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
|
||||
|
||||
Public Class frmDigicust
|
||||
|
||||
|
||||
Dim api As cDigicustAPI
|
||||
|
||||
|
||||
Dim ART As String = ""
|
||||
Dim FilialenNr As Integer
|
||||
Dim AbfertigungsNr As Integer
|
||||
Dim JAHR As Integer = Now.ToString("yy")
|
||||
Public isSTAMMREF As Boolean = False
|
||||
Public STAMMREF As String = ""
|
||||
Public CopyFromZA_Id As Integer = -1
|
||||
Dim FIRMA_DY = VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA
|
||||
Dim ZOLL_SYSTEM = "DAKOSY"
|
||||
Dim DY As DAKOSY_Worker.cDakosy_Zollanmeldungen = Nothing
|
||||
Public ATT As List(Of String)
|
||||
Dim AVISO As New cAviso
|
||||
Dim zusatz As String
|
||||
Dim cDy_ART As String = If(FIRMA_DY = "ATILLA", "T2", "T1")
|
||||
Dim VermerkeDAL As New cVermerkeDAL
|
||||
Dim NCTS As DAKOSY_Worker.cDakosyNCTSOut = Nothing
|
||||
Dim openExisting As Boolean = False
|
||||
Dim id As Integer = -1
|
||||
Dim dgv As DataGridView = Nothing
|
||||
Dim atez_data As cATEZ_NCTS_DATA
|
||||
Dim atez = New cATEZ_NCTS_IN
|
||||
|
||||
Property BezugsNr As String = ""
|
||||
Property SENDUNG As VERAG_PROG_ALLGEMEIN.cSendungen
|
||||
|
||||
Sub New(AVISO As VERAG_PROG_ALLGEMEIN.cAviso, SENDUNG As VERAG_PROG_ALLGEMEIN.cSendungen, JAHR As Integer, Optional _dgv As DataGridView = Nothing)
|
||||
|
||||
' Dieser Aufruf ist für den Designer erforderlich.
|
||||
InitializeComponent()
|
||||
|
||||
If _dgv IsNot Nothing Then Me.dgv = _dgv
|
||||
Me.AVISO = AVISO
|
||||
Me.SENDUNG = SENDUNG
|
||||
Me.JAHR = JAHR
|
||||
|
||||
If SENDUNG IsNot Nothing Then
|
||||
Me.FilialenNr = SENDUNG.FilialenNr
|
||||
Me.AbfertigungsNr = SENDUNG.AbfertigungsNr
|
||||
End If
|
||||
|
||||
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Sub New(_id As Integer, AVISO As VERAG_PROG_ALLGEMEIN.cAviso, SENDUNG As VERAG_PROG_ALLGEMEIN.cSendungen, JAHR As Integer)
|
||||
|
||||
' Dieser Aufruf ist für den Designer erforderlich.
|
||||
InitializeComponent()
|
||||
openExisting = True
|
||||
id = _id
|
||||
|
||||
Me.AVISO = AVISO
|
||||
Me.SENDUNG = SENDUNG
|
||||
Me.JAHR = JAHR
|
||||
|
||||
If SENDUNG IsNot Nothing Then
|
||||
Me.FilialenNr = SENDUNG.FilialenNr
|
||||
Me.AbfertigungsNr = SENDUNG.AbfertigungsNr
|
||||
End If
|
||||
|
||||
|
||||
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
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
|
||||
|
||||
|
||||
If Not checkMandatoryField() Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
|
||||
lblInfo.Text = ""
|
||||
|
||||
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
|
||||
|
||||
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()
|
||||
|
||||
End With
|
||||
|
||||
saveRoute(atez_data)
|
||||
|
||||
sendAtezData(atez_data, atez)
|
||||
|
||||
Me.Cursor = Cursors.Default
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
Me.Cursor = Cursors.Default
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub sendAtezData(atezData As cATEZ_NCTS_DATA, atez As cATEZ_NCTS_IN)
|
||||
|
||||
Dim failreDesc As String
|
||||
|
||||
Dim authResp = atez.authenticate()
|
||||
If authResp <> "200" Then
|
||||
failreDesc = "Authentifizierung fehlgeschlagen - " & authResp & vbNewLine & "Vorgang abgebrochen!"
|
||||
lblInfo.Text = failreDesc
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
If Not atez.setJson(atezData) Then MsgBox("Fehler beim Erstellen der Daten" & vbNewLine & "Vorgang abgebrochen!")
|
||||
|
||||
If Not atez.setJsonPDF(atezData, dgvAnhaenge) Then MsgBox("Fehler beim Erstellen der PDF-Daten, kein Anhang ausgewählt!" & vbNewLine & "Vorgang abgebrochen!")
|
||||
|
||||
|
||||
Dim azetId = atez.SendRequestWithAuthHeader("application/json", failreDesc)
|
||||
|
||||
If failreDesc <> "" Then
|
||||
If atezData.status = "Draft" Then
|
||||
MsgBox("Fehler beim Senden" & vbNewLine & failreDesc)
|
||||
atezData.fehlerbeschreibung = failreDesc
|
||||
atezData.SAVE()
|
||||
Exit Sub
|
||||
End If
|
||||
Dim result As MsgBoxResult = MsgBox("Fehler beim Senden" & vbNewLine & failreDesc & vbNewLine & "Soll NCTS als Entwurf gespeichert werden?", vbYesNoCancel)
|
||||
If result = vbYes Then
|
||||
atezData.status = "Draft"
|
||||
atezData.fehlerbeschreibung = failreDesc
|
||||
atezData.SAVE()
|
||||
End If
|
||||
|
||||
lblInfo.Text = "Fehler in der API "
|
||||
|
||||
Else
|
||||
atezData.status = "Sent"
|
||||
atezData.atezId = IIf(azetId IsNot Nothing, azetId, "")
|
||||
atezData.SAVE()
|
||||
Me.Close()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Function getBezugsnr(ByRef BezugsNr)
|
||||
Dim BezugsNrTmp = ""
|
||||
BezugsNrTmp = SENDUNG.FilialenNr & "/" & SENDUNG.AbfertigungsNr
|
||||
BezugsNr = BezugsNrTmp
|
||||
zusatz = "A"
|
||||
|
||||
If dgv IsNot Nothing AndAlso dgv.Rows.Count > 0 Then
|
||||
BezugsNr = BezugsNrTmp & "/" & zusatz
|
||||
For Each r As DataGridViewRow In dgv.Rows
|
||||
If r.Cells("BezugsNr").Value = BezugsNr Then
|
||||
|
||||
If zusatz.Length = 1 Then
|
||||
zusatz = Chr(Asc(zusatz.ToString) + 1)
|
||||
Else
|
||||
zusatz = zusatz.Substring(0, 1) & Chr(Asc(zusatz.Substring(0, 2).ToString) + 1)
|
||||
End If
|
||||
|
||||
If zusatz = "Z" Then zusatz = "AA"
|
||||
End If
|
||||
BezugsNr = BezugsNrTmp & "/" & zusatz
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
While DAKOSY_Worker.cDakosy_Zollanmeldungen.ExistsBezugsNr(BezugsNr) 'IsNot Nothing
|
||||
BezugsNr = BezugsNrTmp & "/" & zusatz
|
||||
|
||||
If zusatz.Length = 1 Then
|
||||
zusatz = Chr(Asc(zusatz.ToString) + 1)
|
||||
Else
|
||||
zusatz = zusatz.Substring(0, 1) & Chr(Asc(zusatz.Substring(0, 2).ToString) + 1)
|
||||
End If
|
||||
|
||||
If zusatz = "Z" Then zusatz = "AA"
|
||||
End While
|
||||
|
||||
lblBezugsnummer.Text = BezugsNr
|
||||
Return BezugsNr
|
||||
End Function
|
||||
|
||||
|
||||
Private Sub frmATEZNCTS_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
|
||||
Select Case FIRMA_DY
|
||||
Case "VERAG" : txtDyMandant.Text = "VERG"
|
||||
txtDyNiederlassung.Text = VERAG_PROG_ALLGEMEIN.cAllgemein.NIEDERLASSUNG
|
||||
Case "ATILLA" : txtDyMandant.Text = "ATIL" : txtDyNiederlassung.Text = "SUW"
|
||||
Case "UNISPED" : txtDyMandant.Text = "UNAT" : txtDyNiederlassung.Text = "ATSPED"
|
||||
Case "IMEX" : txtDyMandant.Text = "IMEX" : txtDyNiederlassung.Text = "IME"
|
||||
Case "AMBAR" : txtDyMandant.Text = "ATIL" : txtDyNiederlassung.Text = "AMBWO"
|
||||
End Select
|
||||
|
||||
initSeachboxes()
|
||||
initAttachment()
|
||||
|
||||
'If openExisting Then
|
||||
|
||||
' If id > 0 Then
|
||||
' atez_data = New cATEZ_NCTS_DATA(id)
|
||||
|
||||
' If atez_data.atezId <> "" Then
|
||||
' lblInfo.Text = "Atez-ID " & atez_data.atezId
|
||||
' Else
|
||||
' lblInfo.Text = "Status: " & atez_data.status
|
||||
' End If
|
||||
|
||||
|
||||
' lblBezugsnummer.Text = atez_data.VERAG_LRN
|
||||
|
||||
' cboStammreferenz.fillWithSQL("SELECT [dySr_Stammreferenz],[dySr_Bezeichnung] FROM [tblDakosy_Stammreferenzen] WHERE dySr_Land='DE' AND dySr_Verfahren='NCTS' and dySr_dy_Mandant='" & txtDyMandant.Text & "' and dySr_dy_Niederlassung IN ('','" & txtDyNiederlassung.Text & "') and dySr_visible=1", False, "FMZOLL", True)
|
||||
' cboStammreferenz.changeItem(atez_data.DAKOSY_TemplateCode)
|
||||
|
||||
' txtLKWId.Text = atez_data.LicensePlateContainerNo
|
||||
|
||||
' sbBestimmungsZollstelle.SET_VALUE(atez_data.DestinationCustomsOffice)
|
||||
' sbAbgangZollstelle.SET_VALUE(atez_data.DepartureCustomsOffice)
|
||||
|
||||
' cbxTemperatur.Checked = IIf(atez_data.CoolingTemperature <> "", True, False)
|
||||
' txtTransporttemp.Text = atez_data.CoolingTemperature
|
||||
|
||||
' txtDat.Text = IIf(atez_data.DatDeterminationLimit IsNot DBNull.Value, atez_data.DatDeterminationLimit, "")
|
||||
|
||||
' usrCntl_Carrier.kdFirma.Text = atez_data.Carrier_Name
|
||||
' usrCntl_Carrier.txtStrasse.Text = atez_data.Carrier_Adress_Street
|
||||
' usrCntl_Carrier.txtPlz.Text = atez_data.Carrier_Adress_Postcode
|
||||
' usrCntl_Carrier.txtOrt.Text = atez_data.Carrier_Adress_City
|
||||
' usrCntl_Carrier.sbLand._value = atez_data.Carrier_Adress_Country
|
||||
' usrCntl_Carrier.txtEORI.Text = atez_data.Carrier_EORI
|
||||
|
||||
' setRoute()
|
||||
|
||||
' If atez_data.status = "Draft" Then
|
||||
' Button1.Text = "An ATEZ senden -->"
|
||||
' pnlHead.Enabled = True
|
||||
' Button1.Enabled = True
|
||||
' initAttachment()
|
||||
|
||||
' Else
|
||||
' Button1.Text = "JSON"
|
||||
' pnlHead.Enabled = False
|
||||
' Button1.Enabled = True
|
||||
' End If
|
||||
|
||||
|
||||
' Else
|
||||
' Button1.Enabled = False
|
||||
' End If
|
||||
|
||||
'Else
|
||||
' atez_data = New cATEZ_NCTS_DATA()
|
||||
' Button1.Text = "An ATEZ senden -->"
|
||||
' pnlHead.Enabled = True
|
||||
|
||||
' cboStammreferenz.fillWithSQL("SELECT [dySr_Stammreferenz],[dySr_Bezeichnung] FROM [tblDakosy_Stammreferenzen] WHERE dySr_Land='DE' AND dySr_Verfahren='NCTS' and dySr_dy_Mandant='" & txtDyMandant.Text & "' and dySr_dy_Niederlassung IN ('','" & txtDyNiederlassung.Text & "') and dySr_visible=1", False, "FMZOLL", True)
|
||||
' cboStammreferenz.changeItem("")
|
||||
|
||||
' getBezugsnr(BezugsNr)
|
||||
' txtLKWId.Text = AVISO.LKW_Nr
|
||||
|
||||
' cbxTemperatur.Checked = IIf(AVISO.TransportTemperatur <> "", True, False)
|
||||
' txtTransporttemp.Text = AVISO.TransportTemperatur
|
||||
|
||||
' If AVISO.Frächter_KdNr IsNot Nothing AndAlso IsNumeric(AVISO.Frächter_KdNr) AndAlso AVISO.Frächter_KdNr > 0 Then
|
||||
' usrCntl_Carrier.kdFirma.initKdBox(Me)
|
||||
' usrCntl_Carrier.kdFirma.KdNr = AVISO.Frächter_KdNr
|
||||
' End If
|
||||
|
||||
' If AVISO.Grenzstelle.Replace("???", "") = "" Then
|
||||
' sbAbgangZollstelle.SET_VALUE(AVISO.Zollstelle)
|
||||
' Else
|
||||
|
||||
' Dim GRZ As New VERAG_PROG_ALLGEMEIN.cGrenzstelle(AVISO.Grenzstelle)
|
||||
' If GRZ IsNot Nothing AndAlso GRZ.hasEntry Then
|
||||
' If GRZ.grz_ZollamtDST IsNot Nothing Then
|
||||
' sbAbgangZollstelle.SET_VALUE(GRZ.grz_ZollamtDST)
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
|
||||
'End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Sub initAttachment()
|
||||
Dim hSQL As String = " SELECT [anh_id],anh_Datum,[anh_Name],[anh_docId],
|
||||
|
||||
CASE WHEN [anh_Art] = 'ATR-EUR1' then 'EUR'
|
||||
when [anh_Art] = 'Rechnung' then 'INVOICE'
|
||||
when [anh_Art] = 'eFatura' then 'INVOICE'
|
||||
when [anh_Art] = 'CMR' then 'CMR'
|
||||
when [anh_Art] = 'Ausfuhr' then 'OTHER'
|
||||
when [anh_Art] = 'Vorpapier' then 'OTHER'
|
||||
when [anh_Art] = 'Packliste' then 'PACK'
|
||||
when [anh_Art] = 'Auftrag' then 'OTHER'
|
||||
when [anh_Art] = 'Auftrag' then 'OTHER'
|
||||
when [anh_Art] = 'Dispoliste' then 'OTHER'
|
||||
when [anh_Art] = 'Vorkasse' then 'OTHER'
|
||||
when [anh_Art] = 'Überweisungsbeleg' then 'OTHER'
|
||||
when [anh_Art] = 'Vollmacht' then 'OTHER'
|
||||
when [anh_Art] = 'ATB' then 'OTHER'
|
||||
when [anh_Art] = 'ATA' then 'CarnetATA'
|
||||
when [anh_Art] = 'Sonstiges' then 'OTHER'
|
||||
when [anh_Art] ='' then 'OTHER' End
|
||||
[anh_Art],[anh_Typ] FROM [tblAvisoAnhaenge]
|
||||
WHERE [anh_AvisoId]='" & AVISO.AvisoID & "' AND isnull(anh_SendungsId,0) <= 0 And anh_Typ = 'PDF'
|
||||
Order BY [anh_Reihenfolge], anh_Datum desc, [anh_id]"
|
||||
|
||||
Dim dt = VermerkeDAL.Anzeigen_Vermerke(hSQL)
|
||||
|
||||
Dim col As DataColumn
|
||||
col = dt.Columns.Add("anh_selekt", GetType(Boolean))
|
||||
col.SetOrdinal(0)
|
||||
|
||||
dgvAnhaenge.DataSource = dt
|
||||
|
||||
If dgvAnhaenge.RowCount = 0 Then dgvAnhaenge.Columns.Clear() : Exit Sub
|
||||
|
||||
With dgvAnhaenge
|
||||
|
||||
.Enabled = True
|
||||
.ReadOnly = False
|
||||
|
||||
.RowTemplate.MinimumHeight = 30
|
||||
.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells
|
||||
.Columns("anh_id").Visible = False 'VermerkID nicht anzeigenconMenuVermerke
|
||||
.Columns("anh_docId").Visible = False 'AvisoID nicht anzeigen
|
||||
|
||||
.Columns("anh_selekt").MinimumWidth = 50
|
||||
.Columns("anh_selekt").HeaderText = "ausgewählt"
|
||||
.Columns("anh_selekt").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
|
||||
|
||||
.Columns("anh_Datum").MinimumWidth = 50
|
||||
.Columns("anh_Datum").HeaderText = "Datum"
|
||||
.Columns("anh_Datum").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
|
||||
|
||||
|
||||
.Columns("anh_Name").MinimumWidth = 150
|
||||
.Columns("anh_Name").HeaderText = "Name"
|
||||
.Columns("anh_Name").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
|
||||
|
||||
.Columns("anh_Art").MinimumWidth = 50
|
||||
.Columns("anh_Art").HeaderText = "Art"
|
||||
.Columns("anh_Art").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
|
||||
|
||||
.Columns("anh_Typ").Width = 60
|
||||
.Columns("anh_Typ").HeaderText = "Typ"
|
||||
.Columns("anh_Typ").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
|
||||
|
||||
End With
|
||||
|
||||
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
|
||||
|
||||
For Each Row In dgvAnhaenge.Rows
|
||||
|
||||
selectedDocuments = IIf(DBNull.Value Is Row.Cells("anh_selekt").Value, False, Row.Cells("anh_selekt").Value)
|
||||
If selectedDocuments Then Exit For
|
||||
Next
|
||||
|
||||
If Not selectedDocuments Then
|
||||
lblInfo.Text = "kein Anhang selektiert"
|
||||
Cursor = Cursors.Default
|
||||
Return selectedDocuments
|
||||
End If
|
||||
|
||||
Return selectedDocuments
|
||||
|
||||
End Function
|
||||
|
||||
Public Function checkMandatoryField() As Boolean
|
||||
|
||||
|
||||
'TODO
|
||||
Return True
|
||||
|
||||
|
||||
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 = ""
|
||||
End Sub
|
||||
|
||||
Private Sub btnCreateToken_Click(sender As Object, e As EventArgs) Handles btnCreateToken.Click
|
||||
Label2.Text = "Status: " & api.authenticate(rtfToken.Text)
|
||||
If rtfToken.Text <> "" Then
|
||||
Label1.Text = "Token (valid 24hrs) until: " & Now().AddHours(24)
|
||||
Else
|
||||
Label1.Text = "Token (valid 24hrs)"
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user