private void btnAddChave_Click(object sender, EventArgs e) { cadastroChave cadastro = new cadastroChave(usuario); cadastro.ShowDialog(); if (cadastro.DialogResult == DialogResult.Yes) { atualizarGridChaves(); } }
private void BtnEditar_Click(object sender, EventArgs e) { if (gridChaves.CurrentRow != null) { string codigoChave = gridChaves.CurrentRow.Cells[5].Value.ToString(); cadastroChave editarChave = new cadastroChave(codigoChave, usuario); editarChave.ShowDialog(); atualizarGridChaves(); } }