Esempio n. 1
0
        private void btnMedicalSchoolDataEntry_Click(object sender, EventArgs e)
        {
            //creat an instance of frmMedicalSchoolEntry
            frmMedicalSchoolEntry MedicalSchoolDataEntry = new frmMedicalSchoolEntry();

            //make the MDI parent of this form the MDI parent of MedicalSchoolDataEntry form
            MedicalSchoolDataEntry.MdiParent = this.MdiParent;
            //Open the form
            MedicalSchoolDataEntry.Show();
        }
Esempio n. 2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            frmMedicalSchoolEntry MedicalSchoolEntryForm = new frmMedicalSchoolEntry();

            //make the form parent (MDI property) the same as the current forms parent (MDI property)
            MedicalSchoolEntryForm.MdiParent = this.MdiParent;
            //Open the MedicalSchoolEntryForm
            MedicalSchoolEntryForm.Show();
            //set the BoxForm up for adding a new box.
            MedicalSchoolEntryForm.AddNewSchool();
        }
Esempio n. 3
0
        private void btnViewDetails_Click(object sender, EventArgs e)
        {
            //declare an integer variable to store the selected (PK) value of the selected school to edit
            string SchoolNo;

            //if something has been selected in the list
            if (lstMedicalSchools.SelectedIndex != -1)
            {
                //get the SelectedValue (primary key) and store it in SchoolNo
                SchoolNo = Convert.ToString(lstMedicalSchools.SelectedValue);
                //ceate an instance of the Medical School Entry form
                frmMedicalSchoolEntry MedicalSchoolEntryForm = new frmMedicalSchoolEntry();
                //make the form parent (MDI property) the same as the current forms parent (MDI property)
                MedicalSchoolEntryForm.MdiParent = this.MdiParent;
                //Open the MedicalSchoolEntryForm
                MedicalSchoolEntryForm.Show();
                //invoke the method to find and display the selected box in the BoxEntryForm
                MedicalSchoolEntryForm.FindSchool(SchoolNo);
            }
        }