46 lines
1.6 KiB
VB.net
46 lines
1.6 KiB
VB.net
Public Class frmAdressChange
|
|
Private Sub btnsave_Click(sender As Object, e As EventArgs) Handles btnsave.Click
|
|
Dim upd = String.Format("UPDATE TBKOMMCOLLI_SENDUNGEN SET NAME1 = '{0}', NAME2 = '{1}', STRASSE = '{2}', PLZ = '{3}', ORT = '{4}' WHERE GUID = {5}",
|
|
txtName1.Text, txtName2.Text, txtStrasse.Text, txtPLZ.Text, txtOrt.Text, CURRENT_SENDUNG)
|
|
If ClassDatabase.Execute_non_Query(upd) = True Then
|
|
Me.Close()
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub frmAdressChange_Load(sender As Object, e As EventArgs) Handles Me.Load
|
|
Dim sel = "select * from TBKOMMCOLLI_SENDUNGEN WHERE GUID = " & CURRENT_SENDUNG
|
|
Dim DT As DataTable = ClassDatabase.Return_Datatable(sel)
|
|
If Not IsNothing(DT) Then
|
|
If DT.Rows.Count = 1 Then
|
|
Try
|
|
txtName1.Text = DT.Rows(0).Item("NAME1")
|
|
Catch ex As Exception
|
|
|
|
End Try
|
|
Try
|
|
txtName2.Text = DT.Rows(0).Item("NAME2")
|
|
Catch ex As Exception
|
|
|
|
End Try
|
|
Try
|
|
txtStrasse.Text = DT.Rows(0).Item("STRASSE")
|
|
Catch ex As Exception
|
|
|
|
End Try
|
|
Try
|
|
txtPLZ.Text = DT.Rows(0).Item("PLZ")
|
|
Catch ex As Exception
|
|
|
|
End Try
|
|
Try
|
|
txtOrt.Text = DT.Rows(0).Item("ORT")
|
|
Catch ex As Exception
|
|
|
|
End Try
|
|
|
|
|
|
|
|
End If
|
|
End If
|
|
End Sub
|
|
End Class |