private void generalPractitionersToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //Instance of frmGPList
            frmGPList GPListForm = new frmGPList();

            //make its parent of this parent
            GPListForm.MdiParent = this;
            //display the form
            GPListForm.Show();
        }
Example #2
0
        private void btnGPLookup_Click(object sender, EventArgs e)
        {
            //creat an instance of frmGPList
            frmGPList GPLookup = new frmGPList();

            //make the MDI parent of this form the MDI parent of GPLookup
            GPLookup.MdiParent = this.MdiParent;
            //Open the form
            GPLookup.Show();
        }
Example #3
0
        private void btnSelectGPFromList_Click(object sender, EventArgs e)
        {
            //create an instance of the frmGPsList called GPListForm
            frmGPList GPListForm = new frmGPList();

            //make the MDI parent of the form be this MDI parent form
            GPListForm.MdiParent = this.MdiParent;
            //(Note:concept of delegates (an event handler is a delegate) means we can
            //pass the method getGPSelectedFromList to the  GPListForm object. Because they both have the same signature
            //the getGPSelected method can call that method
            GPListForm.GPSelectedFromList += new EventHandler(getGPSelectedFromList);
            //display the GPListForm
            GPListForm.Show();
        }