private void addToolStripMenuItem_Click(object sender, EventArgs e) { var frm = new DepartmentMaintenance(); frm.ShowDialog(); PopulateDepartments(); }
private void editToolStripMenuItem_Click(object sender, EventArgs e) { // get department from the grid var dept = (Department)uxDepartments.CurrentRow.DataBoundItem; // pass it to the constructor of the maintenance form var frm = new DepartmentMaintenance(dept); frm.ShowDialog(); PopulateDepartments(); }