public void FillControls()
        {
            CommonViewsActions.FillListBoxControl(lstDiagnosisCategories,
                                                  PEMRBusinessLogic.GetDiagnosisCategoriesList(false), "DiagnosisCategoryFullName");
            CommonViewsActions.FillListBoxControl(lstDoctorDiagnosisCategories,
                                                  PEMRBusinessLogic.GetDiagnosisCategoriesList(ApplicationStaticConfiguration.ActiveLoginUser
                                                                                               .Person_CU_ID), "DiagnosisCategoryFullName");

            CommonViewsActions.FillListBoxControl(lstDiagnosis, PEMRBusinessLogic.GetDiagnosisList(false),
                                                  "DiagnosisFullName");
            CommonViewsActions.FillListBoxControl(lstDoctorDiagnosis,
                                                  PEMRBusinessLogic.GetDiagnosisList(ApplicationStaticConfiguration.ActiveLoginUser.Person_CU_ID),
                                                  "DiagnosisFullName");
        }
 private void chkAll_CheckedChanged(object sender, EventArgs e)
 {
     switch (ApplicationStaticConfiguration.Organization)
     {
     case DB_Organization.Ophthalmology:
         if (EyeType == null || PEMRBusinessLogic.ActivePEMRObject.List_VisitTiming_Diagnosis == null)
         {
             return;
         }
         AddedDiagnosisList = PEMRBusinessLogic.GetDiagnosisList(
             PEMRBusinessLogic.ActivePEMRObject.List_VisitTiming_Diagnosis.FindAll(item =>
                                                                                   !Convert.ToInt32(item.PEMRElementStatus)
                                                                                   .Equals(Convert.ToInt32(PEMRElementStatus.Removed))),
             chkAll.Checked ? DB_EyeType_p.All : (DB_EyeType_p)EyeType);
         CommonViewsActions.FillListBoxControl(lstAddedDiagnosis, AddedDiagnosisList, "DiagnosisFullName");
         lstAddedDiagnosis.Refresh();
         SetDiagnosisCount(AddedDiagnosisList);
         break;
     }
 }
 private void lstDoctorDiagnosisCategories_SelectedIndexChanged(object sender, System.EventArgs e)
 {
     if (lstDoctorDiagnosisCategories.SelectedValue == null)
     {
         return;
     }
     if (lstDoctorDiagnosisCategories.SelectedValue is DiagnosisCategory_cu)
     {
         CommonViewsActions.FillListBoxControl(lstDiagnosis,
                                               PEMRBusinessLogic.GetDiagnosisList(((DiagnosisCategory_cu)lstDoctorDiagnosisCategories.SelectedValue)
                                                                                  .ID),
                                               "DiagnosisFullName");
     }
     else
     {
         CommonViewsActions.FillListBoxControl(lstDiagnosis,
                                               PEMRBusinessLogic.GetDiagnosisList(lstDoctorDiagnosisCategories.SelectedValue),
                                               "DiagnosisFullName");
     }
     lstDiagnosisCategories.SelectedIndex = -1;
 }