Пример #1
0
        private void btnSP_Click(object sender, EventArgs e)
        {
            frmSanPham frmSP = new frmSanPham();

            tbChiTiet.Show();
            tbChiTiet.Controls.Clear();
            frmSP.TopLevel = false;
            frmSP.Dock     = DockStyle.Fill;
            tbChiTiet.Controls.Add(frmSP);
            frmSP.Show();
            tabControlPanel1.Hide();
        }
Пример #2
0
        private void btnSanPham_ItemClick(object sender, ItemClickEventArgs e)
        {
            Form frm = CheckForm(typeof(frmSanPham));

            if (frm != null)
            {
                frm.Activate();
            }
            else
            {
                frmSanPham frmN = new frmSanPham();
                frmN.MdiParent = this;
                frmN.Show();
            }
        }