ZooFlow: WIP CW Admin
This commit is contained in:
@@ -1,4 +1,11 @@
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DevExpress.XtraEditors
|
||||
Imports DevExpress.XtraGrid.Views.Grid
|
||||
Imports DevExpress.XtraLayout
|
||||
Imports DevExpress.XtraTab
|
||||
Imports DigitalData.Controls.RegexEditor
|
||||
Imports DigitalData.Controls.SQLEditor
|
||||
Imports DigitalData.GUIs.Common
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
Public Class frmAdmin_CWProfile
|
||||
Implements frmAdmin_Interface
|
||||
@@ -7,6 +14,16 @@ Public Class frmAdmin_CWProfile
|
||||
Public Property HasChanges As Boolean Implements frmAdmin_Interface.HasChanges
|
||||
Public Property IsInsert As Boolean Implements frmAdmin_Interface.IsInsert
|
||||
|
||||
Private Const BUTTON_REGEX_PROFILE = "BUTTON_REGEX_PROFILE"
|
||||
Private Const BUTTON_SEARCH_SQL = "BUTTON_SEARCH_SQL"
|
||||
Private Const BUTTON_COUNT_SQL = "BUTTON_COUNT_SQL"
|
||||
|
||||
Private Const TAB_PAGE_PROFILE = "TAB_PAGE_PROFILE"
|
||||
Private Const TAB_PAGE_DOCSEARCH = "TAB_PAGE_DOCSEARCH"
|
||||
Private Const TAB_PAGE_DATASEARCH = "TAB_PAGE_DATASEARCH"
|
||||
|
||||
Private Current_Page As String
|
||||
|
||||
Public Sub New(PrimaryKey As Integer)
|
||||
' Dieser Aufruf ist für den Designer erforderlich.
|
||||
InitializeComponent()
|
||||
@@ -17,9 +34,51 @@ Public Class frmAdmin_CWProfile
|
||||
Me.IsInsert = IsInsert
|
||||
End Sub
|
||||
|
||||
Private Sub Any_EditValueChanged(sender As BaseEdit, e As EventArgs)
|
||||
Dim oControl As BaseEdit = sender
|
||||
|
||||
If TypeOf oControl.Parent Is LayoutControl Then
|
||||
Dim oLayoutControl As LayoutControl = oControl.Parent
|
||||
|
||||
If TypeOf oLayoutControl.Parent Is XtraTabPage Then
|
||||
Dim oTabControl As XtraTabPage = oLayoutControl.Parent
|
||||
Dim oTag As String = oTabControl.Tag
|
||||
|
||||
Select Case oTag
|
||||
Case TAB_PAGE_DOCSEARCH
|
||||
Current_Page = TAB_PAGE_DOCSEARCH
|
||||
|
||||
Case TAB_PAGE_PROFILE
|
||||
Current_Page = TAB_PAGE_DOCSEARCH
|
||||
|
||||
Case Else
|
||||
Current_Page = Nothing
|
||||
End Select
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub frmAdmin_CWProfile_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
Try
|
||||
TBCW_PROFILESTableAdapter.Connection.ConnectionString = My.Database.CurrentSQLConnectionString
|
||||
TBCW_PROFILESTableAdapter.Fill(DBCW_Stammdaten.TBCW_PROFILES, PrimaryKey)
|
||||
|
||||
TBCW_PROF_DOC_SEARCHTableAdapter.Connection.ConnectionString = My.Database.CurrentSQLConnectionString
|
||||
TBCW_PROF_DOC_SEARCHTableAdapter.Fill(DBCW_Stammdaten.TBCW_PROF_DOC_SEARCH, PrimaryKey)
|
||||
|
||||
TBCW_PROF_DATA_SEARCHTableAdapter.Connection.ConnectionString = My.Database.CurrentSQLConnectionString
|
||||
TBCW_PROF_DATA_SEARCHTableAdapter.Fill(DBCW_Stammdaten.TBCW_PROF_DATA_SEARCH, PrimaryKey)
|
||||
|
||||
Dim oViews As New List(Of GridView) From {GridViewDataSearch, GridViewDocSearch}
|
||||
Dim oGridBuilder As New GridBuilder(oViews)
|
||||
oGridBuilder.
|
||||
WithDefaults().
|
||||
WithReadOnlyOptions()
|
||||
|
||||
For Each oContainer As LayoutControlItem In Root.Items
|
||||
Dim oControl As BaseEdit = oContainer.Control
|
||||
AddHandler oControl.GotFocus, AddressOf Any_EditValueChanged
|
||||
Next
|
||||
Catch ex As Exception
|
||||
ShowError(ex)
|
||||
End Try
|
||||
@@ -77,4 +136,43 @@ Public Class frmAdmin_CWProfile
|
||||
Public Function DeleteData() As Boolean Implements frmAdmin_Interface.DeleteData
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
Private Sub TextEdit4_ButtonClick(sender As Object, e As DevExpress.XtraEditors.Controls.ButtonPressedEventArgs) Handles TextEdit4.ButtonClick
|
||||
Dim oTextEdit As TextEdit = sender
|
||||
|
||||
If e.Button.Tag = BUTTON_REGEX_PROFILE Then
|
||||
Dim oForm As New frmRegexEditor(oTextEdit.EditValue)
|
||||
Dim oResult = oForm.ShowDialog()
|
||||
|
||||
If oResult = DialogResult.OK Then
|
||||
oTextEdit.EditValue = oForm.RegexString
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub TextEdit7_ButtonClick(sender As Object, e As DevExpress.XtraEditors.Controls.ButtonPressedEventArgs) Handles TextEdit7.ButtonClick
|
||||
Dim oTextEdit As TextEdit = sender
|
||||
|
||||
If e.Button.Tag = BUTTON_SEARCH_SQL Then
|
||||
Dim oForm As New frmSQLEditor(oTextEdit.EditValue)
|
||||
Dim oResult = oForm.ShowDialog()
|
||||
|
||||
If oResult = DialogResult.OK Then
|
||||
oTextEdit.EditValue = oForm.SQLString
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub TextEdit8_ButtonClick(sender As Object, e As DevExpress.XtraEditors.Controls.ButtonPressedEventArgs) Handles TextEdit8.ButtonClick
|
||||
Dim oTextEdit As TextEdit = sender
|
||||
|
||||
If e.Button.Tag = BUTTON_COUNT_SQL Then
|
||||
Dim oForm As New frmSQLEditor(oTextEdit.EditValue)
|
||||
Dim oResult = oForm.ShowDialog()
|
||||
|
||||
If oResult = DialogResult.OK Then
|
||||
oTextEdit.EditValue = oForm.SQLString
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user