diff --git a/Aviso/frmEintragAviso.designer.vb b/Aviso/frmEintragAviso.designer.vb
index d801baf..89d53e4 100644
--- a/Aviso/frmEintragAviso.designer.vb
+++ b/Aviso/frmEintragAviso.designer.vb
@@ -153,6 +153,7 @@ Partial Class frmEintragAviso
Me.Label2 = New System.Windows.Forms.Label()
Me.UsrCntlAviso_Vorpapiere1 = New AVISO.usrCntlAviso_Vorpapiere()
Me.UsrCntlEintragAvisoAtilla = New AVISO.usrCntlEintragAvisoAtilla()
+ Me.cbxEintreffenAus = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.panAdmin.SuspendLayout()
Me.grpAviso.SuspendLayout()
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -728,6 +729,7 @@ Partial Class frmEintragAviso
'
'grpAviso
'
+ Me.grpAviso.Controls.Add(Me.cbxEintreffenAus)
Me.grpAviso.Controls.Add(Me.lblTeamFraechter)
Me.grpAviso.Controls.Add(Me.lblTeamAvisierer)
Me.grpAviso.Controls.Add(Me.cboTransportmittelart)
@@ -882,9 +884,9 @@ Partial Class frmEintragAviso
'
Me.Button5.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button5.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!)
- Me.Button5.Location = New System.Drawing.Point(272, 48)
+ Me.Button5.Location = New System.Drawing.Point(279, 27)
Me.Button5.Name = "Button5"
- Me.Button5.Size = New System.Drawing.Size(119, 21)
+ Me.Button5.Size = New System.Drawing.Size(118, 21)
Me.Button5.TabIndex = 7
Me.Button5.Text = "Berechnen"
Me.Button5.UseVisualStyleBackColor = True
@@ -1314,18 +1316,19 @@ Partial Class frmEintragAviso
Me.lblVoraussEintreff.AutoSize = True
Me.lblVoraussEintreff.Location = New System.Drawing.Point(25, 51)
Me.lblVoraussEintreff.Name = "lblVoraussEintreff"
- Me.lblVoraussEintreff.Size = New System.Drawing.Size(140, 13)
+ Me.lblVoraussEintreff.Size = New System.Drawing.Size(160, 13)
Me.lblVoraussEintreff.TabIndex = 5
- Me.lblVoraussEintreff.Text = "Voraussichtliches Eintreffen:"
+ Me.lblVoraussEintreff.Text = "Voraussichtliches Eintreffen aus:"
Me.lblVoraussEintreff.Visible = False
'
'datVoraussichtlichesEintreffen
'
Me.datVoraussichtlichesEintreffen.CustomFormat = "dd.MM.yyyy"
Me.datVoraussichtlichesEintreffen.Format = System.Windows.Forms.DateTimePickerFormat.Custom
- Me.datVoraussichtlichesEintreffen.Location = New System.Drawing.Point(177, 48)
+ Me.datVoraussichtlichesEintreffen.Location = New System.Drawing.Point(319, 49)
Me.datVoraussichtlichesEintreffen.Name = "datVoraussichtlichesEintreffen"
- Me.datVoraussichtlichesEintreffen.Size = New System.Drawing.Size(89, 20)
+ Me.datVoraussichtlichesEintreffen.ShowUpDown = True
+ Me.datVoraussichtlichesEintreffen.Size = New System.Drawing.Size(76, 20)
Me.datVoraussichtlichesEintreffen.TabIndex = 6
Me.datVoraussichtlichesEintreffen.Value = New Date(2020, 1, 23, 0, 0, 0, 0)
Me.datVoraussichtlichesEintreffen.Visible = False
@@ -1521,6 +1524,7 @@ Partial Class frmEintragAviso
Me.txtSendungen._DateTimeOnly = False
Me.txtSendungen._numbersOnly = True
Me.txtSendungen._numbersOnlyKommastellen = ""
+ Me.txtSendungen._numbersOnlyTrennzeichen = True
Me.txtSendungen._Prozent = False
Me.txtSendungen._ShortDateNew = False
Me.txtSendungen._ShortDateOnly = False
@@ -1572,6 +1576,7 @@ Partial Class frmEintragAviso
Me.txtSndFremd._DateTimeOnly = False
Me.txtSndFremd._numbersOnly = True
Me.txtSndFremd._numbersOnlyKommastellen = ""
+ Me.txtSndFremd._numbersOnlyTrennzeichen = True
Me.txtSndFremd._Prozent = False
Me.txtSndFremd._ShortDateNew = False
Me.txtSndFremd._ShortDateOnly = False
@@ -1635,6 +1640,7 @@ Partial Class frmEintragAviso
Me.txtSndFiskalDE._DateTimeOnly = False
Me.txtSndFiskalDE._numbersOnly = True
Me.txtSndFiskalDE._numbersOnlyKommastellen = ""
+ Me.txtSndFiskalDE._numbersOnlyTrennzeichen = True
Me.txtSndFiskalDE._Prozent = False
Me.txtSndFiskalDE._ShortDateNew = False
Me.txtSndFiskalDE._ShortDateOnly = False
@@ -1669,6 +1675,7 @@ Partial Class frmEintragAviso
Me.txtSndFiskalAT._DateTimeOnly = False
Me.txtSndFiskalAT._numbersOnly = True
Me.txtSndFiskalAT._numbersOnlyKommastellen = ""
+ Me.txtSndFiskalAT._numbersOnlyTrennzeichen = True
Me.txtSndFiskalAT._Prozent = False
Me.txtSndFiskalAT._ShortDateNew = False
Me.txtSndFiskalAT._ShortDateOnly = False
@@ -1825,6 +1832,17 @@ Partial Class frmEintragAviso
Me.UsrCntlEintragAvisoAtilla.TabIndex = 8
Me.UsrCntlEintragAvisoAtilla.Visible = False
'
+ 'cbxEintreffenAus
+ '
+ Me.cbxEintreffenAus._allowedValuesFreiText = Nothing
+ Me.cbxEintreffenAus._allowFreiText = False
+ Me.cbxEintreffenAus._value = ""
+ Me.cbxEintreffenAus.FormattingEnabled = True
+ Me.cbxEintreffenAus.Location = New System.Drawing.Point(186, 48)
+ Me.cbxEintreffenAus.Name = "cbxEintreffenAus"
+ Me.cbxEintreffenAus.Size = New System.Drawing.Size(81, 21)
+ Me.cbxEintreffenAus.TabIndex = 51
+ '
'frmEintragAviso
'
Me.AcceptButton = Me.btnOK
@@ -2021,4 +2039,5 @@ Partial Class frmEintragAviso
Friend WithEvents Label4 As Label
Friend WithEvents lblTeamFraechter As Label
Friend WithEvents lblTeamAvisierer As Label
+ Friend WithEvents cbxEintreffenAus As VERAG_PROG_ALLGEMEIN.MyComboBox
End Class
diff --git a/Aviso/frmEintragAviso.resx b/Aviso/frmEintragAviso.resx
index 27f42d4..4f442f2 100644
--- a/Aviso/frmEintragAviso.resx
+++ b/Aviso/frmEintragAviso.resx
@@ -216,6 +216,12 @@
True
+
+ True
+
+
+ True
+
AAABAAEAgIAAAAEAIAAoCAEAFgAAACgAAACAAAAAAAEAAAEAIAAAAAAAAAgBABMLAAATCwAAAAAAAAAA
diff --git a/Aviso/frmEintragAviso.vb b/Aviso/frmEintragAviso.vb
index 42eb195..3b47231 100644
--- a/Aviso/frmEintragAviso.vb
+++ b/Aviso/frmEintragAviso.vb
@@ -2,7 +2,8 @@
Imports VERAG_PROG_ALLGEMEIN.cMeineFunktionenAVISO
Imports System.Data.OleDb
Imports System.Data.SqlClient
-Imports System.Drawing.Printing
+Imports System.Drawing.Printing
+Imports System.Linq.Expressions
Public Class frmEintragAviso
' Public frmHilf As frmMain
@@ -521,6 +522,7 @@ Public Class frmEintragAviso
dtpAvisoEingangZeit.Enabled = bearb
End If
+ cbxEintreffenAus.fillWithSQL("SELECT [nctsr_dauer_in_tagen], [nctsr_von] FROM [tblNTCSRouten] ", False, "FMZOLL", False)
initAttachment()
@@ -1828,4 +1830,37 @@ Public Class frmEintragAviso
lblAtrAvis_Click(lblAtrAvis, New EventArgs)
End If
End Sub
+
+ Private Sub cbxEintreffenAus_SelectedValueChanged(sender As Object, e As EventArgs) Handles cbxEintreffenAus.SelectedValueChanged
+
+
+ Dim days = calculateTripDuration()
+
+ If days < 0 Then Exit Sub
+
+ datVoraussichtlichesEintreffen.Enabled = False
+ datVoraussichtlichesEintreffen.Value = DateTime.Now.AddDays(days)
+
+
+
+ End Sub
+
+ Function calculateTripDuration()
+
+ Dim destination As String
+ Dim departure As String
+
+ If cboGrenzstelle._value = "???" Then
+ destination = txtBestimmungszollstelle._value
+ Else
+ destination = cboGrenzstelle._value
+ End If
+
+ departure = cbxEintreffenAus.Text
+
+ Dim days As Integer = SQL.DLookup("nctsr_dauer_in_tagen", "tblNTCSRouten", "[nctsr_von]='" & departure & "' AND [nctsr_nach]= '" & destination & "'", "VERAG", "")
+ If days > 0 Then Return days
+ Return -1
+
+ End Function
End Class