Speichern und Laden: deskriptiver Index, Checkbox Zusatzoptoinen - frmNIVerknuepfungen
This commit is contained in:
parent
1bfbfe0c54
commit
359700e683
@ -22,7 +22,8 @@ Public Class frmNIVerknuepfungen
|
|||||||
Private _flagIgnoreVisibilityChanged As Boolean = False
|
Private _flagIgnoreVisibilityChanged As Boolean = False
|
||||||
Private _flagIgnoreCheckedChanged As Boolean = False
|
Private _flagIgnoreCheckedChanged As Boolean = False
|
||||||
Private _formloaded As Boolean = False
|
Private _formloaded As Boolean = False
|
||||||
Private selectedIndex_Type As String
|
Private _selectedIndex_Type As String
|
||||||
|
Private _isLoading As Boolean = False
|
||||||
|
|
||||||
Public Shared vSQL As String
|
Public Shared vSQL As String
|
||||||
Public Shared vstartwert As String
|
Public Shared vstartwert As String
|
||||||
@ -168,6 +169,7 @@ Public Class frmNIVerknuepfungen
|
|||||||
''' <param name="profilname">Name des zu ladenden Profils</param>
|
''' <param name="profilname">Name des zu ladenden Profils</param>
|
||||||
''' <remarks></remarks>
|
''' <remarks></remarks>
|
||||||
Private Sub LoadSelectedProfile(ByVal profilname As String)
|
Private Sub LoadSelectedProfile(ByVal profilname As String)
|
||||||
|
Me._isLoading = True
|
||||||
Try
|
Try
|
||||||
' setzt erst einmal alles zurück
|
' setzt erst einmal alles zurück
|
||||||
Me.tabctrlbottom.Visible = True
|
Me.tabctrlbottom.Visible = True
|
||||||
@ -221,7 +223,7 @@ Public Class frmNIVerknuepfungen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'Überprüfungsselect
|
'Überprüfungsselect
|
||||||
Me.txtCheckIndexSQL.Text = Me._selectedProfil.checkIndexsql
|
Me.txtCheckIndexSQL.Text = ""
|
||||||
'Move and Rename aktiv?
|
'Move and Rename aktiv?
|
||||||
If Me._selectedProfil.SQL_Anweisung IsNot Nothing Then
|
If Me._selectedProfil.SQL_Anweisung IsNot Nothing Then
|
||||||
If Me._selectedProfil.SQL_Anweisung <> "" Then
|
If Me._selectedProfil.SQL_Anweisung <> "" Then
|
||||||
@ -475,6 +477,7 @@ Public Class frmNIVerknuepfungen
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler beim Laden des Profils")
|
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler beim Laden des Profils")
|
||||||
End Try
|
End Try
|
||||||
|
Me._isLoading = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
@ -2005,9 +2008,9 @@ Public Class frmNIVerknuepfungen
|
|||||||
If Me.lvwVerknuepfungen.SelectedItems.Count > 0 Then
|
If Me.lvwVerknuepfungen.SelectedItems.Count > 0 Then
|
||||||
If Me._selectedProfil._links.selectedLink IsNot Nothing Then
|
If Me._selectedProfil._links.selectedLink IsNot Nothing Then
|
||||||
'Radiobuttons Vektor InsertState Überprüfen
|
'Radiobuttons Vektor InsertState Überprüfen
|
||||||
selectedIndex_Type = _windreamNI.GetIndex_Type(Me.lvwVerknuepfungen.SelectedItems(0).SubItems(0).Text)
|
_selectedIndex_Type = _windreamNI.GetIndex_Type(Me.lvwVerknuepfungen.SelectedItems(0).SubItems(0).Text)
|
||||||
visinvisible_Vektor_ins_State()
|
visinvisible_Vektor_ins_State()
|
||||||
If selectedIndex_Type.StartsWith("Vektor") Then
|
If _selectedIndex_Type.StartsWith("Vektor") Then
|
||||||
Me.Changeinaction = True
|
Me.Changeinaction = True
|
||||||
Select Case Me._selectedProfil._links.selectedLink.vktins_state
|
Select Case Me._selectedProfil._links.selectedLink.vktins_state
|
||||||
Case 1
|
Case 1
|
||||||
@ -2316,6 +2319,7 @@ Public Class frmNIVerknuepfungen
|
|||||||
|
|
||||||
Select Case Me.DialogResult
|
Select Case Me.DialogResult
|
||||||
Case DialogResult.OK
|
Case DialogResult.OK
|
||||||
|
SaveCheckStatusFinished()
|
||||||
If Not Me._selectedProfil.IsSaved Then SaveProfile()
|
If Not Me._selectedProfil.IsSaved Then SaveProfile()
|
||||||
If Not Me._selectedProfil._links.IsLinksSaved Then SaveLinks()
|
If Not Me._selectedProfil._links.IsLinksSaved Then SaveLinks()
|
||||||
Case DialogResult.Cancel
|
Case DialogResult.Cancel
|
||||||
@ -2327,6 +2331,8 @@ Public Class frmNIVerknuepfungen
|
|||||||
Dim msgResult As MsgBoxResult = MsgBox("Möchten Sie die Änderungen speichern?", MsgBoxStyle.YesNoCancel, "Änderungen übernehmen?")
|
Dim msgResult As MsgBoxResult = MsgBox("Möchten Sie die Änderungen speichern?", MsgBoxStyle.YesNoCancel, "Änderungen übernehmen?")
|
||||||
If msgResult = MsgBoxResult.Yes Then
|
If msgResult = MsgBoxResult.Yes Then
|
||||||
|
|
||||||
|
SaveCheckStatusFinished()
|
||||||
|
|
||||||
If Not Me._selectedProfil.IsSaved Then
|
If Not Me._selectedProfil.IsSaved Then
|
||||||
SaveProfile()
|
SaveProfile()
|
||||||
End If
|
End If
|
||||||
@ -2366,7 +2372,6 @@ Public Class frmNIVerknuepfungen
|
|||||||
Me.SplitContainer1.Visible = False
|
Me.SplitContainer1.Visible = False
|
||||||
Me.pnlfulltext.Visible = False
|
Me.pnlfulltext.Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub btnEindIndex_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEindIndex.Click
|
Private Sub btnEindIndex_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEindIndex.Click
|
||||||
Dim text As String = Me.txteindeutigerIndex.Text
|
Dim text As String = Me.txteindeutigerIndex.Text
|
||||||
@ -2380,34 +2385,51 @@ Public Class frmNIVerknuepfungen
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chbxStatusfertig.CheckedChanged
|
Private Sub SaveCheckStatusFinished()
|
||||||
If Me.chbxStatusfertig.Checked Then
|
My.Settings.vNIStatusFinished = chbxStatusfertig.Checked
|
||||||
Me.cmbIndex_Statusfertig.Enabled = True
|
My.Settings.Save()
|
||||||
My.Settings.vNIStatusFinished = chbxStatusfertig.Checked
|
End Sub
|
||||||
My.Settings.Save()
|
|
||||||
Try
|
|
||||||
Me.cmbIndex_Statusfertig.Items.Clear()
|
|
||||||
Dim indexe = _windream.GetIndicesByObjecttype(Me._selectedProfil.Dokumenttyp.aName, True, "NI")
|
|
||||||
If indexe IsNot Nothing Then
|
|
||||||
For Each index As String In indexe
|
|
||||||
Me.cmbIndex_Statusfertig.Items.Add(index)
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
If Not IsNothing(Me._selectedProfil.finalerIndex) Then
|
|
||||||
cmbIndex_Statusfertig.SelectedIndex = cmbIndex_Statusfertig.FindStringExact(Me._selectedProfil.finalerIndex)
|
|
||||||
End If
|
|
||||||
|
|
||||||
Catch ex As Exception
|
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chbxStatusfertig.CheckedChanged
|
||||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler beim Laden der windream-Indexe in die Auswahlliste 'cmbIndex_Statusfertig'")
|
If _isLoading = False Then
|
||||||
End Try
|
|
||||||
Else
|
If chbxStatusfertig.Checked Then
|
||||||
Me.cmbIndex_Statusfertig.Enabled = False
|
Me.cmbIndex_Statusfertig.Enabled = True
|
||||||
My.Settings.vNIStatusFinished = chbxStatusfertig.Checked
|
'My.Settings.vNIStatusFinished = chbxStatusfertig.Checked
|
||||||
My.Settings.Save()
|
'My.Settings.Save()
|
||||||
If Me._selectedProfil IsNot Nothing Then
|
'Me._selectedProfil.setChanged()
|
||||||
Me._selectedProfil.finalerIndex = ""
|
'Me.btnSaveAll.Enabled = True
|
||||||
Me._selectedProfil.setChanged()
|
Try
|
||||||
|
Me.cmbIndex_Statusfertig.Items.Clear()
|
||||||
|
Dim indexe = _windream.GetIndicesByObjecttype(Me._selectedProfil.Dokumenttyp.aName, True, "NI")
|
||||||
|
If indexe IsNot Nothing Then
|
||||||
|
For Each index As String In indexe
|
||||||
|
Me.cmbIndex_Statusfertig.Items.Add(index)
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
If Not IsNothing(Me._selectedProfil.finalerIndex) Then
|
||||||
|
cmbIndex_Statusfertig.SelectedIndex = cmbIndex_Statusfertig.FindStringExact(Me._selectedProfil.finalerIndex)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Me._selectedProfil.setChanged()
|
||||||
|
Me.btnSaveAll.Enabled = True
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler beim Laden der windream-Indexe in die Auswahlliste 'cmbIndex_Statusfertig'")
|
||||||
|
End Try
|
||||||
|
Else
|
||||||
|
Me.cmbIndex_Statusfertig.Enabled = False
|
||||||
|
'My.Settings.vNIStatusFinished = chbxStatusfertig.Checked
|
||||||
|
'My.Settings.Save()
|
||||||
|
'Me._selectedProfil.setChanged()
|
||||||
|
'Me.btnSaveAll.Enabled = True
|
||||||
|
If Me._selectedProfil IsNot Nothing Then
|
||||||
|
Me._selectedProfil.finalerIndex = ""
|
||||||
|
Me._selectedProfil.setChanged()
|
||||||
|
Me.btnSaveAll.Enabled = True
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
Else
|
||||||
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@ -2695,8 +2717,8 @@ Public Class frmNIVerknuepfungen
|
|||||||
'End Sub
|
'End Sub
|
||||||
|
|
||||||
Private Sub SaveProfile()
|
Private Sub SaveProfile()
|
||||||
If Me.txtCheckIndexSQL.Text <> "" Then
|
'If Me.txtCheckIndexSQL.Text <> "" Then
|
||||||
Try
|
Try
|
||||||
' die Änderungen speichern
|
' die Änderungen speichern
|
||||||
If Me._selectedProfil.Save(True, "profile") = True Then
|
If Me._selectedProfil.Save(True, "profile") = True Then
|
||||||
Me._selectedProfil.setSaved()
|
Me._selectedProfil.setSaved()
|
||||||
@ -2707,7 +2729,7 @@ Public Class frmNIVerknuepfungen
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox("Fehler beim Speichern des SQL-Befehles." & vbNewLine & vbNewLine & "Fehlernachricht:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler beim Speichern eines SQL-Befehls.")
|
MsgBox("Fehler beim Speichern des SQL-Befehles." & vbNewLine & vbNewLine & "Fehlernachricht:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Fehler beim Speichern eines SQL-Befehls.")
|
||||||
End Try
|
End Try
|
||||||
End If
|
'End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub txtCheckIndexSQL_TextChanged(sender As System.Object, e As System.EventArgs) Handles txtCheckIndexSQL.TextChanged
|
Private Sub txtCheckIndexSQL_TextChanged(sender As System.Object, e As System.EventArgs) Handles txtCheckIndexSQL.TextChanged
|
||||||
@ -2723,6 +2745,40 @@ Public Class frmNIVerknuepfungen
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
'Try
|
||||||
|
' ' wenn im ListView eine Zeile selektiert wurde
|
||||||
|
' If Me.lvwVerknuepfungen.SelectedItems.Count > 0 Then
|
||||||
|
' ' Überprüfen ob eingegebener Wert gepeichert werden muß?
|
||||||
|
' Dim SQL_ORIGIN As String = Me._selectedProfil._links.getLinkByValues(Me.lvwVerknuepfungen.SelectedItems(0).SubItems(0).Text, Me.lvwVerknuepfungen.SelectedItems(0).SubItems(1).Text,
|
||||||
|
' Me.lvwVerknuepfungen.SelectedItems(0).SubItems(2).Text).getSelectAnweisung().ToString
|
||||||
|
' If SQL_ORIGIN <> Me.txtSelectAnweisung.Text Then
|
||||||
|
' With btnSaveAll
|
||||||
|
' .Enabled = True
|
||||||
|
' .ForeColor = Drawing.Color.Black
|
||||||
|
' End With
|
||||||
|
' End If
|
||||||
|
' ' die Informationen der selektierten Verknüpfung auslesen
|
||||||
|
' Me._selectedProfil._links.getLinkByValues(Me.lvwVerknuepfungen.SelectedItems(0).SubItems(0).Text, Me.lvwVerknuepfungen.SelectedItems(0).SubItems(1).Text,
|
||||||
|
' Me.lvwVerknuepfungen.SelectedItems(0).SubItems(2).Text).setSelectAnweisung(Me.txtSelectAnweisung.Text)
|
||||||
|
' Me.btnSaveAll.Enabled = True
|
||||||
|
' Me._selectedProfil.setChanged()
|
||||||
|
' Me._selectedProfil._links.setLinksChanged()
|
||||||
|
' 'Jetzt den Startwert bestimmen
|
||||||
|
' 'MsgBox("[%" & Me.lvwVerbunden.SelectedItems(0).SubItems(0).Text & "]")
|
||||||
|
' If Me.txteindeutigerIndex.Text <> "" Then
|
||||||
|
' If Me.txtSelectAnweisung.Text.Contains(Me.txteindeutigerIndex.Text) Then
|
||||||
|
' Me.lblSQLTest.Text = "Testwert für eind. Index: " & "[%" & Me.txteindeutigerIndex.Text & "]"
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' End If
|
||||||
|
|
||||||
|
'Catch ex As Exception
|
||||||
|
' MsgBox("Die Verknüpfung konnte nicht angelegt werden." & vbNewLine & vbNewLine & ex.Message, MsgBoxStyle.Exclamation, "Fehler beim Anlegen einer Verknüpfung")
|
||||||
|
'End Try
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub txteindeutigerIndex_TextChanged(sender As System.Object, e As System.EventArgs) Handles txteindeutigerIndex.TextChanged
|
Private Sub txteindeutigerIndex_TextChanged(sender As System.Object, e As System.EventArgs) Handles txteindeutigerIndex.TextChanged
|
||||||
@ -3503,13 +3559,13 @@ Public Class frmNIVerknuepfungen
|
|||||||
Me.chkboxWhitespace.Checked = False
|
Me.chkboxWhitespace.Checked = False
|
||||||
Me.txtregex.Text = ""
|
Me.txtregex.Text = ""
|
||||||
End Select
|
End Select
|
||||||
selectedIndex_Type = _windreamNI.GetIndex_Type(lbxWMIndex.SelectedItem)
|
_selectedIndex_Type = _windreamNI.GetIndex_Type(lbxWMIndex.SelectedItem)
|
||||||
If selectedIndex_Type Is Nothing = False Then
|
If _selectedIndex_Type Is Nothing = False Then
|
||||||
visinvisible_Vektor_ins_State()
|
visinvisible_Vektor_ins_State()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Sub visinvisible_Vektor_ins_State()
|
Sub visinvisible_Vektor_ins_State()
|
||||||
If selectedIndex_Type.StartsWith("Vektor") Then
|
If _selectedIndex_Type.StartsWith("Vektor") Then
|
||||||
Me.rbvkt_add.Visible = True
|
Me.rbvkt_add.Visible = True
|
||||||
Me.rbvkt_overwrite.Visible = True
|
Me.rbvkt_overwrite.Visible = True
|
||||||
Me.chkvkt_Dublette.Visible = True
|
Me.chkvkt_Dublette.Visible = True
|
||||||
@ -3679,6 +3735,7 @@ Public Class frmNIVerknuepfungen
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub btnSaveAll_Click(sender As Object, e As EventArgs) Handles btnSaveAll.Click
|
Private Sub btnSaveAll_Click(sender As Object, e As EventArgs) Handles btnSaveAll.Click
|
||||||
|
SaveCheckStatusFinished()
|
||||||
SaveLinks()
|
SaveLinks()
|
||||||
SaveProfile()
|
SaveProfile()
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user