private void bIncluir_Click(object sender, EventArgs e) { FormCadastroEstado formCadastroEstado = new FormCadastroEstado(); formCadastroEstado.operacao = "Incluir"; formCadastroEstado.formPesquisaEstado = this; formCadastroEstado.ShowDialog(); pesquisar(); }
private void bAlterar_Click(object sender, EventArgs e) { if (dgvEstados.RowCount > 0) { FormCadastroEstado formCadastroEstado = new FormCadastroEstado(); formCadastroEstado.operacao = "Alterar"; formCadastroEstado.Idestado = int.Parse(dgvEstados.CurrentRow.Cells["colIDEstado"].Value.ToString()); formCadastroEstado.formPesquisaEstado = this; formCadastroEstado.ShowDialog(); pesquisar(); } }