using (SqlCommand command7 = new SqlCommand("select * from table where cokumn2 = 'YES'", conn))
{
command7.CommandType = CommandType.Text;
using (SqlDataReader dr = command7.ExecuteReader())
{
if (dr.HasRows)
{
try
{ MailMessage mail = new MailMessage(); }
catch (Exception) {}
}
}
}
Несмотря на то, что на запрос выбора влияют строки, он не входит в условие if, просьба помочь с этим