private void CarregarDGV() { ContatoCRUD contatoReader = new ContatoCRUD(); dgv_Agenda.DataSource = contatoReader.GetContatos(); dgv_Agenda.Refresh(); }
private void Btn_Excluir_Click(object sender, EventArgs e) { int id = (int)dgv_Agenda.CurrentRow.Cells[0].Value; ContatoCRUD contatoExcluir = new ContatoCRUD(); contatoExcluir.Excluir(id); CarregarDGV(); }