Nachrichtenverarbeitung RMC
This commit is contained in:
@@ -29,10 +29,10 @@ Public Class frmAPIEinstellungen
|
||||
|
||||
If sqlwhere = "" Then
|
||||
|
||||
APIBind.initBinding("SELECT [api_active],[api_productive], [api_program],[api_id],[api_url] ,[api_user],[api_password] ,[api_UseToken],[api_token] ,[api_description] FROM " & table, table)
|
||||
APIBind.initBinding("SELECT [api_active],[api_productive], [api_program],[api_id],[api_url] ,[api_user],[api_password] ,[api_UseToken],[api_token] ,[api_description] FROM " & table & " WHERE api_productive = " & IIf(cbxProduktivsystem.Checked, "1", "0"), table)
|
||||
Else
|
||||
|
||||
APIBind.initBinding("SELECT [api_active],[api_productive], [api_program], [api_id],[api_url] ,[api_user],[api_password] ,[api_useToken],[api_token] ,[api_description] FROM " & table & " WHERE " & sqlwhere, table)
|
||||
APIBind.initBinding("Select [api_active], [api_productive], [api_program], [api_id], [api_url], [api_user], [api_password], [api_useToken], [api_token], [api_description] FROM " & table & " WHERE api_productive = " & IIf(cbxProduktivsystem.Checked, "1", "0") & sqlwhere, table)
|
||||
|
||||
End If
|
||||
|
||||
@@ -62,29 +62,32 @@ Public Class frmAPIEinstellungen
|
||||
.Columns("api_description").HeaderText = "Beschreibung"
|
||||
.Columns("api_description").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
|
||||
|
||||
Dim c As New DataGridViewImageColumn
|
||||
c.Name = "isRunning" : c.HeaderText = "Online"
|
||||
c.Image = My.Resources.wait : c.ImageLayout = DataGridViewImageCellLayout.Zoom
|
||||
c.Width = 40 : c.DefaultCellStyle.Padding = New Padding(2) : c.DefaultCellStyle.BackColor = Color.White
|
||||
c.DefaultCellStyle.Tag = "Online"
|
||||
.Columns.Add(c)
|
||||
|
||||
If .Columns("isRunning") Is Nothing Then
|
||||
|
||||
Dim c As New DataGridViewImageColumn
|
||||
c.Name = "isRunning" : c.HeaderText = "Online"
|
||||
c.Image = My.Resources.wait : c.ImageLayout = DataGridViewImageCellLayout.Zoom
|
||||
c.Width = 40 : c.DefaultCellStyle.Padding = New Padding(2) : c.DefaultCellStyle.BackColor = Color.White
|
||||
c.DefaultCellStyle.Tag = "Online"
|
||||
.Columns.Add(c)
|
||||
|
||||
End If
|
||||
|
||||
For Each r As DataGridViewRow In .Rows
|
||||
If r.Cells("api_url").Value Is DBNull.Value Then
|
||||
r.DefaultCellStyle.ForeColor = Color.Gray
|
||||
ElseIf CBool(r.Cells("api_active").Value) = False Then
|
||||
r.DefaultCellStyle.ForeColor = Color.Gray
|
||||
End If
|
||||
If r.Cells("api_url").Value Is DBNull.Value Then
|
||||
r.DefaultCellStyle.ForeColor = Color.Gray
|
||||
ElseIf CBool(r.Cells("api_active").Value) = False Then
|
||||
r.DefaultCellStyle.ForeColor = Color.Gray
|
||||
End If
|
||||
|
||||
If r.Cells("api_url").Value IsNot DBNull.Value AndAlso CheckAddress(r.Cells("api_url").Value) Then
|
||||
DirectCast(r.Cells("isRunning"), DataGridViewImageCell).Value = My.Resources.ok
|
||||
Else
|
||||
DirectCast(r.Cells("isRunning"), DataGridViewImageCell).Value = My.Resources.del
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If r.Cells("api_url").Value IsNot DBNull.Value AndAlso CheckAddress(r.Cells("api_url").Value) Then
|
||||
DirectCast(r.Cells("isRunning"), DataGridViewImageCell).Value = My.Resources.ok
|
||||
Else
|
||||
DirectCast(r.Cells("isRunning"), DataGridViewImageCell).Value = My.Resources.del
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
End With
|
||||
@@ -139,9 +142,6 @@ Public Class frmAPIEinstellungen
|
||||
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs)
|
||||
If DataGridView.SelectedRows.Count = 0 Then Exit Sub
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function CheckAddress(url As String) As Boolean
|
||||
@@ -156,14 +156,29 @@ Public Class frmAPIEinstellungen
|
||||
End Function
|
||||
|
||||
Private Sub txtSuche_KeyDown(sender As Object, e As KeyEventArgs) Handles txtSuche.KeyDown
|
||||
|
||||
Dim sqladdon As String = ""
|
||||
|
||||
|
||||
If e.KeyCode = Keys.Enter Then
|
||||
If txtSuche.Text <> "" Then
|
||||
sqladdon &= " [api_program] like '%" & txtSuche.Text & "%' or [api_url] like '%" & txtSuche.Text & "%'"
|
||||
sqladdon &= " [api_program] Like '%" & txtSuche.Text & "%' or [api_url] like '%" & txtSuche.Text & "%'"
|
||||
End If
|
||||
loadDGV(sqladdon)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub cbxProduktivsystem_CheckedChanged(sender As Object, e As EventArgs) Handles cbxProduktivsystem.CheckedChanged
|
||||
Dim sqladdon As String = ""
|
||||
If txtSuche.Text <> "" Then
|
||||
sqladdon &= " [api_program] Like '%" & txtSuche.Text & "%' or [api_url] like '%" & txtSuche.Text & "%'"
|
||||
End If
|
||||
loadDGV(sqladdon)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub DataGridView_CellContentDoubleClick(sender As Object, e As DataGridViewCellEventArgs) Handles DataGridView.CellContentDoubleClick
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user