This commit is contained in:
2022-05-17 17:08:14 +02:00
parent 11c7b4e5e9
commit 07b9bccd72
27 changed files with 2209 additions and 1241 deletions

View File

@@ -396,7 +396,7 @@ Partial Class frmAdmin_Doctype
Me.Name = "frmAdmin_Doctype"
Me.Ribbon = Me.RibbonControl1
Me.StatusBar = Me.RibbonStatusBar1
Me.Text = "Dokumentarten Definition"
Me.Text = "Dokumentarten Konfiguration"
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.pnlAddDoctype, System.ComponentModel.ISupportInitialize).EndInit()
Me.pnlAddDoctype.ResumeLayout(False)

View File

@@ -53,7 +53,7 @@ Public Class frmAdmin_Doctype
Private Sub BarButtonItemDTsave_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItemDTsave.ItemClick
If NewUpdateDoctype(TextEditDoctypeSys.EditValue, TextEditDoctypeTranslate.EditValue, ComboBoxEditLanguage.EditValue) = True Then
ShowStatus("Sys Doctype successfully added/updated")
ShowStatus("Sys Doctype successfully added/updated", Color.DodgerBlue)
End If
End Sub
Private Function NewUpdateDoctype(DoctypeSys As String, Term As String, Language As String) As Boolean
@@ -68,8 +68,9 @@ Public Class frmAdmin_Doctype
End Try
End Function
Private Sub ShowStatus(Message As String)
labelStatus.Caption = Message
Private Sub ShowStatus(Message As String, ocolor As Color)
labelStatus.Caption = $"{Message} - {Now.ToString}"
labelStatus.ItemAppearance.Normal.BackColor = ocolor
labelStatus.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
End Sub
@@ -89,7 +90,7 @@ Public Class frmAdmin_Doctype
Private Sub BarButtonItemSaveChange_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItemSaveChange.ItemClick
If NewUpdateDoctype(SelSystitle, SelChangedTerm, SelLanguage) = True Then
ShowStatus("Doctype Translation successfully added/updated")
ShowStatus("Doctype Translation successfully added/updated", Color.DodgerBlue)
End If
End Sub
End Class

View File

@@ -36,7 +36,7 @@
Private Sub BarButtonItem2_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem2.ItemClick
ResetMessages()
If SaveData() And HasChanges Then
ShowStatus("Attribute saved!")
FillAttribute()
End If
End Sub
@@ -45,8 +45,9 @@
labelStatus.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
End Sub
Private Sub ShowStatus(Message As String)
labelStatus.Caption = Message
Private Sub ShowStatus(Message As String, ocolor As Color)
labelStatus.Caption = $"{Message} - {Now.ToString}"
labelStatus.ItemAppearance.Normal.BackColor = ocolor
labelStatus.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
End Sub
@@ -81,7 +82,10 @@
$"WHERE (GUID = {TextEdit1.Text})"
If My.DatabaseIDB.ExecuteNonQuery(oUpdate) = False Then
ShowStatus($"Error saving Attribute {TextEdit2.Text} - Check Your log", Color.Red)
Return False
Else
ShowStatus($"Attribute {TextEdit2.Text} saved successfully", Color.DodgerBlue)
End If
Else
Dim oInsert As String = $"INSERT INTO TBIDB_ATTRIBUTE " &
@@ -89,17 +93,20 @@
$"VALUES ('{TextEdit2.Text}',{ComboBoxEdit1.EditValue},{SpinEdit1.Value},'{CheckEdit2.Checked}','{My.Application.User.UserName}', '{TextEdit3.Text}','{CheckEditMulticontext.Checked}')"
If My.DatabaseIDB.ExecuteNonQuery(oInsert) = True Then
ShowStatus($"Attribute {TextEdit2.Text} added successfully", Color.DodgerBlue)
IsInsert = False
Else
ShowStatus($"Error Insertung Attribute {TextEdit2.Text} - Check Your log", Color.Red)
Return False
End If
End If
' VWIDB_BE_ATTRIBUTETableAdapter.Update(DSIDB_Stammdaten.VWIDB_BE_ATTRIBUTE)
End If
FillAttribute()
Return True
Catch ex As Exception
ShowErrorMessage(ex)
ShowStatus($"Unexpeced error saving attribute {TextEdit2.Text} - {ex.Message}", Color.Red)
Return False
End Try
End Function