private void CadastrarSetor_Click(object sender, EventArgs e) { CadastroCargo cargo = new CadastroCargo(0); Hide(); cargo.Show(); }
private void tabela_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == tabela.Columns["Excluir"].Index) { controle.excluirCargo(Convert.ToInt32(tabela.CurrentRow.Cells[2].Value.ToString())); MessageBox.Show("Cargo Excluído com sucesso!", "Cargo Excluído", MessageBoxButtons.OK, MessageBoxIcon.Information); Preencher(); } else if (e.ColumnIndex == tabela.Columns["Editar"].Index) { CadastroCargo cadastroCargo = new CadastroCargo(Convert.ToInt32(tabela.CurrentRow.Cells[2].Value.ToString())); Hide(); cadastroCargo.Show(); } }