private void button2_Click(object sender, EventArgs e) { if (selected_item_id == nonselected) { System.Windows.Forms.MessageBox.Show("Firstly, select a student id to update."); } else { Add_UpdateForm addForm = new Add_UpdateForm(selected_item_id); addForm.Show(); selected_item_id = nonselected; } }
private void button1_Click(object sender, EventArgs e) { Add_UpdateForm addForm = new Add_UpdateForm(nonselected); addForm.Show(); }