Hi.
There is error in your conditional expression :
Convert.ToInt32(dr[9].ToString())
will never be checked as "== 0" because you have a condition ">= 1" behind.
Just do like this :
lst = listView2.Items.Add(dr[0].ToString());
lst.SubItems.Add(dr[1].ToString());
lst.SubItems.Add(dr[9].ToString());
lst.SubItems.Add(dr[8].ToString());
if (Convert.ToInt32(dr[9].ToString()) == 0)
{
lst.ForeColor = Color.Crimson;
}
else if (Convert.ToInt32(dr[9].ToString()) < Convert.ToInt32(dr[8].ToString()))
{
lst.ForeColor = Color.Orange;
}
}
BR