private void toolStripButton1_Click(object sender, EventArgs e) { AddProgramUsers form = new AddProgramUsers(admin); form.Owner = this; if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK) { admin.ShowProgramUsers(dataGridView1); } form.Dispose(); }
private void toolStripButton2_Click(object sender, EventArgs e) { if (dataGridView1.Rows.Count > 0) { AddProgramUsers form = new AddProgramUsers(admin, true, dataGridView1.SelectedRows[0].Cells[0].Value.ToString(), dataGridView1.SelectedRows[0].Cells[1].Value.ToString(), dataGridView1.SelectedRows[0].Cells[3].Value.ToString(), dataGridView1.SelectedRows[0].Cells[4].Value.ToString(), dataGridView1.SelectedRows[0].Cells[6].Value.ToString(), dataGridView1.SelectedRows[0].Cells[5].Value.ToString(), dataGridView1.SelectedRows[0].Cells[7].Value.ToString()); form.Owner = this; if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK) { admin.ShowProgramUsers(dataGridView1); } form.Dispose(); } }