示例#1
0
        //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
                {
                }
            }
        }
示例#2
0
        //add new
        private void button1_Click(object sender, EventArgs e)
        {
            AddNewEmployee newEmp = new AddNewEmployee();

            newEmp.ShowDialog();
        }
示例#3
0
        private void addNewEmployeeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AddNewEmployee addEmployee = new AddNewEmployee();

            addEmployee.ShowDialog();
        }