41 lines
1.6 KiB
VB.net
41 lines
1.6 KiB
VB.net
Imports System.Windows.Forms
|
|
|
|
Public Class frmNewKombiForm
|
|
|
|
Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click
|
|
Me.DialogResult = System.Windows.Forms.DialogResult.OK
|
|
STRING1 = Me.TextBox1.Text
|
|
|
|
Dim Sql = "select count(*) from TBPMO_FORM_CONSTRUCTOR where UPPER(FORM_TITLE) = UPPER('" & STRING1 & "')"
|
|
Dim exists As Integer = MYDB_ECM.GetScalarValue(SQL)
|
|
If exists = 1 Then
|
|
MsgBox("Achtung: Dieser Name existiert bereits!" & vbNewLine & "Bitte wählen Sie einen anderen Namen!", MsgBoxStyle.Exclamation)
|
|
Exit Sub
|
|
End If
|
|
|
|
Sql = "EXEC [PRPMO_CREATE_CONSTRUCTOR] " & INTEGER1.ToString & ", '" & STRING1 & "'"
|
|
If MYDB_ECM.ExecuteNonQuery(Sql) = True Then
|
|
Dim result As MsgBoxResult = MsgBox("Die neue Sicht wurde erfolgreich erzeugt!" & vbNewLine & "Wollen Sie die Konfiguration anzeigen?", MsgBoxStyle.YesNo, "Frage:")
|
|
If result = MsgBoxResult.Yes Then
|
|
Dim frm As New frmConstructorDesigner
|
|
frm.MdiParent = frmMain
|
|
frm.Show()
|
|
Me.Close()
|
|
Else
|
|
Me.Close()
|
|
End If
|
|
|
|
End If
|
|
|
|
End Sub
|
|
|
|
Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel_Button.Click
|
|
Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
|
|
Me.Close()
|
|
End Sub
|
|
|
|
Private Sub frmNewKombiForm_Load(sender As Object, e As EventArgs) Handles Me.Load
|
|
Me.TextBox1.Text = STRING1
|
|
End Sub
|
|
End Class
|