Quote:
when i enter number still "Complete" in label not change when i change number of record
because it doesnt goes inside the
If condition
block, where you are setting the value in the label.
try like this
public void reportCheck()
{
string fni = "finish";
label12.Text = "";
SqlConnection con = new SqlConnection("Data Source=NAWAF;Initial Catalog=waterreport;Integrated Security=True");
con.Open();
SqlCommand cmd = new SqlCommand("Select count(*) from reportone where checkk = @fniish", con);
cmd.Parameters.AddWithValue("@fniish", fni);
int rowsCount = (int)cmd.ExecuteScalar();
if (rowsCount > 0)
label12.Text = " Complete ";
con.Close();
}