private void btnNovo_Click(object sender, System.EventArgs e) { var frm = new NovoContatoForm(contatosService); frm.ShowDialog(); CarregarContatos(); }
private void EditarContato(DataGridViewCellEventArgs e) { int id = (int)dataGridView1.Rows[e.RowIndex].Cells[this.id.Index].Value; var frm = new NovoContatoForm(contatosService, id); frm.ShowDialog(); CarregarContatos(); }