private void editMenuItem_Click(object sender, EventArgs e) { AddCardForm addCardForm = new AddCardForm(conn, Convert.ToInt32(dataGridView_cards.SelectedRows[0].Cells["id"].Value)); DialogResult dialogResult = addCardForm.ShowDialog(); if (dialogResult != DialogResult.Cancel) { loadCards(); } }
private void button_add_card_Click(object sender, EventArgs e) { AddCardForm addCardForm = new AddCardForm(conn, -1); DialogResult dialogResult = addCardForm.ShowDialog(); if (dialogResult != DialogResult.Cancel) { loadCards(); } }