Monorepo/GUIs.ZooFlow/Administration/frmAdmin_SourceSQL.vb
2021-04-01 12:07:40 +02:00

49 lines
1.7 KiB
VB.net

Public Class frmAdmin_SourceSQL
Implements frmAdmin_Interface
Public Property PrimaryKey As Integer Implements frmAdmin_Interface.PrimaryKey
Public Property HasChanges As Boolean Implements frmAdmin_Interface.HasChanges
Public Property IsInsert As Boolean Implements frmAdmin_Interface.IsInsert
Public Sub New(PrimaryKey As Integer)
' Dieser Aufruf ist für den Designer erforderlich.
InitializeComponent()
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
Me.PrimaryKey = PrimaryKey
End Sub
Public Function SaveData() As Boolean Implements frmAdmin_Interface.SaveData
Try
TBZF_ADMIN_SOURCE_SQLBindingSource.EndEdit()
If DSIDB_Stammdaten.TBIDB_BUSINESS_ENTITY.GetChanges() IsNot Nothing Then
HasChanges = True
If IsInsert Then
txtAddedWho.EditValue = My.Application.User.UserName
Else
txtChangedWho.EditValue = My.Application.User.UserName
End If
TBZF_ADMIN_SOURCE_SQLBindingSource.EndEdit()
TBZF_ADMIN_SOURCE_SQLTableAdapter.Update(DSIDB_Stammdaten.TBZF_ADMIN_SOURCE_SQL)
End If
Return True
Catch ex As Exception
ShowError(ex)
Return False
End Try
End Function
Private Sub frmAdmin_SourceSQL_Load(sender As Object, e As EventArgs) Handles Me.Load
Try
TBZF_ADMIN_SOURCE_SQLTableAdapter.Fill(DSIDB_Stammdaten.TBZF_ADMIN_SOURCE_SQL, PrimaryKey)
Catch ex As Exception
ShowError(ex)
End Try
End Sub
End Class