ZooFlow: Admin
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
Public Class frmAdmin_CWProfile
|
||||
Inherits frmAdmin_Base
|
||||
Implements frmAdmin_Interface
|
||||
|
||||
Public Property PrimaryKey As Integer Implements frmAdmin_Interface.PrimaryKey
|
||||
@@ -12,27 +11,70 @@ Public Class frmAdmin_CWProfile
|
||||
|
||||
Private Property Logger As Logger Implements frmAdmin_Interface.Logger
|
||||
|
||||
Private Sub frmAdmin_CWProfile_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
Public Sub New(PrimaryKey As Integer)
|
||||
' Dieser Aufruf ist für den Designer erforderlich.
|
||||
InitializeComponent()
|
||||
|
||||
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
||||
Logger = My.LogConfig.GetLogger()
|
||||
Me.PrimaryKey = PrimaryKey
|
||||
Me.IsInsert = IsInsert
|
||||
End Sub
|
||||
|
||||
Private Sub frmAdmin_CWProfile_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
Try
|
||||
TBCW_PROFILESTableAdapter.Fill(DBCW_Stammdaten.TBCW_PROFILES, PrimaryKey)
|
||||
Catch ex As Exception
|
||||
ShowError(ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub ResetMessages()
|
||||
labelStatus.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||
End Sub
|
||||
|
||||
Private Sub ShowStatus(Message As String)
|
||||
labelStatus.Caption = Message
|
||||
labelStatus.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
||||
End Sub
|
||||
|
||||
Public Function SaveData() As Boolean Implements frmAdmin_Interface.SaveData
|
||||
Try
|
||||
TBCW_PROFILESBindingSource.EndEdit()
|
||||
|
||||
If DBCW_Stammdaten.TBCW_PROFILES.GetChanges() IsNot Nothing Then
|
||||
HasChanges = True
|
||||
|
||||
If IsInsert Then
|
||||
txtAddedWho.EditValue = My.Application.User.UserName
|
||||
Else
|
||||
txtChangedWho.EditValue = My.Application.User.UserName
|
||||
End If
|
||||
|
||||
TBCW_PROFILESBindingSource.EndEdit()
|
||||
TBCW_PROFILESTableAdapter.Update(DBCW_Stammdaten.TBCW_PROFILES)
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
ShowError(ex)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Sub TBCW_PROFILESBindingNavigatorSaveItem_Click(sender As Object, e As EventArgs) Handles TBCW_PROFILESBindingNavigatorSaveItem.Click
|
||||
Me.Validate()
|
||||
Me.TBCW_PROFILESBindingSource.EndEdit()
|
||||
Me.TableAdapterManager.UpdateAll(Me.DBCW_Stammdaten)
|
||||
Private Sub BarButtonItem1_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem1.ItemClick
|
||||
ResetMessages()
|
||||
|
||||
If SaveData() Then
|
||||
Close()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub FillToolStripButton_Click(sender As Object, e As EventArgs) Handles FillToolStripButton.Click
|
||||
Try
|
||||
Me.TBCW_PROFILESTableAdapter.Fill(Me.DBCW_Stammdaten.TBCW_PROFILES, CType(GUIDToolStripTextBox.Text, Integer))
|
||||
Catch ex As System.Exception
|
||||
System.Windows.Forms.MessageBox.Show(ex.Message)
|
||||
End Try
|
||||
Private Sub BarButtonItem2_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem2.ItemClick
|
||||
ResetMessages()
|
||||
|
||||
If SaveData() And HasChanges Then
|
||||
ShowStatus("Attribute gespeichert!")
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user