50 lines
1.5 KiB
VB.net
50 lines
1.5 KiB
VB.net
Imports VERAG_PROG_ALLGEMEIN
|
|
|
|
Public Class frmFrachtkostenBerechnen
|
|
|
|
Dim absenderID As Integer
|
|
Dim empfaengerID As Integer
|
|
Dim origin As String
|
|
Dim destination As String
|
|
|
|
|
|
Sub New(absID As String, empfID As String)
|
|
|
|
InitializeComponent()
|
|
absenderID = CInt(absID)
|
|
empfaengerID = CInt(empfID)
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
Private Sub frmFrachtkotenBerechnen_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
|
|
|
txbVon.fillWithSQL("SELECT ISNULL([LandKz],'-') AS , ISNULL([PLZ],'-'), ISNULL([Ort],''), ISNULL([Straße],'-') FROM [VERAG].[dbo].[Adressen] where AdressenNr = '" & absenderID & "'")
|
|
txbNach.fillWithSQL("SELECT ISNULL([LandKz],'-') AS , ISNULL([PLZ],'-'), ISNULL([Ort],''), ISNULL([Straße],'-') FROM [VERAG].[dbo].[Adressen] where AdressenNr = '" & empfaengerID & "'")
|
|
|
|
|
|
End Sub
|
|
|
|
Sub calculateFreight()
|
|
|
|
Dim duration = ""
|
|
Dim distance = ""
|
|
|
|
'If ALLG.sbAbgangZollstelle._value <> "" Then
|
|
' origin = ALLG.sbAbgangZollstelle._value.Substring(0, 2) & " " & ALLG.sbAbgangZollstelle.Text
|
|
'End If
|
|
|
|
|
|
'Dim usrCntlEmpf = ADRESSEN.usrCntlEmpfaenger
|
|
destination &= usrCntlEmpf.txtStrasse.Text & " "
|
|
destination &= usrCntlEmpf.sbLand._value & " "
|
|
destination &= usrCntlEmpf.txtPlz.Text & " "
|
|
destination &= usrCntlEmpf.txtOrt.Text & " "
|
|
|
|
|
|
VERAG_PROG_ALLGEMEIN.cGoogleAPI.GoogleDistance(origin, destination, duration, "", distance)
|
|
|
|
End Sub
|
|
|
|
End Class |