private void mnuNhapHoSo02_Click(object sender, EventArgs e) { frmHoSo frm = new frmHoSo(); //frm.Text = "Bảng kê chi phí KCB Nội trú (02/BV)"; foreach (Form f in this.MdiChildren) { if (f.Name == frm.Name) { if (((frmHoSo)f).m_LoaiBangKe == 2) { frm.Dispose(); GC.Collect(); f.Activate(); return; } } } frm.MdiParent = this; frm.WindowState = FormWindowState.Maximized; frm.m_LoaiBangKe = 02; frm.Show(); }
private void mnuNhapHoSo03_Click(object sender, EventArgs e) { frmHoSo frm = new frmHoSo(); //frm.Text = "Bảng kê chi phí KCB ngoại trú (03/TYT)"; foreach (Form f in this.MdiChildren) { if (f.Name == frm.Name && frm.m_LoaiBangKe == 2) { f.Activate(); return; } } frm.MdiParent = this; frm.WindowState = FormWindowState.Maximized; frm.m_LoaiBangKe = 03; frm.Show(); }
private void btnHoSo_Click(object sender, EventArgs e) { frmHoSo frm = new frmHoSo(); foreach (Form f in this.ParentForm.MdiChildren) { if (f.Name == frm.Name) { f.Activate(); frm = (frmHoSo)f; frm.LoadHoSo(txtSoDKKBBHYT.Text); return; } } frm.MdiParent = this.ParentForm; frm.WindowState = FormWindowState.Maximized; frm.m_LoaiBangKe = m_LoaiBangKe; frm.Show(); frm.LoadHoSo(txtSoDKKBBHYT.Text); }