30-10-17, 09:51 AM
PHP كود :
Dim conn41 As New SQLiteConnection(String.Format("Data Source= \DB.s3db", Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), strcallbk))
conn41.Open()
For RowIndex As Integer = 0 To DataGridView1.Rows.Count - 1
Dim sa3callswork As String = DataGridView1.Item(1, RowIndex).Value
Dim cmd41 As New SQLiteCommand(String.Format("SELECT COUNT(*) FROM DB WHERE CALLop = @CALLop"), conn41)
cmd41.Parameters.AddWithValue("CALLop", sa3callswork)
Dim rowCount41 As Integer = Convert.ToInt32(cmd41.ExecuteScalar())
If rowCount41 <> 0 Then
DataGridView1.Rows(RowIndex).DefaultCellStyle.BackColor = Nothing
Else
DataGridView1.Rows(RowIndex).DefaultCellStyle.BackColor = Color.Yellow
End If
Next
conn41.Close()
