private void btnAddNCC_Click(object sender, EventArgs e) { _frmNhaCC = new frmNhaCC(_tenTK, 1); _frmNhaCC.MdiParent = this.MdiParent; _frmNhaCC.Dock = DockStyle.Fill; _frmNhaCC.Show(); this.Hide(); }
private void btnAddMaNCC_Click(object sender, EventArgs e) { frmNhaCC frm = new frmNhaCC(_tenTK, 2); frm.MdiParent = this.MdiParent; frm.Dock = DockStyle.Fill; frm.Show(); this.Hide(); }
// MDI frmNhaCungCap void MoFormNhaCC() { Form frm = KiemTraFormTonTai(typeof(frmNhaCC)); if (frm != null) { frm.Activate(); } else { frmNhaCC m_frmHoaDonThanhToan = frmNhaCC.Instance; m_frmHoaDonThanhToan.MdiParent = this; m_frmHoaDonThanhToan.Dock = DockStyle.Fill; m_frmHoaDonThanhToan.Show(); } }
private void frmNhaCC_FormClosed(object sender, FormClosedEventArgs e) { _Instance = null; }