Try this.. :)
SqlDataAdapter da = new SqlDataAdapter("select Single_Room from Deluxe where date1 between @d1 and @d2 and Single_Room!=0", con);
da.SelectCommand.Parameters.AddWithValue("@d1",Convert.ToString(Application["checkin"]));
da.SelectCommand.Parameters.AddWithValue("@d2",Convert.ToString(Application["checkout"]));
DataSet ds = new DataSet();
da.Fill(ds);
int count = ds.Tables[0].Rows.Count;
int singleromm = 0;
for (int i = 0; i < count; i++)
{
singleromm = singleromm + Convert.ToInt32(ds.Tables[0].Rows[i][0]);
}
if (singleromm >= 2)
{
TextBox22.Enabled = false;
TextBox22_NumericUpDownExtender.Enabled = false;
}
else
{
TextBox22.Enabled = true;
TextBox22_NumericUpDownExtender.Enabled = true;
}