private void btnRegister_Click(object sender, EventArgs e) { try { frmPatient frm = new frmPatient(); frm.MdiParent = this.ParentForm; frm.Show(); } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }
private void btnReg_Click(object sender, EventArgs e) { try { if (Application.OpenForms.OfType <frmPatient>().Count() == 1) { Application.OpenForms.OfType <frmPatient>().First().BringToFront(); } else { frmPatient frm = new frmPatient(); frm.MdiParent = this; frm.Show(); } } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }
private void menuItemPatSearch_Click(object sender, EventArgs e) { try { if (Application.OpenForms.OfType <frmPatient>().Count() == 1) { Application.OpenForms.OfType <frmPatient>().First().BringToFront(); } else { frmPatient frm = new frmPatient(1); frm.MdiParent = this; frm.Show(); frm.WindowState = FormWindowState.Maximized; } } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }