//new button private void toolStripButton3_Click(object sender, EventArgs e) { ManageBooks mb = new ManageBooks(); for (int i = Application.OpenForms.Count - 1; i >= 0; i--) { if ((Application.OpenForms[i].Name == "ManageBooks")) { // if(Form.ActiveForm == "ManageBooks"); Add_New_Book addbook = new Add_New_Book(); addbook.ShowDialog(); } else if ((Application.OpenForms[i].Name == "ManageEmployee")) { AddNewEmployee addemployee = new AddNewEmployee(); addemployee.ShowDialog(); } else if ((Application.OpenForms[i].Name == "ManageIssue")) { IssueBook issueBook = new IssueBook(); issueBook.ShowDialog(); } else { } } }
//add new private void button1_Click(object sender, EventArgs e) { AddNewEmployee newEmp = new AddNewEmployee(); newEmp.ShowDialog(); }
private void addNewEmployeeToolStripMenuItem_Click(object sender, EventArgs e) { AddNewEmployee addEmployee = new AddNewEmployee(); addEmployee.ShowDialog(); }