コード例 #1
0
        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();
            }
        }
コード例 #2
0
        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();
            }
        }