Пример #1
0
        private void buttonX11_Click(object sender, EventArgs e)
        {
            frmPhongBan pb = new frmPhongBan();

            panel_Show.Show();
            panel_Show.Controls.Clear();
            pb.TopLevel = false;
            pb.Dock     = DockStyle.Fill;
            panel_Show.Controls.Add(pb);
            pb.Show();
        }
Пример #2
0
        private void phòngBanToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (tabForm.TabPages.Count != 0)
            {
                tabForm.TabPages.Remove(tab);
            }
            frmPhongBan frm = new frmPhongBan();

            frm.TopLevel        = false;
            frm.FormBorderStyle = FormBorderStyle.None;
            frm.Dock            = DockStyle.Fill;
            tab = new TabPage("Quản lí phòng ban          ");
            tab.Controls.Add(frm);
            tabForm.TabPages.Add(tab);
            frm.Visible = true;
        }
Пример #3
0
        private void barButtonDSPhongBan_ItemClick(object sender, ItemClickEventArgs e)
        {
            Form f = GetChildFormByName(typeof(frmPhongBan));

            // nếu chưa có Form nào thì tạo
            if (f == null)
            {
                f           = new frmPhongBan();
                f.MdiParent = this;
                f.Show();
            }
            // nếu có thì gọi ra
            else
            {
                f.Activate();
            }
        }
Пример #4
0
 private void btnfrmMain_PB_Click(object sender, EventArgs e)
 {
     form_phongban = new frmPhongBan();
     form_phongban.Show();
 }