Speichern von SQL Skripten - frmNIVerknuepfungen, frmNIVerknuepfungen.Designer

This commit is contained in:
OlgunR 2025-10-02 16:43:25 +02:00
parent 6eef02e0ec
commit 6270be7cdf
2 changed files with 40 additions and 70 deletions

View File

@ -168,9 +168,9 @@ Partial Class frmNIVerknuepfungen
Me.rbvkt_overwrite = New System.Windows.Forms.RadioButton()
Me.SplitContainer1 = New System.Windows.Forms.SplitContainer()
Me.pnlFooter = New System.Windows.Forms.Panel()
Me.btnSaveAllAndClose = New System.Windows.Forms.Button()
Me.btnCancelAllAndClose = New System.Windows.Forms.Button()
Me.btnSaveAll = New System.Windows.Forms.Button()
Me.btnSaveAllAndClose = New System.Windows.Forms.Button()
Me.StatusStrip1.SuspendLayout()
Me.GroupBox1.SuspendLayout()
Me.Panel1.SuspendLayout()
@ -208,7 +208,8 @@ Partial Class frmNIVerknuepfungen
Me.txtfinalSkriptUpdate.Multiline = True
Me.txtfinalSkriptUpdate.Name = "txtfinalSkriptUpdate"
Me.txtfinalSkriptUpdate.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.txtfinalSkriptUpdate.Size = New System.Drawing.Size(963, 166)
Me.txtfinalSkriptUpdate.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
Me.txtfinalSkriptUpdate.Size = New System.Drawing.Size(868, 166)
Me.txtfinalSkriptUpdate.TabIndex = 29
'
'cmbDatenbankSpalten
@ -415,7 +416,7 @@ Partial Class frmNIVerknuepfungen
Me.GroupBox1.Controls.Add(Me.Button3)
Me.GroupBox1.Controls.Add(Me.Button1)
Me.GroupBox1.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.GroupBox1.Location = New System.Drawing.Point(975, 47)
Me.GroupBox1.Location = New System.Drawing.Point(890, 47)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(147, 83)
Me.GroupBox1.TabIndex = 50
@ -480,14 +481,12 @@ Partial Class frmNIVerknuepfungen
Me.btnWindreamIndexEinfügenSQL.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.btnWindreamIndexEinfügenSQL.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnWindreamIndexEinfügenSQL.Image = Global.ToolCollection.My.Resources.Resources.add
Me.btnWindreamIndexEinfügenSQL.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btnWindreamIndexEinfügenSQL.ImeMode = System.Windows.Forms.ImeMode.NoControl
Me.btnWindreamIndexEinfügenSQL.Location = New System.Drawing.Point(1161, 149)
Me.btnWindreamIndexEinfügenSQL.Location = New System.Drawing.Point(1194, 149)
Me.btnWindreamIndexEinfügenSQL.Name = "btnWindreamIndexEinfügenSQL"
Me.btnWindreamIndexEinfügenSQL.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.btnWindreamIndexEinfügenSQL.Size = New System.Drawing.Size(69, 21)
Me.btnWindreamIndexEinfügenSQL.Size = New System.Drawing.Size(33, 22)
Me.btnWindreamIndexEinfügenSQL.TabIndex = 47
Me.btnWindreamIndexEinfügenSQL.Text = "Add"
Me.btnWindreamIndexEinfügenSQL.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.btnWindreamIndexEinfügenSQL.UseVisualStyleBackColor = True
'
@ -565,12 +564,12 @@ Partial Class frmNIVerknuepfungen
Me.Label9.AutoSize = True
Me.Label9.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label9.ImeMode = System.Windows.Forms.ImeMode.NoControl
Me.Label9.Location = New System.Drawing.Point(977, 133)
Me.Label9.Location = New System.Drawing.Point(887, 154)
Me.Label9.Name = "Label9"
Me.Label9.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Label9.Size = New System.Drawing.Size(92, 13)
Me.Label9.Size = New System.Drawing.Size(94, 13)
Me.Label9.TabIndex = 46
Me.Label9.Text = "windream Index:"
Me.Label9.Text = "Windream Index:"
Me.Label9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
'
'gbUpdate
@ -617,7 +616,7 @@ Partial Class frmNIVerknuepfungen
Me.lblsaveSQLAnweisung.AutoSize = True
Me.lblsaveSQLAnweisung.BackColor = System.Drawing.Color.Yellow
Me.lblsaveSQLAnweisung.Font = New System.Drawing.Font("Segoe UI Semibold", 8.25!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblsaveSQLAnweisung.Location = New System.Drawing.Point(980, 173)
Me.lblsaveSQLAnweisung.Location = New System.Drawing.Point(887, 185)
Me.lblsaveSQLAnweisung.Name = "lblsaveSQLAnweisung"
Me.lblsaveSQLAnweisung.Size = New System.Drawing.Size(38, 13)
Me.lblsaveSQLAnweisung.TabIndex = 51
@ -630,10 +629,10 @@ Partial Class frmNIVerknuepfungen
Me.cmbWindreamIndexeSQL.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cmbWindreamIndexeSQL.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.cmbWindreamIndexeSQL.FormattingEnabled = True
Me.cmbWindreamIndexeSQL.Location = New System.Drawing.Point(980, 149)
Me.cmbWindreamIndexeSQL.Location = New System.Drawing.Point(997, 149)
Me.cmbWindreamIndexeSQL.Name = "cmbWindreamIndexeSQL"
Me.cmbWindreamIndexeSQL.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmbWindreamIndexeSQL.Size = New System.Drawing.Size(164, 21)
Me.cmbWindreamIndexeSQL.Size = New System.Drawing.Size(191, 21)
Me.cmbWindreamIndexeSQL.TabIndex = 45
'
'lblDescr_Verknüpfungen
@ -1919,9 +1918,20 @@ Partial Class frmNIVerknuepfungen
Me.pnlFooter.Size = New System.Drawing.Size(1265, 44)
Me.pnlFooter.TabIndex = 53
'
'btnSaveAllAndClose
'
Me.btnSaveAllAndClose.BackColor = System.Drawing.SystemColors.ControlLightLight
Me.btnSaveAllAndClose.DialogResult = System.Windows.Forms.DialogResult.OK
Me.btnSaveAllAndClose.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnSaveAllAndClose.Location = New System.Drawing.Point(883, 6)
Me.btnSaveAllAndClose.Name = "btnSaveAllAndClose"
Me.btnSaveAllAndClose.Size = New System.Drawing.Size(120, 30)
Me.btnSaveAllAndClose.TabIndex = 2
Me.btnSaveAllAndClose.Text = "Ok"
Me.btnSaveAllAndClose.UseVisualStyleBackColor = False
'
'btnCancelAllAndClose
'
Me.btnCancelAllAndClose.Anchor = System.Windows.Forms.AnchorStyles.Top
Me.btnCancelAllAndClose.BackColor = System.Drawing.SystemColors.ControlLightLight
Me.btnCancelAllAndClose.DialogResult = System.Windows.Forms.DialogResult.Cancel
Me.btnCancelAllAndClose.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
@ -1934,7 +1944,6 @@ Partial Class frmNIVerknuepfungen
'
'btnSaveAll
'
Me.btnSaveAll.Anchor = System.Windows.Forms.AnchorStyles.Top
Me.btnSaveAll.BackColor = System.Drawing.SystemColors.ControlLightLight
Me.btnSaveAll.Enabled = False
Me.btnSaveAll.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
@ -1945,18 +1954,6 @@ Partial Class frmNIVerknuepfungen
Me.btnSaveAll.Text = "Übernehmen"
Me.btnSaveAll.UseVisualStyleBackColor = False
'
'btnSaveAllAndClose
'
Me.btnSaveAllAndClose.BackColor = System.Drawing.SystemColors.ControlLightLight
Me.btnSaveAllAndClose.DialogResult = System.Windows.Forms.DialogResult.OK
Me.btnSaveAllAndClose.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnSaveAllAndClose.Location = New System.Drawing.Point(883, 6)
Me.btnSaveAllAndClose.Name = "btnSaveAllAndClose"
Me.btnSaveAllAndClose.Size = New System.Drawing.Size(120, 30)
Me.btnSaveAllAndClose.TabIndex = 2
Me.btnSaveAllAndClose.Text = "Ok"
Me.btnSaveAllAndClose.UseVisualStyleBackColor = False
'
'frmNIVerknuepfungen
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)

