Exemplo n.º 1
0
 /// <summary>
 /// Helper form so that above form only has one instance at a time.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void sp_FormClosed(object sender, FormClosedEventArgs e)
 {
     sp = null;
 }
Exemplo n.º 2
0
        /// <summary>
        /// Opens the Search Patient Form
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void searchPatientToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (UserSecurityController.AdminLoggedIn != null)
            {
                MessageBox.Show("You are not authorized to access this. ", "Access denied");
            }
            else
            {

            if (sp == null)
            {
                sp = new MedAssist.View.SearchPatient();
                sp.StartPosition = FormStartPosition.Manual;
                sp.MdiParent = this;
                sp.FormClosed += new FormClosedEventHandler(sp_FormClosed);
                sp.Show();
            }
            else
                {
                sp.Activate();
                }
            }
        }