Пример #1
0
 //When search clicked, get the id from the idTextBox, search if patient with that id exist.
 //If exist creates a new SerchResultForm and show the results, If not, Shows appropriate message
 private void _searchPatientButton_Click(object sender, EventArgs e)
 {
     string patientId = idToLoadTextBox.Text;
     try
     {
         List<Patient> patientList = MainBL.getPatientListById(patientId);
         if (patientList != null)
         {
             _mainForm.Enabled = false;
             SearchResultForm srf = new SearchResultForm(patientList, _mainForm);
             srf.Show();
         }
         else
             GeneralMethods.showErrorMessageBox("Wrong ID, No patient found.");
     }
     catch (Exception)
     {
         GeneralMethods.showErrorMessageBox("Something Went Wrong, Please try Again");
     }
 }
Пример #2
0
        //When search clicked, get the id from the idTextBox, search if patient with that id exist.
        //If exist creates a new SerchResultForm and show the results, If not, Shows appropriate message
        private void _searchPatientButton_Click(object sender, EventArgs e)
        {
            string patientId = idToLoadTextBox.Text;

            try
            {
                List <Patient> patientList = MainBL.getPatientListById(patientId);
                if (patientList != null)
                {
                    _mainForm.Enabled = false;
                    SearchResultForm srf = new SearchResultForm(patientList, _mainForm);
                    srf.Show();
                }
                else
                {
                    GeneralMethods.showErrorMessageBox("Wrong ID, No patient found.");
                }
            }
            catch (Exception)
            {
                GeneralMethods.showErrorMessageBox("Something Went Wrong, Please try Again");
            }
        }