MS MassChange

This commit is contained in:
Digital Data - Marlon Schreiber
2018-06-08 10:13:00 +02:00
parent 2337a2954a
commit bce977a043
18 changed files with 2600 additions and 254 deletions

View File

@@ -350,4 +350,72 @@ Public Class ClassControlCreator
e.Graphics.DrawLine(New Pen(ForeColor, 100), New Point(0, 0), New Point(e.ClipRectangle.Width, 2))
End Sub
End Class
Public Shared Function GET_CONTROL_PROPERTIES(DT_CONTROL As DataTable, ControlName As String)
Try
CURRENT_CONTROL_ID = 0
CURR_CON_ID = 0
CURR_SELECT_CONTROL = ""
CURR_CHOICE_LIST = ""
Dim dt As New DataTable
dt = DT_CONTROL
' Define the filter
Dim filter As String = "NAME = '" & ControlName & "'"
' Filter the rows using Select() method of DataTable
Dim FilteredRows As DataRow() = dt.Select(filter)
If FilteredRows.Count = 1 Then
For Each row As DataRow In FilteredRows
CURRENT_CONTROL_ID = row("GUID")
CURR_CON_ID = row("CONNECTION_ID")
CURR_SELECT_CONTROL = row("SQL_UEBERPRUEFUNG")
CURR_CHOICE_LIST = row("CHOICE_LIST")
Next
Return 1
Else
Return 0
End If
Catch ex As Exception
ClassLogger.Add("Unexpected Error in GET_CONTROL_PROPERTIES (" & ControlName & "):" & ex.Message)
Return 0
End Try
End Function
Public Shared Function GET_DEPENDING_CONTROLS(DT_CONTROLS As DataTable, ControlName As String)
Try
Dim dt As New DataTable
dt = DT_CONTROLS
' Define the filter
Dim filter As String = String.Format("SQL_UEBERPRUEFUNG LIKE '%{0}%'", ControlName)
Dim FilteredRows As DataRow() = dt.Select(filter)
CURR_DT_DEPENDING_CONTROLS = Nothing
If FilteredRows.Length > 0 Then
CURR_DT_DEPENDING_CONTROLS = FilteredRows.CopyToDataTable
End If
Return True
Catch ex As Exception
ClassLogger.Add("Unexpected Error in GET_DEPENDING_CONTROLS (" & ControlName & "):" & ex.Message)
Return 0
End Try
End Function
Public Shared Function GET_CONNECTION_INFO(CON_ID As Integer)
Try
Dim dt As New DataTable
dt = CURRENT_DT_TBDD_CONNECTION
' Define the filter
Dim filter As String = "GUID = " & CON_ID
' Filter the rows using Select() method of DataTable
Dim FilteredRows As DataRow() = dt.Select(filter)
If FilteredRows.Count = 1 Then
Return FilteredRows
Else
Return Nothing
End If
Catch ex As Exception
ClassLogger.Add("Unexpected Error in GET_CONNECTION_INFO (" & CON_ID.ToString & "):" & ex.Message)
Return Nothing
End Try
End Function
End Class