Zooflow: Include new SQLEditor into Zooflow
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports DevExpress.XtraLayout
|
||||
Imports DigitalData.Controls.SQLEditor
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
Public Class frmAdmin_Globix
|
||||
@@ -9,6 +10,9 @@ Public Class frmAdmin_Globix
|
||||
Public Property PrimaryKey As Integer Implements IAdminForm.PrimaryKey
|
||||
Public Property GlobixHelper As ClassGIDatatables
|
||||
|
||||
Private AttributesManual As List(Of String)
|
||||
Private AttributesAutomatic As List(Of String)
|
||||
|
||||
Private Pages As ClassDetailPageManager
|
||||
Public Sub New(PrimaryKey As Integer, Optional IsInsert As Boolean = False)
|
||||
' Dieser Aufruf ist für den Designer erforderlich.
|
||||
@@ -105,17 +109,47 @@ Public Class frmAdmin_Globix
|
||||
End Try
|
||||
End Sub
|
||||
Sub Load_TabData()
|
||||
Load_INDEXMAN()
|
||||
Load_Attribute_Auto()
|
||||
Load_Attributes_Manual()
|
||||
Load_Attributes_Auto()
|
||||
End Sub
|
||||
Private Sub Load_INDEXMAN()
|
||||
Private Sub Load_Attributes_Manual()
|
||||
Try
|
||||
Me.TBDD_INDEX_MANTableAdapter.Fill(Me.GlobixDataset.TBDD_INDEX_MAN, PrimaryKey)
|
||||
If Not IsNumeric(PrimaryKey) Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Catch ex As System.Exception
|
||||
TBDD_INDEX_MANTableAdapter.Fill(GlobixDataset.TBDD_INDEX_MAN, PrimaryKey)
|
||||
|
||||
AttributesManual = GlobixDataset.TBDD_INDEX_MAN.
|
||||
Cast(Of DataRow).
|
||||
Select(Of String)(Function(row) row.Item("NAME")).
|
||||
ToList()
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Error in Load IndexeManuell: ")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub Load_Attributes_Auto()
|
||||
Try
|
||||
If Not IsNumeric(PrimaryKey) Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
TBDD_INDEX_AUTOMTableAdapter.Fill(GlobixDataset.TBDD_INDEX_AUTOM, PrimaryKey)
|
||||
|
||||
AttributesAutomatic = GlobixDataset.TBDD_INDEX_AUTOM.
|
||||
Cast(Of DataRow).
|
||||
Select(Of String)(Function(row) row.Item("NAME")).
|
||||
ToList()
|
||||
|
||||
Catch ex As Exception
|
||||
MessageBox.Show(ex.Message)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CurrentPage_Changed(sender As Object, e As ClassDetailPageManager.DetailPageEventArgs)
|
||||
If Not IsNothing(e.Page) Then
|
||||
If e.Page.IsPrimary = True Then
|
||||
@@ -136,15 +170,10 @@ Public Class frmAdmin_Globix
|
||||
labelStatus.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Function DeleteData() As Boolean Implements IAdminForm.DeleteData
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
Private Sub SimpleButton2_Click(sender As Object, e As EventArgs)
|
||||
|
||||
End Sub
|
||||
Private Sub BarButtonSave_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonSave.ItemClick
|
||||
ResetMessages()
|
||||
|
||||
@@ -164,13 +193,13 @@ Public Class frmAdmin_Globix
|
||||
Case XtraTabPageManIndexe.Name
|
||||
Try
|
||||
Save_manIndexe(oPage)
|
||||
Load_INDEXMAN()
|
||||
Load_Attributes_Manual()
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
Case XtraTabPageAutoIndexe.Name
|
||||
Save_AutoIndexe(oPage)
|
||||
Load_Attribute_Auto()
|
||||
Load_Attributes_Auto()
|
||||
Case XtraTabPageAutoSelect.Name
|
||||
Save_AutoSelect(oPage)
|
||||
Case XtraTabPageDynamicFolder.Name
|
||||
@@ -322,11 +351,23 @@ Public Class frmAdmin_Globix
|
||||
Private Sub btneditSQLmanIndex_Click(sender As Object, e As EventArgs) Handles btneditSQLmanIndex.Click
|
||||
If Save_manIndexe(Pages.Current) = True Then
|
||||
Dim oSQLbefore = SQL_RESULTTextBox.Text
|
||||
Dim oForm As New frmSQLDesigner() With {.SQLCommand = SQL_RESULTTextBox.Text, .DesignType = "GI_ATTRIBUTE_MAN", .ConnectionID = CONNECTION_IDTextBox.Text}
|
||||
Dim oResult = oForm.ShowDialog()
|
||||
If oSQLbefore <> oForm.SQLCommand Then
|
||||
CONNECTION_IDTextBox.Text = oForm.ConnectionID
|
||||
SQL_RESULTTextBox.Text = oForm.SQLCommand
|
||||
Dim oForm2 As New frmSQLEditor(My.LogConfig, My.DatabaseECM) With {
|
||||
.SQLCommand = SQL_RESULTTextBox.Text,
|
||||
.SQLConnection = CONNECTION_IDTextBox.Text,
|
||||
.PlaceholdersManual = AttributesManual
|
||||
}
|
||||
oForm2.ShowDialog()
|
||||
|
||||
'Dim oForm As New frmSQLDesigner() With {
|
||||
' .SQLCommand = SQL_RESULTTextBox.Text,
|
||||
' .DesignType = "GI_ATTRIBUTE_MAN",
|
||||
' .ConnectionID = CONNECTION_IDTextBox.Text
|
||||
'}
|
||||
'Dim oResult = oForm.ShowDialog()
|
||||
|
||||
If oSQLbefore <> oForm2.SQLCommand Then
|
||||
CONNECTION_IDTextBox.Text = oForm2.SQLConnection
|
||||
SQL_RESULTTextBox.Text = oForm2.SQLCommand
|
||||
'TBDD_INDEX_MANTableAdapter.Adapter.UpdateCommand.Parameters("@SQL_RESULT").Value = oForm.SQLCommand
|
||||
'TBDD_INDEX_MANTableAdapter.Adapter.UpdateCommand.Parameters("@CONNECTION_ID").Value = oForm.ConnectionID
|
||||
TextEditChangedWho_ManIndex.Text = My.Application.User.UserName
|
||||
@@ -342,17 +383,7 @@ Public Class frmAdmin_Globix
|
||||
TextEditNamenkonvention.Text = oForm.Nameconvention
|
||||
End Sub
|
||||
|
||||
Private Sub Load_Attribute_Auto()
|
||||
Try
|
||||
If Not IsNumeric(TextEditDoctypeID.Text) Then
|
||||
Exit Sub
|
||||
End If
|
||||
Me.TBDD_INDEX_AUTOMTableAdapter.Fill(Me.GlobixDataset.TBDD_INDEX_AUTOM, TextEditDoctypeID.Text)
|
||||
Catch ex As System.Exception
|
||||
System.Windows.Forms.MessageBox.Show(ex.Message)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
Private Sub Load_AutoSelect()
|
||||
Try
|
||||
Me.TBGI_REGEX_DOCTYPETableAdapter.Fill(Me.GlobixDataset.TBGI_REGEX_DOCTYPE, TextEditDoctypeID.Text)
|
||||
@@ -368,9 +399,9 @@ Public Class frmAdmin_Globix
|
||||
Pages.Current = oPage
|
||||
Select Case oPage.TabPage.Name
|
||||
Case XtraTabPageAutoIndexe.Name
|
||||
Load_Attribute_Auto()
|
||||
Load_Attributes_Auto()
|
||||
Case XtraTabPageManIndexe.Name
|
||||
Load_INDEXMAN()
|
||||
Load_Attributes_Manual()
|
||||
Case XtraTabPageAutoSelect.Name
|
||||
Load_AutoSelect()
|
||||
Case XtraTabPageDynamicFolder.Name
|
||||
@@ -393,16 +424,23 @@ Public Class frmAdmin_Globix
|
||||
|
||||
Private Sub SimpleButton2_Click_1(sender As Object, e As EventArgs) Handles SimpleButton2.Click
|
||||
If Save_AutoIndexe(Pages.Current) = True Then
|
||||
Dim oSQLbefore = SQL_RESULTTextBox1.Text
|
||||
Dim oForm As New frmSQLDesigner() With {
|
||||
.SQLCommand = oSQLbefore, .DesignType = "GI_ATTRIBUTE_AUTO",
|
||||
.ConnectionID = CONNECTION_IDTextBox1.Text,
|
||||
.AutoAttributID = GUIDTextBoxAutoAttribute.Text
|
||||
}
|
||||
Dim oResult = oForm.ShowDialog()
|
||||
If oSQLbefore <> oForm.SQLCommand Then
|
||||
CONNECTION_IDTextBox1.Text = oForm.ConnectionID
|
||||
SQL_RESULTTextBox1.Text = oForm.SQLCommand
|
||||
Dim oSQLbefore = SQL_RESULTTextBox.Text
|
||||
Dim oForm2 As New frmSQLEditor(My.LogConfig, My.DatabaseECM) With {
|
||||
.SQLCommand = SQL_RESULTTextBox.Text,
|
||||
.SQLConnection = CONNECTION_IDTextBox.Text,
|
||||
.PlaceholdersAutomatic = AttributesAutomatic
|
||||
}
|
||||
oForm2.ShowDialog()
|
||||
|
||||
'Dim oForm As New frmSQLDesigner() With {
|
||||
' .SQLCommand = oSQLbefore, .DesignType = "GI_ATTRIBUTE_AUTO",
|
||||
' .ConnectionID = CONNECTION_IDTextBox1.Text,
|
||||
' .AutoAttributID = GUIDTextBoxAutoAttribute.Text
|
||||
' }
|
||||
'Dim oResult = oForm.ShowDialog()
|
||||
If oSQLbefore <> oForm2.SQLCommand Then
|
||||
CONNECTION_IDTextBox1.Text = oForm2.SQLConnection
|
||||
SQL_RESULTTextBox1.Text = oForm2.SQLCommand
|
||||
'TBDD_INDEX_MANTableAdapter.Adapter.UpdateCommand.Parameters("@SQL_RESULT").Value = oForm.SQLCommand
|
||||
'TBDD_INDEX_MANTableAdapter.Adapter.UpdateCommand.Parameters("@CONNECTION_ID").Value = oForm.ConnectionID
|
||||
CHANGED_WHOTextEditAutoAttribut.Text = My.Application.User.UserName
|
||||
@@ -580,7 +618,7 @@ Public Class frmAdmin_Globix
|
||||
|
||||
If result = MsgBoxResult.Yes Then
|
||||
TBDD_INDEX_MANTableAdapter.Delete(GUIDTextBoxMANINDEX.Text)
|
||||
Load_INDEXMAN()
|
||||
Load_Attributes_Manual()
|
||||
End If
|
||||
|
||||
Case XtraTabPageAutoIndexe.Name
|
||||
@@ -591,7 +629,7 @@ Public Class frmAdmin_Globix
|
||||
End If
|
||||
If result = MsgBoxResult.Yes Then
|
||||
TBDD_INDEX_AUTOMTableAdapter.Delete(GUIDTextBoxAutoAttribute.Text)
|
||||
Load_Attribute_Auto()
|
||||
Load_Attributes_Auto()
|
||||
End If
|
||||
|
||||
Case XtraTabPageAutoSelect.Name
|
||||
|
||||
Reference in New Issue
Block a user