MS saving
This commit is contained in:
@@ -3,6 +3,7 @@ Imports System.Data.SqlClient
|
||||
Imports System.IO
|
||||
Imports DD_LIB_Standards
|
||||
Imports DevExpress.XtraGrid
|
||||
Imports DevExpress.XtraGrid.Views.Base
|
||||
Imports DevExpress.XtraGrid.Views.Grid
|
||||
|
||||
Public Class frmAdministration
|
||||
@@ -11,6 +12,7 @@ Public Class frmAdministration
|
||||
Private email As New ClassEmail
|
||||
Public profile_guid As Integer = 0
|
||||
Dim formloaded As Boolean
|
||||
Dim change_BindingSource As Boolean
|
||||
Private INSERT_ACTIVE As Boolean = False
|
||||
|
||||
|
||||
@@ -252,34 +254,7 @@ Public Class frmAdministration
|
||||
DD_DMSLiteDataSet.TBPM_PROFILE.TYPEColumn.DefaultValue = 1
|
||||
End Sub
|
||||
|
||||
Private Sub TBPM_PROFILEBindingSource_PositionChanged(sender As System.Object, e As System.EventArgs) Handles TBPM_PROFILEBindingSource.PositionChanged
|
||||
If formloaded = False Then
|
||||
Exit Sub
|
||||
End If
|
||||
If UNSAVED_CHANGES_PROFILE = True Or UNSAVED_CHANGES_FI = True Then
|
||||
Dim oQuestion As String
|
||||
If USER_LANGUAGE <> "de-DE" Then
|
||||
oQuestion = "You have unsaved changes! Do You want to save them now?"
|
||||
Else
|
||||
oQuestion = "Achtung es gibt noch ungespeicherte Änderungen! Wollen Sie diese nun speichern?"
|
||||
End If
|
||||
Dim result As MsgBoxResult = MsgBox(oQuestion, MsgBoxStyle.YesNo, ADDITIONAL_TITLE)
|
||||
'wenn Speichern ja
|
||||
If result = MsgBoxResult.Yes Then
|
||||
If UNSAVED_CHANGES_PROFILE = True Then
|
||||
Save_Profile()
|
||||
End If
|
||||
If UNSAVED_CHANGES_FI = True Then
|
||||
Save_FI()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
tsbStaticInfo.Caption = ""
|
||||
Indexe_eintragen()
|
||||
If tabctrl_Profilkonfig.SelectedIndex = 1 And TBPM_PROFILEBindingSource.Position <> -1 Then
|
||||
Refresh_Final_indexe()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -688,7 +663,7 @@ Public Class frmAdministration
|
||||
|
||||
|
||||
|
||||
Private Sub cmbObjekttypen_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cmbObjekttypen.SelectedIndexChanged
|
||||
Private Sub cmbObjekttypen_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
If formloaded = False Then
|
||||
Exit Sub
|
||||
End If
|
||||
@@ -697,23 +672,6 @@ Public Class frmAdministration
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Button3_Click_1(sender As Object, e As EventArgs)
|
||||
Dim indexe = WINDREAM.GetIndicesByObjecttype(cmbObjekttypen.Text)
|
||||
If indexe IsNot Nothing Then
|
||||
For Each index As String In indexe
|
||||
MsgBox(index & vbNewLine & WINDREAM.GetTypeOfIndex(index))
|
||||
Select Case WINDREAM.GetTypeOfIndex(index)
|
||||
Case 4107 'Vektor Zahl
|
||||
|
||||
Case 4097
|
||||
|
||||
Case Else
|
||||
|
||||
End Select
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'Private Sub TabControlFinalIndices_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
' If TabControlFinalIndices.SelectedIndex = 1 Then
|
||||
' Me.cmbIndexe2.Enabled = False
|
||||
@@ -1169,7 +1127,7 @@ Public Class frmAdministration
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonItem18_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem18.ItemClick
|
||||
Save_FI
|
||||
Save_FI()
|
||||
End Sub
|
||||
Private Sub Save_FI()
|
||||
Try
|
||||
@@ -1329,21 +1287,103 @@ Public Class frmAdministration
|
||||
LOGGER.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub TBPM_PROFILEBindingSource_CurrentItemChanged(sender As Object, e As EventArgs) Handles TBPM_PROFILEBindingSource.CurrentItemChanged
|
||||
Check_Changes()
|
||||
change_BindingSource = True
|
||||
CHECK_QUESTION_CHANGES()
|
||||
End Sub
|
||||
Private Sub Check_Changes()
|
||||
Private Sub TBPM_PROFILEBindingSource_PositionChanged(sender As System.Object, e As System.EventArgs) Handles TBPM_PROFILEBindingSource.PositionChanged
|
||||
If formloaded = False Then
|
||||
Exit Sub
|
||||
End If
|
||||
If UNSAVED_CHANGES_PROFILE = True Then
|
||||
Check_Changes()
|
||||
change_BindingSource = False
|
||||
|
||||
tsbStaticInfo.Caption = ""
|
||||
Indexe_eintragen()
|
||||
If tabctrl_Profilkonfig.SelectedIndex = 1 And TBPM_PROFILEBindingSource.Position <> -1 Then
|
||||
Refresh_Final_indexe()
|
||||
End If
|
||||
End Sub
|
||||
Sub CHECK_QUESTION_CHANGES()
|
||||
If formloaded = False Then
|
||||
Exit Sub
|
||||
End If
|
||||
If UNSAVED_CHANGES_PROFILE = True Or UNSAVED_CHANGES_FI = True Then
|
||||
Dim oQuestion As String
|
||||
If USER_LANGUAGE <> "de-DE" Then
|
||||
oQuestion = "You have unsaved changes! Do You want to save them now?"
|
||||
Else
|
||||
oQuestion = "Achtung es gibt noch ungespeicherte Änderungen! Wollen Sie diese nun speichern?"
|
||||
End If
|
||||
Dim result As MsgBoxResult = MsgBox(oQuestion, MsgBoxStyle.YesNo, ADDITIONAL_TITLE)
|
||||
'wenn Speichern ja
|
||||
If result = MsgBoxResult.Yes Then
|
||||
If UNSAVED_CHANGES_PROFILE = True Then
|
||||
Save_Profile()
|
||||
End If
|
||||
If UNSAVED_CHANGES_FI = True Then
|
||||
Save_FI()
|
||||
End If
|
||||
Else
|
||||
UNSAVED_CHANGES_PROFILE = False
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub Check_Changes()
|
||||
If formloaded = False Or UNSAVED_CHANGES_PROFILE = True Or change_BindingSource = True Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
TBPM_PROFILEBindingSource.EndEdit()
|
||||
If Not IsNothing(DD_DMSLiteDataSet.TBPM_PROFILE.GetChanges) Then
|
||||
UNSAVED_CHANGES_PROFILE = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub NAMETextBox_TextChanged(sender As Object, e As EventArgs) Handles WD_SEARCHTextBox.TextChanged, TITLETextBox.TextChanged, NAMETextBox.TextChanged,
|
||||
FINAL_TEXTTextBox.TextChanged, DESCRIPTIONTextBox.TextChanged, WORK_HISTORY_ENTRYTextBox.TextChanged, MOVE2FOLDERTextBox.TextChanged
|
||||
If formloaded = False Or UNSAVED_CHANGES_PROFILE = True Or change_BindingSource = True Then
|
||||
Exit Sub
|
||||
End If
|
||||
'UNSAVED_CHANGES_PROFILE = True
|
||||
End Sub
|
||||
|
||||
Private Sub ACTIVECheckBox_CheckStateChanged(sender As Object, e As EventArgs) Handles SORT_BY_LATESTCheckBox.CheckStateChanged, FINAL_PROFILECheckBox.CheckStateChanged, ACTIVECheckBox.CheckStateChanged
|
||||
If formloaded = False Or UNSAVED_CHANGES_PROFILE = True Or change_BindingSource = True Then
|
||||
Exit Sub
|
||||
End If
|
||||
'UNSAVED_CHANGES_PROFILE = True
|
||||
End Sub
|
||||
|
||||
Private Sub cmbObjekttypen_SelectedIndexChanged_1(sender As Object, e As EventArgs) Handles PM_VEKTOR_INDEXComboBox.SelectedIndexChanged, DISPLAY_MODEComboBox.SelectedIndexChanged, cmbObjekttypen.SelectedIndexChanged, cmbLOGIndex.SelectedIndexChanged
|
||||
If formloaded = False Or UNSAVED_CHANGES_PROFILE = True Or change_BindingSource = True Then
|
||||
Exit Sub
|
||||
End If
|
||||
'UNSAVED_CHANGES_PROFILE = True
|
||||
End Sub
|
||||
|
||||
Private Sub GridView1_FocusedRowChanged(sender As Object, e As Views.Base.FocusedRowChangedEventArgs) Handles GridView1.FocusedRowChanged
|
||||
If formloaded = False Or UNSAVED_CHANGES_PROFILE = True Or change_BindingSource = True Then
|
||||
Exit Sub
|
||||
|
||||
End If
|
||||
'change_BindingSource = True
|
||||
End Sub
|
||||
|
||||
Private Sub GridView1_ValidateRow(sender As Object, e As ValidateRowEventArgs) Handles GridView1.ValidateRow
|
||||
If formloaded = False Or UNSAVED_CHANGES_PROFILE = True Or change_BindingSource = True Then
|
||||
Exit Sub
|
||||
|
||||
End If
|
||||
change_BindingSource = True
|
||||
End Sub
|
||||
|
||||
Private Sub TBPM_PROFILEBindingSource_CurrentChanged(sender As Object, e As EventArgs) Handles TBPM_PROFILEBindingSource.CurrentChanged
|
||||
If formloaded = False Or UNSAVED_CHANGES_PROFILE = True Or change_BindingSource = True Then
|
||||
Exit Sub
|
||||
|
||||
End If
|
||||
change_BindingSource = True
|
||||
Check_Changes()
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user