View File

@ -2186,27 +2186,27 @@ Public Class frmNIVerknuepfungen
' End Try
'End Sub
Private Sub txtUpdateAnweisung_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtfinalSkriptUpdate.LostFocus
'If Me.txtfinalSkriptUpdate.Text <> "" Then
' Try
' ' die Änderungen speichern
' If Me._selectedProfil.Save(True,"profile") = True Then ' wenn das Speichern erfolgreich war
' Me._selectedProfil.setChanged()
' Else
' MsgBox("Das Profil konnte nicht erfolgreich gespeichert werden.", MsgBoxStyle.Exclamation, "Fehler beim Speichern eines Profils")
' End If
' 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.")
' End Try
'End If
End Sub
'Private Sub txtUpdateAnweisung_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtfinalSkriptUpdate.LostFocus
' Me._selectedProfil.SQL_Anweisung = txtfinalSkriptUpdate.Text
'If Me.txtfinalSkriptUpdate.Text <> "" Then
' Try
' ' die Änderungen speichern
' If Me._selectedProfil.Save(True,"profile") = True Then ' wenn das Speichern erfolgreich war
' Me._selectedProfil.setChanged()
' Else
' MsgBox("Das Profil konnte nicht erfolgreich gespeichert werden.", MsgBoxStyle.Exclamation, "Fehler beim Speichern eines Profils")
' End If
' 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.")
' End Try
'End If
'End Sub
Private Sub txtUpdateAnweisung_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtfinalSkriptUpdate.TextChanged
If Not Me.txtfinalSkriptUpdate.Text = Me._selectedProfil.OriginalSQL_Anweisung Then
If Not Me.txtfinalSkriptUpdate.Text = String.Empty And Not Me.txtfinalSkriptUpdate.Text = Me._selectedProfil.OriginalSQL_Anweisung Then
Me._selectedProfil.SQL_Anweisung = Me.txtfinalSkriptUpdate.Text
Me._selectedProfil.setChanged()
Me._selectedProfil._links.setLinksChanged()
btnSaveAll.Enabled = True
End If
@ -3635,32 +3635,6 @@ Public Class frmNIVerknuepfungen
End If
End Sub
Private Sub SaveScript()
If Me._selectedProfil IsNot Nothing Then
If Not Me.txtfinalSkriptUpdate.Text = Me._selectedProfil.OriginalSQL_Anweisung Then
Me._selectedProfil.SQL_Anweisung = Me.txtfinalSkriptUpdate.Text
Me._selectedProfil.setChanged()
Me._selectedProfil._links.setLinksChanged()
btnSaveAll.Enabled = True
Else
Exit Sub
End If
Else
Exit Sub
End If
If Me._selectedProfil.Save(True, "profile") = True Then
' wenn das Speichern erfolgreich war
Me.lblsaveSQLAnweisung.Text = "Data saved - " & Now.ToString
Me._selectedProfil.setSaved()
Me.btnSaveAll.Visible = False
Else
Me.lblsaveSQLAnweisung.Text = ""
End If
End Sub
Private Sub rbFunctionsSc_CheckedChanged(sender As Object, e As EventArgs) Handles rbFunctionsSc.CheckedChanged
If Not _flagIgnoreCheckedChanged Then
If Me._selectedProfil Is Nothing = False Then
@ -3702,7 +3676,6 @@ Public Class frmNIVerknuepfungen
Private Sub btnSaveAll_Click(sender As Object, e As EventArgs) Handles btnSaveAll.Click
SaveLinks()
SaveProfile()
SaveScript()
End Sub
Private Sub btnSaveAllAndClose_Click(sender As Object, e As EventArgs) Handles btnSaveAllAndClose.Click