Zooflow: MASSIVE Clean up in Globix Module
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
Imports DigitalData.Controls.LookupGrid
|
||||
Imports DigitalData.GUIs.ZooFlow.Base
|
||||
Imports DigitalData.GUIs.ZooFlow.Globix.Models
|
||||
Imports DigitalData.GUIs.ZooFlow.frmGlobix_Index
|
||||
Imports DigitalData.Modules.EDMI.API
|
||||
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
|
||||
@@ -9,10 +10,12 @@ Public Class ClassValidator
|
||||
Inherits BaseClass
|
||||
|
||||
Private ReadOnly Client As Client
|
||||
Private ReadOnly ManualIndexes As List(Of ManualIndex)
|
||||
|
||||
Public Sub New(pLogConfig As LogConfig, pClient As Client)
|
||||
Public Sub New(pLogConfig As LogConfig, pClient As Client, pManualIndexes As List(Of ManualIndex))
|
||||
MyBase.New(pLogConfig)
|
||||
Client = pClient
|
||||
ManualIndexes = pManualIndexes
|
||||
End Sub
|
||||
|
||||
Function ValidateControls(pPanel As Panel, pDocType As DocType) As Boolean
|
||||
@@ -22,6 +25,10 @@ Public Class ClassValidator
|
||||
|
||||
For Each oControl As Control In pPanel.Controls
|
||||
|
||||
If oControl.Name.StartsWith("lbl") Then
|
||||
Continue For
|
||||
End If
|
||||
|
||||
' ========================= TEXT BOX =========================
|
||||
If oControl.Name.StartsWith("txt") Then
|
||||
Dim oTextBox As DevExpress.XtraEditors.TextEdit = oControl
|
||||
@@ -52,6 +59,7 @@ Public Class ClassValidator
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
|
||||
ElseIf oControl.Name.StartsWith("cmbSingle") Then
|
||||
Dim cmbSingle As TextBox = oControl
|
||||
|
||||
@@ -228,9 +236,10 @@ Public Class ClassValidator
|
||||
End Function
|
||||
|
||||
Private Function TestIsIndexOptional(pDocType As DocType, pIndexName As String) As Boolean
|
||||
Dim oIsOptional As Boolean = My.Helpers.GetValueFromDatatable(
|
||||
My.Application.Globix.CURR_DT_MAN_INDEXE,
|
||||
$"DOK_ID = {pDocType.Guid} AND INDEXNAME = '{pIndexName}'", "OPTIONAL", "")
|
||||
Dim oIsOptional As Boolean = ManualIndexes.
|
||||
Where(Function(index) index.DocTypeId = pDocType.Guid And index.Name = pIndexName).
|
||||
Select(Function(index) index.IsOptional).
|
||||
FirstOrDefault()
|
||||
|
||||
Return oIsOptional
|
||||
End Function
|
||||
|
||||
Reference in New Issue
Block a user