tengo este código pero quiero que se ejecute después de que me realice un select de mi tabla (productos) y verifique si se encuentra el producto. si no, que me muestre un mensaje que no se encuentra.!! porfa ayudenmeeeeeee.!!!!



conexion.Open();
OdbcCommand guardar = new OdbcCommand("INSERT INTO ventageneral VALUES ('" + txtModelo.Text + "' ,'" + txtPieza.Text + "','" + txtPrecio.Text + "','" + cbbColor.Text + "','" + txtTotal.Text + "','" + txtFolio.Text + "','" + txtDia.Text + "','" + txtMes.Text + "','" + txtAño.Text + "','" + NO + "')", conexion); guardar.ExecuteNonQuery();
MessageBox.Show("registros agregados");
conexion.Close();
conexion.Open();
OdbcCommand borrar = new OdbcCommand("UPDATE proveedoresregistroproductos SET cantidad = cantidad - 1 WHERE tipoproducto='" + txtModelo.Text + "'", conexion);
borrar.ExecuteNonQuery();
conexion.Close();