You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.2 KiB

Module IntTables
Public Inttables As New DataSet
Public orte As New DataTable
Dim Ortsverzeichnis As New DataTable
Public Function GetOrt(ByVal plz As String) As String
If orte.Rows.Count = 0 Then
Dim db As New clsDB
db.Get_Tabledata("Orte")
orte = db.dsDaten.Tables(0).Copy
db.Dispose()
End If
Dim ort As String = ""
For Each r As DataRow In orte.Rows
If r("plz").ToString = plz Then
ort = r("ort")
Exit For
End If
Next
Return ort
End Function
Public Function Get_Ort_Kantton(ByRef plz As String, ByRef ort As TextBox, ByRef kanton As ComboBox)
Try
Dim db As New clsDB
db.Get_Tabledata("Ortsverzeichnis", "where plz=" + plz.ToString, "", "", False)
Ortsverzeichnis = db.dsDaten.Tables(0).Copy
If Ortsverzeichnis.Rows.Count > 0 Then
ort.Text = Ortsverzeichnis.Rows(0).Item("Ort")
kanton.Text = Ortsverzeichnis.Rows(0).Item("KT")
End If
Catch
End Try
End Function
End Module