47 lines
1.6 KiB
VB.net
47 lines
1.6 KiB
VB.net
Imports DigitalData.GUIs.Common.Base
|
|
|
|
Public Class frmAdmin_User
|
|
Implements IAdminForm
|
|
|
|
Public Property PrimaryKey As Integer Implements IAdminForm.PrimaryKey
|
|
|
|
Public Property HasChanges As Boolean Implements IAdminForm.HasChanges
|
|
|
|
Public Property IsInsert As Boolean Implements IAdminForm.IsInsert
|
|
Public Property ErrorHandler As BaseErrorHandler
|
|
|
|
Public Sub New(pPrimaryKey As Integer, Optional pIsInsert As Boolean = False)
|
|
' Dieser Aufruf ist für den Designer erforderlich.
|
|
InitializeComponent()
|
|
|
|
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
|
PrimaryKey = pPrimaryKey
|
|
IsInsert = pIsInsert
|
|
ErrorHandler = New BaseErrorHandler(My.LogConfig, My.LogConfig.GetLogger, Me)
|
|
End Sub
|
|
|
|
Private Sub frmAdmin_User_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
|
Try
|
|
TBDD_USERTableAdapter.Connection.ConnectionString = My.DatabaseECM.CurrentSQLConnectionString
|
|
|
|
If IsInsert Then
|
|
TBDD_USERBindingSource.AddNew()
|
|
Else
|
|
TBDD_USERTableAdapter.Fill(DSDD_Stammdaten.TBDD_USER, PrimaryKey)
|
|
|
|
End If
|
|
Catch ex As System.Exception
|
|
MessageBox.Show(ex.Message)
|
|
End Try
|
|
End Sub
|
|
|
|
Public Function DeleteData() As Boolean Implements IAdminForm.DeleteData
|
|
Try
|
|
TBDD_USERTableAdapter.Delete(PrimaryKey)
|
|
Return True
|
|
Catch ex As Exception
|
|
ErrorHandler.ShowErrorMessage(ex, "DeleteData")
|
|
Return False
|
|
End Try
|
|
End Function
|
|
End Class |