MS VS 2.4.7 ActionType bei CustomButton MsgBox, einzelinstanzanwendung = false, meldung keine WorkflowItems bei Detailprofil
This commit is contained in:
parent
23ea8ef686
commit
63ece35aec
8
app/TaskFlow/My Project/Application.Designer.vb
generated
8
app/TaskFlow/My Project/Application.Designer.vb
generated
@ -24,7 +24,7 @@ Namespace My
|
|||||||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||||
Public Sub New()
|
Public Sub New()
|
||||||
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
|
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
|
||||||
Me.IsSingleInstance = true
|
Me.IsSingleInstance = false
|
||||||
Me.EnableVisualStyles = true
|
Me.EnableVisualStyles = true
|
||||||
Me.SaveMySettingsOnExit = true
|
Me.SaveMySettingsOnExit = true
|
||||||
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
|
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
|
||||||
@ -34,5 +34,11 @@ Namespace My
|
|||||||
Protected Overrides Sub OnCreateMainForm()
|
Protected Overrides Sub OnCreateMainForm()
|
||||||
Me.MainForm = Global.DD_ProcessManager.frmMain
|
Me.MainForm = Global.DD_ProcessManager.frmMain
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||||
|
Protected Overrides Function OnInitialize(ByVal commandLineArgs As System.Collections.ObjectModel.ReadOnlyCollection(Of String)) As Boolean
|
||||||
|
Me.MinimumSplashScreenDisplayTime = 0
|
||||||
|
Return MyBase.OnInitialize(commandLineArgs)
|
||||||
|
End Function
|
||||||
End Class
|
End Class
|
||||||
End Namespace
|
End Namespace
|
||||||
|
|||||||
@ -2,9 +2,11 @@
|
|||||||
<MyApplicationData xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
<MyApplicationData xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
<MySubMain>true</MySubMain>
|
<MySubMain>true</MySubMain>
|
||||||
<MainForm>frmMain</MainForm>
|
<MainForm>frmMain</MainForm>
|
||||||
<SingleInstance>true</SingleInstance>
|
<SingleInstance>false</SingleInstance>
|
||||||
<ShutdownMode>0</ShutdownMode>
|
<ShutdownMode>0</ShutdownMode>
|
||||||
<EnableVisualStyles>true</EnableVisualStyles>
|
<EnableVisualStyles>true</EnableVisualStyles>
|
||||||
<AuthenticationMode>0</AuthenticationMode>
|
<AuthenticationMode>0</AuthenticationMode>
|
||||||
|
<MinimumSplashScreenDisplayTime>0</MinimumSplashScreenDisplayTime>
|
||||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||||
|
<HighDpiMpde>false</HighDpiMpde>
|
||||||
</MyApplicationData>
|
</MyApplicationData>
|
||||||
1
app/TaskFlow/frmKonfig.Designer.vb
generated
1
app/TaskFlow/frmKonfig.Designer.vb
generated
@ -346,6 +346,7 @@ Partial Class frmKonfig
|
|||||||
Me.Controls.Add(Me.TabControl1)
|
Me.Controls.Add(Me.TabControl1)
|
||||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow
|
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow
|
||||||
Me.Name = "frmKonfig"
|
Me.Name = "frmKonfig"
|
||||||
|
Me.TopMost = True
|
||||||
Me.TabControl1.ResumeLayout(False)
|
Me.TabControl1.ResumeLayout(False)
|
||||||
Me.TabPage2.ResumeLayout(False)
|
Me.TabPage2.ResumeLayout(False)
|
||||||
Me.TabPage2.PerformLayout()
|
Me.TabPage2.PerformLayout()
|
||||||
|
|||||||
@ -933,6 +933,9 @@
|
|||||||
<data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
<data name="$this.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||||
<value>3, 4, 3, 4</value>
|
<value>3, 4, 3, 4</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||||
|
<value>CenterScreen</value>
|
||||||
|
</data>
|
||||||
<data name="$this.Text" xml:space="preserve">
|
<data name="$this.Text" xml:space="preserve">
|
||||||
<value>Konfiguration</value>
|
<value>Konfiguration</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@ -25,7 +25,7 @@ Public Class frmMain
|
|||||||
Private UserLoggedin As Integer = 0
|
Private UserLoggedin As Integer = 0
|
||||||
Private CURR_DT_VWPM_PROFILE_ACTIVE As DataTable
|
Private CURR_DT_VWPM_PROFILE_ACTIVE As DataTable
|
||||||
Private CURR_DT_VWPM_PROFILE_AH_WORKFLOW As DataTable
|
Private CURR_DT_VWPM_PROFILE_AH_WORKFLOW As DataTable
|
||||||
Private CURR_DT_OVERVIEW As DataTable
|
Private DT_CURR_WF_ITEMS As DataTable
|
||||||
Private OVERVIEW_ADDED_WHEN As String
|
Private OVERVIEW_ADDED_WHEN As String
|
||||||
Private OVERVIEW_CHANGED_WHEN As String
|
Private OVERVIEW_CHANGED_WHEN As String
|
||||||
Private OVERVIEW_COUNT As Integer = 0
|
Private OVERVIEW_COUNT As Integer = 0
|
||||||
@ -947,14 +947,14 @@ Public Class frmMain
|
|||||||
oSQL = oSQL.Replace("@DATE", Now.ToShortDateString)
|
oSQL = oSQL.Replace("@DATE", Now.ToShortDateString)
|
||||||
oSQL = oSQL.Replace("@PROFILE_ID", CURRENT_CLICKED_PROFILE_ID)
|
oSQL = oSQL.Replace("@PROFILE_ID", CURRENT_CLICKED_PROFILE_ID)
|
||||||
|
|
||||||
CURR_DT_OVERVIEW = Await DatabaseFallback.GetDatatableECMAsync(oSQL)
|
DT_CURR_WF_ITEMS = Await DatabaseFallback.GetDatatableECMAsync(oSQL)
|
||||||
If ForceReload = True Then
|
If ForceReload = True Then
|
||||||
LOGGER.Info("ForceReload is true!")
|
LOGGER.Info("ForceReload is true!")
|
||||||
End If
|
End If
|
||||||
If Not IsNothing(CURR_DT_OVERVIEW) Then
|
If Not IsNothing(DT_CURR_WF_ITEMS) Then
|
||||||
Dim oADDED = GET_LAST_ADDED(CURR_DT_OVERVIEW)
|
Dim oADDED = GET_LAST_ADDED(DT_CURR_WF_ITEMS)
|
||||||
Dim oChanged = GET_LAST_CHANGED(CURR_DT_OVERVIEW)
|
Dim oChanged = GET_LAST_CHANGED(DT_CURR_WF_ITEMS)
|
||||||
Dim oCOUNT = CURR_DT_OVERVIEW.Rows.Count
|
Dim oCOUNT = DT_CURR_WF_ITEMS.Rows.Count
|
||||||
If oADDED = OVERVIEW_ADDED_WHEN And oChanged = OVERVIEW_CHANGED_WHEN And OVERVIEW_COUNT = oCOUNT Then
|
If oADDED = OVERVIEW_ADDED_WHEN And oChanged = OVERVIEW_CHANGED_WHEN And OVERVIEW_COUNT = oCOUNT Then
|
||||||
If ForceReload = False Then
|
If ForceReload = False Then
|
||||||
LOGGER.Info("No changes on OverviewHash - so exit Refresh")
|
LOGGER.Info("No changes on OverviewHash - so exit Refresh")
|
||||||
@ -967,17 +967,18 @@ Public Class frmMain
|
|||||||
OVERVIEW_COUNT = oCOUNT
|
OVERVIEW_COUNT = oCOUNT
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CURR_DT_OVERVIEW.Rows.Count = 0 Then
|
If DT_CURR_WF_ITEMS.Rows.Count = 0 Then
|
||||||
NO_WORKFLOWITEMS = True
|
NO_WORKFLOWITEMS = True
|
||||||
|
lblCaptionMainGrid.Text = String.Format(S.Aktuell_keine_Workflowdaten_vorhanden___0_, CURRENT_CLICKED_PROFILE_TITLE)
|
||||||
Else
|
Else
|
||||||
NO_WORKFLOWITEMS = False
|
NO_WORKFLOWITEMS = False
|
||||||
|
lblCaptionMainGrid.Text = CURRENT_CLICKED_PROFILE_TITLE
|
||||||
End If
|
End If
|
||||||
Create_Basic_View()
|
Create_Basic_View()
|
||||||
|
|
||||||
RestoreLayout()
|
RestoreLayout()
|
||||||
|
|
||||||
'GridViewWorkflows.ViewCaption = $"{ClassAllgemeineFunktionen.GUI_LANGUAGE_INFO("NoWorkflowData")} {CURRENT_CLICKED_PROFILE_TITLE}"
|
|
||||||
lblCaptionMainGrid.Text = String.Format(S.Aktuell_keine_Workflowdaten_vorhanden___0_, CURRENT_CLICKED_PROFILE_TITLE)
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -1005,7 +1006,7 @@ Public Class frmMain
|
|||||||
columnStateIcon.DataType = GetType(Image)
|
columnStateIcon.DataType = GetType(Image)
|
||||||
columnStateIcon.ColumnName = "ICON"
|
columnStateIcon.ColumnName = "ICON"
|
||||||
columnStateIcon.Caption = ""
|
columnStateIcon.Caption = ""
|
||||||
CURR_DT_OVERVIEW.Columns.Add(columnStateIcon)
|
DT_CURR_WF_ITEMS.Columns.Add(columnStateIcon)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@ -1013,7 +1014,7 @@ Public Class frmMain
|
|||||||
YellowDocuments = 0
|
YellowDocuments = 0
|
||||||
GreenDocuments = 0
|
GreenDocuments = 0
|
||||||
If TL_ICON = True Then
|
If TL_ICON = True Then
|
||||||
For Each row As DataRow In CURR_DT_OVERVIEW.Rows
|
For Each row As DataRow In DT_CURR_WF_ITEMS.Rows
|
||||||
Dim State As Integer = row.Item("TL_STATE")
|
Dim State As Integer = row.Item("TL_STATE")
|
||||||
Select Case State
|
Select Case State
|
||||||
Case 1
|
Case 1
|
||||||
@ -1035,9 +1036,9 @@ Public Class frmMain
|
|||||||
columnConvIcon.DataType = GetType(Image)
|
columnConvIcon.DataType = GetType(Image)
|
||||||
columnConvIcon.ColumnName = "CONVERSATION"
|
columnConvIcon.ColumnName = "CONVERSATION"
|
||||||
columnConvIcon.Caption = ""
|
columnConvIcon.Caption = ""
|
||||||
CURR_DT_OVERVIEW.Columns.Add(columnConvIcon)
|
DT_CURR_WF_ITEMS.Columns.Add(columnConvIcon)
|
||||||
End If
|
End If
|
||||||
For Each oRow As DataRow In CURR_DT_OVERVIEW.Rows
|
For Each oRow As DataRow In DT_CURR_WF_ITEMS.Rows
|
||||||
Try
|
Try
|
||||||
Dim oCONVYN As Boolean
|
Dim oCONVYN As Boolean
|
||||||
Try
|
Try
|
||||||
@ -1056,7 +1057,7 @@ Public Class frmMain
|
|||||||
End Try
|
End Try
|
||||||
|
|
||||||
Next
|
Next
|
||||||
bindsourcegrid.DataSource = CURR_DT_OVERVIEW
|
bindsourcegrid.DataSource = DT_CURR_WF_ITEMS
|
||||||
GridControlWorkflows.DataSource = bindsourcegrid
|
GridControlWorkflows.DataSource = bindsourcegrid
|
||||||
Dim objectCount_Descr = GridViewWorkflows.RowCount.ToString
|
Dim objectCount_Descr = GridViewWorkflows.RowCount.ToString
|
||||||
|
|
||||||
@ -1149,7 +1150,7 @@ Public Class frmMain
|
|||||||
End Sub
|
End Sub
|
||||||
Private Function GridLayoutChanged() As Boolean
|
Private Function GridLayoutChanged() As Boolean
|
||||||
Try
|
Try
|
||||||
For Each oViewColumn As DataColumn In CURR_DT_OVERVIEW.Columns
|
For Each oViewColumn As DataColumn In DT_CURR_WF_ITEMS.Columns
|
||||||
If oViewColumn.Caption = "" Then
|
If oViewColumn.Caption = "" Then
|
||||||
Continue For
|
Continue For
|
||||||
End If
|
End If
|
||||||
@ -1184,7 +1185,7 @@ Public Class frmMain
|
|||||||
End If
|
End If
|
||||||
Dim oGridColumn_exists As Boolean = False
|
Dim oGridColumn_exists As Boolean = False
|
||||||
Dim oGridDXFieldName = oActGridColumn.FieldName
|
Dim oGridDXFieldName = oActGridColumn.FieldName
|
||||||
For Each oViewColumn As DataColumn In CURR_DT_OVERVIEW.Columns
|
For Each oViewColumn As DataColumn In DT_CURR_WF_ITEMS.Columns
|
||||||
If oViewColumn.Caption = oGridDXFieldName Then
|
If oViewColumn.Caption = oGridDXFieldName Then
|
||||||
oGridColumn_exists = True
|
oGridColumn_exists = True
|
||||||
End If
|
End If
|
||||||
@ -1395,7 +1396,7 @@ Public Class frmMain
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CURR_DT_OVERVIEW.Rows.Count > 0 And POPUP_REMINDER_ACTIVE = True Then
|
If DT_CURR_WF_ITEMS.Rows.Count > 0 And POPUP_REMINDER_ACTIVE = True Then
|
||||||
Dim oMessage As String = ClassAllgemeineFunktionen.GUI_LANGUAGE_INFO("App.ReminderPipeline")
|
Dim oMessage As String = ClassAllgemeineFunktionen.GUI_LANGUAGE_INFO("App.ReminderPipeline")
|
||||||
NotifyIcon1.ShowBalloonTip(30000, $"Reminder {ADDITIONAL_TITLE}", oMessage, ToolTipIcon.Info)
|
NotifyIcon1.ShowBalloonTip(30000, $"Reminder {ADDITIONAL_TITLE}", oMessage, ToolTipIcon.Info)
|
||||||
End If
|
End If
|
||||||
@ -1472,10 +1473,10 @@ Public Class frmMain
|
|||||||
|
|
||||||
Try
|
Try
|
||||||
Dim iterateIndex As Integer = 0
|
Dim iterateIndex As Integer = 0
|
||||||
Dim oNewDataTable As DataTable = CURR_DT_OVERVIEW.Copy
|
Dim oNewDataTable As DataTable = DT_CURR_WF_ITEMS.Copy
|
||||||
For Each row As DataRow In oNewDataTable.Rows
|
For Each row As DataRow In oNewDataTable.Rows
|
||||||
If row("GUID") = CURRENT_DOC_GUID Then
|
If row("GUID") = CURRENT_DOC_GUID Then
|
||||||
CURR_DT_OVERVIEW.Rows.RemoveAt(iterateIndex)
|
DT_CURR_WF_ITEMS.Rows.RemoveAt(iterateIndex)
|
||||||
Exit For
|
Exit For
|
||||||
Else
|
Else
|
||||||
iterateIndex += 1
|
iterateIndex += 1
|
||||||
@ -1925,18 +1926,18 @@ Public Class frmMain
|
|||||||
oSQLOverview = oSQLOverview.Replace("@DATE", Now.ToShortDateString)
|
oSQLOverview = oSQLOverview.Replace("@DATE", Now.ToShortDateString)
|
||||||
oSQLOverview = oSQLOverview.Replace("@PROFILE_ID", CURRENT_CLICKED_PROFILE_ID)
|
oSQLOverview = oSQLOverview.Replace("@PROFILE_ID", CURRENT_CLICKED_PROFILE_ID)
|
||||||
|
|
||||||
CURR_DT_OVERVIEW = Await DatabaseFallback.GetDatatableECMAsync(oSQLOverview)
|
DT_CURR_WF_ITEMS = Await DatabaseFallback.GetDatatableECMAsync(oSQLOverview)
|
||||||
oStopWatch2.Done()
|
oStopWatch2.Done()
|
||||||
|
|
||||||
If Not IsNothing(CURR_DT_OVERVIEW) Then
|
If Not IsNothing(DT_CURR_WF_ITEMS) Then
|
||||||
LOGGER.Debug($"Datatable CURR_DT_OVERVIEW loaded: {CURR_DT_OVERVIEW.Rows.Count} rows")
|
LOGGER.Debug($"Datatable CURR_DT_OVERVIEW loaded: {DT_CURR_WF_ITEMS.Rows.Count} rows")
|
||||||
If GridControlWorkflows.Visible = False Then
|
If GridControlWorkflows.Visible = False Then
|
||||||
GridControlWorkflows.Visible = True
|
GridControlWorkflows.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim oADDED = GET_LAST_ADDED(CURR_DT_OVERVIEW)
|
Dim oADDED = GET_LAST_ADDED(DT_CURR_WF_ITEMS)
|
||||||
Dim oChanged = GET_LAST_CHANGED(CURR_DT_OVERVIEW)
|
Dim oChanged = GET_LAST_CHANGED(DT_CURR_WF_ITEMS)
|
||||||
Dim oCOUNT = CURR_DT_OVERVIEW.Rows.Count
|
Dim oCOUNT = DT_CURR_WF_ITEMS.Rows.Count
|
||||||
If pForceReload = False Then
|
If pForceReload = False Then
|
||||||
If oADDED = OVERVIEW_ADDED_WHEN And oChanged = OVERVIEW_CHANGED_WHEN And oCOUNT = OVERVIEW_COUNT Then
|
If oADDED = OVERVIEW_ADDED_WHEN And oChanged = OVERVIEW_CHANGED_WHEN And oCOUNT = OVERVIEW_COUNT Then
|
||||||
If pForceReload = False Then
|
If pForceReload = False Then
|
||||||
@ -1953,13 +1954,10 @@ Public Class frmMain
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
NO_WORKFLOWITEMS = False
|
NO_WORKFLOWITEMS = False
|
||||||
If CURR_DT_OVERVIEW.Rows.Count = 0 Then
|
If DT_CURR_WF_ITEMS.Rows.Count = 0 Then
|
||||||
|
NO_WORKFLOWITEMS = True
|
||||||
|
|
||||||
' lblCaptionMainGrid.Text = ClassAllgemeineFunktionen.GUI_LANGUAGE_INFO("NoWorkflowData")
|
|
||||||
lblCaptionMainGrid.Text = String.Format(S.Aktuell_keine_Workflowdaten_vorhanden___0_, "")
|
lblCaptionMainGrid.Text = String.Format(S.Aktuell_keine_Workflowdaten_vorhanden___0_, "")
|
||||||
|
|
||||||
NO_WORKFLOWITEMS = True
|
|
||||||
GridControlWorkflows.Visible = False
|
GridControlWorkflows.Visible = False
|
||||||
bindsourcegrid.DataSource = Nothing
|
bindsourcegrid.DataSource = Nothing
|
||||||
GridControlWorkflows.DataSource = Nothing
|
GridControlWorkflows.DataSource = Nothing
|
||||||
@ -1979,13 +1977,13 @@ Public Class frmMain
|
|||||||
columnStateIcon.DataType = GetType(Image)
|
columnStateIcon.DataType = GetType(Image)
|
||||||
columnStateIcon.ColumnName = "ICON"
|
columnStateIcon.ColumnName = "ICON"
|
||||||
columnStateIcon.Caption = ""
|
columnStateIcon.Caption = ""
|
||||||
CURR_DT_OVERVIEW.Columns.Add(columnStateIcon)
|
DT_CURR_WF_ITEMS.Columns.Add(columnStateIcon)
|
||||||
End If
|
End If
|
||||||
RedDocuments = 0
|
RedDocuments = 0
|
||||||
YellowDocuments = 0
|
YellowDocuments = 0
|
||||||
GreenDocuments = 0
|
GreenDocuments = 0
|
||||||
If TL_ICON = True Then
|
If TL_ICON = True Then
|
||||||
For Each row As DataRow In CURR_DT_OVERVIEW.Rows
|
For Each row As DataRow In DT_CURR_WF_ITEMS.Rows
|
||||||
Dim State As Integer = row.Item("TL_STATE")
|
Dim State As Integer = row.Item("TL_STATE")
|
||||||
Select Case State
|
Select Case State
|
||||||
Case 1
|
Case 1
|
||||||
@ -2007,8 +2005,8 @@ Public Class frmMain
|
|||||||
columnConvIcon.DataType = GetType(Image)
|
columnConvIcon.DataType = GetType(Image)
|
||||||
columnConvIcon.ColumnName = "CONVERSATION"
|
columnConvIcon.ColumnName = "CONVERSATION"
|
||||||
columnConvIcon.Caption = ""
|
columnConvIcon.Caption = ""
|
||||||
CURR_DT_OVERVIEW.Columns.Add(columnConvIcon)
|
DT_CURR_WF_ITEMS.Columns.Add(columnConvIcon)
|
||||||
For Each oRow As DataRow In CURR_DT_OVERVIEW.Rows
|
For Each oRow As DataRow In DT_CURR_WF_ITEMS.Rows
|
||||||
Try
|
Try
|
||||||
Dim oCONVYN As Boolean
|
Dim oCONVYN As Boolean
|
||||||
Try
|
Try
|
||||||
@ -2030,7 +2028,7 @@ Public Class frmMain
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
bindsourcegrid.DataSource = CURR_DT_OVERVIEW
|
bindsourcegrid.DataSource = DT_CURR_WF_ITEMS
|
||||||
GridControlWorkflows.DataSource = bindsourcegrid
|
GridControlWorkflows.DataSource = bindsourcegrid
|
||||||
GridControlWorkflows.ForceInitialize()
|
GridControlWorkflows.ForceInitialize()
|
||||||
|
|
||||||
|
|||||||
@ -1146,147 +1146,154 @@ Public Class frmValidator
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub onCustomButtonClick(sender As System.Object, e As System.EventArgs)
|
Private Sub onCustomButtonClick(sender As System.Object, e As System.EventArgs)
|
||||||
Dim oButton As Button = sender
|
Try
|
||||||
Dim oControlID = DirectCast(oButton.Tag, ClassControlCreator.ControlMetadata).Guid
|
Cursor = Cursors.WaitCursor
|
||||||
Dim oSQL = ControlCreator.GET_CONTROL_PROPERTY(DT_CONTROLS, oControlID, "SQL_UEBERPRUEFUNG")
|
Dim oButton As Button = sender
|
||||||
If IsNothing(oSQL) Then
|
Dim oControlID = DirectCast(oButton.Tag, ClassControlCreator.ControlMetadata).Guid
|
||||||
Logger.Warn("onCustomButtonClick - SQL_UEBERPRUEFUNG IS NOTHING")
|
Dim oSQL = ControlCreator.GET_CONTROL_PROPERTY(DT_CONTROLS, oControlID, "SQL_UEBERPRUEFUNG")
|
||||||
Exit Sub
|
If IsNothing(oSQL) Then
|
||||||
End If
|
Logger.Warn("onCustomButtonClick - SQL_UEBERPRUEFUNG IS NOTHING")
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
If Check_UpdateIndexe() = False Then
|
If Check_UpdateIndexe() = False Then
|
||||||
Logger.Warn("onCustomButtonClick - Check_UpdateIndexe = False >> Exit Click")
|
Logger.Warn("onCustomButtonClick - Check_UpdateIndexe = False >> Exit Click")
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
Override_SQLCommand = ControlCreator.GET_CONTROL_PROPERTY(DT_CONTROLS, oControlID, "SQL2")
|
Override_SQLCommand = ControlCreator.GET_CONTROL_PROPERTY(DT_CONTROLS, oControlID, "SQL2")
|
||||||
If IsNothing(Override_SQLCommand) Then
|
If IsNothing(Override_SQLCommand) Then
|
||||||
Override_SQLCommand = ""
|
Override_SQLCommand = ""
|
||||||
End If
|
End If
|
||||||
oSQL = clsPatterns.ReplaceAllValues(oSQL, PanelValidatorControl, True)
|
oSQL = clsPatterns.ReplaceAllValues(oSQL, PanelValidatorControl, True)
|
||||||
Override_SQLCommand = clsPatterns.ReplaceAllValues(Override_SQLCommand, PanelValidatorControl, True)
|
Override_SQLCommand = clsPatterns.ReplaceAllValues(Override_SQLCommand, PanelValidatorControl, True)
|
||||||
Dim oDT_ACTIONS As DataTable = DatabaseFallback.GetDatatableECM(oSQL) ', "onCustomButtonClick")
|
Dim oDT_ACTIONS As DataTable = DatabaseFallback.GetDatatableECM(oSQL) ', "onCustomButtonClick")
|
||||||
If IsNothing(oDT_ACTIONS) Then
|
If IsNothing(oDT_ACTIONS) Then
|
||||||
MsgBox("Something went wrong in custom action - Please check Your log!", MsgBoxStyle.Exclamation, ADDITIONAL_TITLE)
|
MsgBox("Something went wrong in custom action - Please check Your log!", MsgBoxStyle.Exclamation, ADDITIONAL_TITLE)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
ElseIf oDT_ACTIONS.Rows.Count = 0 Then
|
ElseIf oDT_ACTIONS.Rows.Count = 0 Then
|
||||||
MsgBox("Something went wrong in custom action (No row) - Please check Your log!", MsgBoxStyle.Exclamation, ADDITIONAL_TITLE)
|
MsgBox("Something went wrong in custom action (No row) - Please check Your log!", MsgBoxStyle.Exclamation, ADDITIONAL_TITLE)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
Dim oAction
|
Dim oAction
|
||||||
Dim oControlName
|
Dim oControlName
|
||||||
Dim oQuestion
|
Dim oQuestion
|
||||||
Dim oTitle
|
Dim oTitle
|
||||||
Dim oCaption
|
Dim oCaption
|
||||||
Dim oColor
|
Dim oColor
|
||||||
Try
|
Try
|
||||||
oAction = oDT_ACTIONS?.Rows(0).Item("ActionType")
|
oAction = oDT_ACTIONS?.Rows(0).Item("ActionType")
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
oAction = ""
|
oAction = ""
|
||||||
End Try
|
End Try
|
||||||
Try
|
Try
|
||||||
oControlName = oDT_ACTIONS?.Rows(0).Item("Controlname")
|
oControlName = oDT_ACTIONS?.Rows(0).Item("Controlname")
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
oControlName = ""
|
oControlName = ""
|
||||||
End Try
|
End Try
|
||||||
Try
|
Try
|
||||||
oQuestion = oDT_ACTIONS?.Rows(0).Item("Question")
|
oQuestion = oDT_ACTIONS?.Rows(0).Item("Question")
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
oQuestion = ""
|
oQuestion = ""
|
||||||
End Try
|
End Try
|
||||||
Try
|
Try
|
||||||
oTitle = oDT_ACTIONS?.Rows(0).Item("Title")
|
oTitle = oDT_ACTIONS?.Rows(0).Item("Title")
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
oTitle = ""
|
oTitle = ""
|
||||||
End Try
|
End Try
|
||||||
Try
|
Try
|
||||||
oCaption = oDT_ACTIONS?.Rows(0).Item("CaptionButton").ToString
|
oCaption = oDT_ACTIONS?.Rows(0).Item("CaptionButton").ToString
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
oCaption = ""
|
oCaption = ""
|
||||||
End Try
|
End Try
|
||||||
Try
|
Try
|
||||||
oColor = System.Drawing.Color.FromName(oDT_ACTIONS?.Rows(0).Item("Color"))
|
oColor = System.Drawing.Color.FromName(oDT_ACTIONS?.Rows(0).Item("Color"))
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
oColor = ""
|
oColor = ""
|
||||||
End Try
|
End Try
|
||||||
Try
|
Try
|
||||||
OverrideAll = oDT_ACTIONS?.Rows(0).Item("OverrideAll")
|
OverrideAll = oDT_ACTIONS?.Rows(0).Item("OverrideAll")
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Logger.Warn($"Could not set OverrideAll {ex.Message}")
|
Logger.Warn($"Could not set OverrideAll {ex.Message}")
|
||||||
OverrideAll = False
|
OverrideAll = False
|
||||||
End Try
|
End Try
|
||||||
If OverrideAll = True Then
|
If OverrideAll = True Then
|
||||||
Logger.Info($"CURRENT_DOC_ID: {CURRENT_DOC_ID} - OverrideAll will be in Action!")
|
Logger.Info($"CURRENT_DOC_ID: {CURRENT_DOC_ID} - OverrideAll will be in Action!")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Select Case oAction.ToString.ToUpper
|
Select Case oAction.ToString.ToUpper
|
||||||
Case "SetButton".ToUpper
|
Case "SetButton".ToUpper
|
||||||
btnSave.Text = oCaption & " (F2)"
|
btnSave.Text = oCaption & " (F2)"
|
||||||
btnSave.Appearance.BackColor = oColor
|
btnSave.Appearance.BackColor = oColor
|
||||||
Case "Override_Question".ToUpper
|
Case "Override_Question".ToUpper
|
||||||
If oQuestion <> "" Then
|
If oQuestion <> "" Then
|
||||||
Dim result As MsgBoxResult
|
Dim result As MsgBoxResult
|
||||||
result = MessageBox.Show(oQuestion, oTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation)
|
result = MessageBox.Show(oQuestion, oTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation)
|
||||||
If result = MsgBoxResult.Yes Then
|
If result = MsgBoxResult.Yes Then
|
||||||
Override = True
|
Override = True
|
||||||
Finish_WFStep()
|
Finish_WFStep()
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
Case "Update_Single_Control".ToUpper
|
||||||
Case "Update_Single_Control".ToUpper
|
Dim oResult1 As Boolean = True
|
||||||
Dim oResult1 As Boolean = True
|
If oQuestion <> "" Then
|
||||||
If oQuestion <> "" Then
|
Dim result As MsgBoxResult
|
||||||
Dim result As MsgBoxResult
|
result = MessageBox.Show(oQuestion, oTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation)
|
||||||
result = MessageBox.Show(oQuestion, oTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation)
|
If result = MsgBoxResult.No Then
|
||||||
If result = MsgBoxResult.No Then
|
oResult1 = False
|
||||||
oResult1 = False
|
End If
|
||||||
End If
|
|
||||||
Else
|
|
||||||
|
|
||||||
End If
|
|
||||||
If oResult1 = True Then
|
|
||||||
Dim oREsult As Boolean = True
|
|
||||||
If Override_SQLCommand <> "" Then
|
|
||||||
oREsult = DatabaseFallback.ExecuteNonQueryECM(Override_SQLCommand)
|
|
||||||
End If
|
|
||||||
If oREsult = True Then
|
|
||||||
Reload_Controls(oControlName)
|
|
||||||
Else
|
Else
|
||||||
MsgBox("Unexpected error in Button Refresh_Controls - Check Your log!", MsgBoxStyle.Exclamation, ADDITIONAL_TITLE)
|
|
||||||
End If
|
End If
|
||||||
End If
|
If oResult1 = True Then
|
||||||
Case "Update_Controls".ToUpper
|
|
||||||
If oQuestion <> "" Then
|
|
||||||
Dim result As MsgBoxResult
|
|
||||||
result = MessageBox.Show(oQuestion, oTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation)
|
|
||||||
If result = MsgBoxResult.Yes Then
|
|
||||||
Dim oREsult As Boolean = True
|
Dim oREsult As Boolean = True
|
||||||
If Override_SQLCommand <> "" Then
|
If Override_SQLCommand <> "" Then
|
||||||
oREsult = DatabaseFallback.ExecuteNonQueryECM(Override_SQLCommand)
|
oREsult = DatabaseFallback.ExecuteNonQueryECM(Override_SQLCommand)
|
||||||
End If
|
End If
|
||||||
If oREsult = True Then
|
If oREsult = True Then
|
||||||
SetStatusLabel("Refreshed single control", "Yellow")
|
Reload_Controls(oControlName)
|
||||||
FillIndexValues(False)
|
|
||||||
Else
|
Else
|
||||||
MsgBox("Unexpected error in Button Refresh_Controls - Check Your log!", MsgBoxStyle.Exclamation, ADDITIONAL_TITLE)
|
MsgBox("Unexpected error in Button Refresh_Controls - Check Your log!", MsgBoxStyle.Exclamation, ADDITIONAL_TITLE)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
Case "Update_Controls".ToUpper
|
||||||
Case "Override_Direct".ToUpper
|
If oQuestion <> "" Then
|
||||||
Override = True
|
Dim result As MsgBoxResult
|
||||||
If Check_UpdateIndexe() = True Then
|
result = MessageBox.Show(oQuestion, oTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation)
|
||||||
Finish_WFStep(False)
|
If result = MsgBoxResult.Yes Then
|
||||||
End If
|
Dim oREsult As Boolean = True
|
||||||
|
If Override_SQLCommand <> "" Then
|
||||||
|
oREsult = DatabaseFallback.ExecuteNonQueryECM(Override_SQLCommand)
|
||||||
|
End If
|
||||||
|
If oREsult = True Then
|
||||||
|
SetStatusLabel("Refreshed single control", "Yellow")
|
||||||
|
FillIndexValues(False)
|
||||||
|
Else
|
||||||
|
MsgBox("Unexpected error in Button Refresh_Controls - Check Your log!", MsgBoxStyle.Exclamation, ADDITIONAL_TITLE)
|
||||||
|
End If
|
||||||
|
|
||||||
Case "Override incFinal".ToUpper
|
End If
|
||||||
If Check_UpdateIndexe() = True Then
|
End If
|
||||||
Finish_WFStep(False)
|
Case "Override_Direct".ToUpper
|
||||||
End If
|
Override = True
|
||||||
Case "MsgboxResult".ToUpper
|
If Check_UpdateIndexe() = True Then
|
||||||
MessageBox.Show(oQuestion, oTitle, MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
|
Finish_WFStep(False)
|
||||||
Case Else
|
End If
|
||||||
MsgBox($"No configured action provided for onCustomButtonClick [{oAction}]", MsgBoxStyle.Exclamation, ADDITIONAL_TITLE)
|
|
||||||
Logger.Warn($"No configured action provided for onCustomButtonClick [{oAction}]")
|
Case "Override incFinal".ToUpper
|
||||||
End Select
|
If Check_UpdateIndexe() = True Then
|
||||||
|
Finish_WFStep(False)
|
||||||
|
End If
|
||||||
|
Case "MsgboxResult".ToUpper
|
||||||
|
MessageBox.Show(oQuestion, oTitle, MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
|
||||||
|
Case Else
|
||||||
|
MsgBox($"No configured action provided for onCustomButtonClick [{oAction}]", MsgBoxStyle.Exclamation, ADDITIONAL_TITLE)
|
||||||
|
Logger.Warn($"No configured action provided for onCustomButtonClick [{oAction}]")
|
||||||
|
End Select
|
||||||
|
Catch ex As Exception
|
||||||
|
Logger.Error(ex)
|
||||||
|
|
||||||
|
End Try
|
||||||
|
Cursor = Cursors.Default
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user