private void agregarToolStripMenuItem_Click(object sender, EventArgs e) { ContactForm.action = "add"; ContactForm c = new ContactForm(); c.ShowDialog(); load(); }
private void dataGridView1_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) { try { ContactForm.id = dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString(); ContactForm.action = "update"; ContactForm c = new ContactForm(); c.ShowDialog(); load(); } catch (NullReferenceException ex) { MessageBox.Show("Invalido!!"); } }