public void InitForm() { frmManageDocument = new FrmManageDocument(IDNhanVien); btnMasterControl.Enabled = false; frmSearchBug = new FrmSearchBug(); btnUseDocument.Enabled = false; frmscale = new FrmScaleAddTool(); btnScaleAdapterTool.Enabled = false; frmCheckgia = new FrmCheckGia(); btnCheckPrice.Enabled = false; frmkiot = new Frmkiot(); frmSyncPrice = new FrmSyncPrice(); frmbangbaogia = new FrmbangBaoGia(); frmDonDatHang = new FrmDonDatHang.FrmDonDatHang(this); quanlyDdh = new FrmQuanlyDDH(); frmCheckCKTM = new FrmCheckSKU_CKTM(); frmKiemTrafileT = new FrmCheckFileT(); frmCheckCurency = new FrmCheckCurrentcy(); //btcheckcurrentcy.Enabled = false; btbangbaogia.Enabled = false; btSyncPrice.Enabled = false; btbangbaogia.Enabled = false; btnKHTVCheck.Enabled = false; btCheckCKTM.Enabled = false; frm = new FrmImage(); }
private void btnMasterControl_LinkClicked(object sender, NavBarLinkEventArgs e) { if (!CTLQuanLyForm.formName.Contains(frmManageDocument.Name)) { if (frmManageDocument != null) { frmManageDocument = new FrmManageDocument(frmLogIn.ID); xtraTabbedMdiManager.MdiParent = this; CTLQuanLyForm.formName.Add(frmManageDocument.Name); frmManageDocument.Text = "Quản lý hướng dẫn sử dụng các phần mềm"; frmManageDocument.MdiParent = this; frmManageDocument.Show(); } else { frmManageDocument = new FrmManageDocument(frmLogIn.ID); xtraTabbedMdiManager.MdiParent = this; CTLQuanLyForm.formName.Add(frmManageDocument.Name); frmManageDocument.Text = "Quản lý hướng dẫn sử dụng các phần mềm"; frmManageDocument.MdiParent = this; frmManageDocument.Show(); } } else { if (frmManageDocument == null) { frmManageDocument = new FrmManageDocument(frmLogIn.ID); frmManageDocument.MdiParent = this; frmManageDocument.Activate(); frmManageDocument.BringToFront(); } else { frmManageDocument.MdiParent = this; frmManageDocument.Activate(); frmManageDocument.BringToFront(); } } }