private void departmentAddClick(object sender, EventArgs e) { DepartmentAddForm addForm = new DepartmentAddForm(); this.Tag = tag_insert; addForm.FormClosed += childClose; addForm.Tag = false; addForm.Show(); }
private void departmentUpdateClick(object sender, EventArgs e) { Department d = (Department)dataGridView1.CurrentRow.Tag; if (d == null) { return; } DepartmentAddForm addForm = new DepartmentAddForm(); this.Tag = tag_update; addForm.Tag = false; addForm.FormClosed += childClose; addForm.setDepartment(d); addForm.Show(); }