private void button9_Click(object sender, EventArgs e) { if (tabela.SelectedRows.Count == 1) { ContaPagar c = GerarConta(); FrmCadParcela cad = new FrmCadParcela(c, this); cad.Show(); } }