Ejemplo n.º 1
0
        private void CarregarDGV()
        {
            ContatoCRUD contatoReader = new ContatoCRUD();

            dgv_Agenda.DataSource = contatoReader.GetContatos();

            dgv_Agenda.Refresh();
        }
Ejemplo n.º 2
0
        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();
        }