Public Sub Load_equiment()
ListView_tools.Items.Clear()
oledb = "select Tag_ID,Equiment,Area,Status_cal,Date_PM,Date_Due from equiment"
Dim dts As DataTable = cmd_excuteToDataTable()
For i As Integer = 0 To dts.Rows.Count - 1
Dim arr_item(7) As String
arr_item(0) = "TQ00-" & 0 + i
arr_item(1) = "Tools-" & 0 + i
arr_item(2) = "TH-" & 0 + i
arr_item(3) = dts.Rows(i)("Date_PM")
arr_item(4) = dts.Rows(i)("Date_Due")
arr_item(5) = DateDiff(DateInterval.Day, dts.Rows(i)("Date_Due"), Now())
arr_item(6) = "0"
Dim itm As New ListViewItem(arr_item)
ListView_tools.Items.Add(itm)
Next
End Sub
Public Sub check_rows()
For r As Integer = 0 To ListView_tools.Items.Count - 1
If ListView_tools.Items(r).Text.ToLower <= 5 Then
ListView_tools.SelectedItems.Item(5).SubItems(r).BackColor = Color.Black
End If
Next
End Sub