These were both before the treaty was signed.
No. The treaty was signed in TNG's season 6. The two episodes were respectively in season 7 of tng and season 1 of ds9.
Chain of Command, the episode where the treaty was signed, was for the purpose of giving the Trek viewers a major Cardassian episode to introduce them to the would be DS9 audience so they main villains over there don't just seem like another "alien of the week"