private void btnSave_Click(object sender, EventArgs e)
 {
     if (PEMRBusinessLogic.ActivePEMRObject != null)
     {
         if (PEMRBusinessLogic.ActivePEMRObject.List_VisitTiming_MainDiagnosis == null ||
             PEMRBusinessLogic.ActivePEMRObject.List_VisitTiming_MainDiagnosis.Count == 0)
         {
             _mainVisitDiagnosis = PEMRBusinessLogic.CreateNew_VisitTiming_MainDiagnosis(FurtherDetails,
                                                                                         DiagnosisType, DB_PEMRSavingMode.SaveImmediately);
             if (_mainVisitDiagnosis == null)
             {
                 return;
             }
             if (PEMRBusinessLogic.ActivePEMRObject.List_VisitTiming_MainDiagnosis == null)
             {
                 PEMRBusinessLogic.ActivePEMRObject.List_VisitTiming_MainDiagnosis = new List <VisitTiming_MainDiagnosis>();
             }
             PEMRBusinessLogic.ActivePEMRObject.List_VisitTiming_MainDiagnosis.Add(_mainVisitDiagnosis);
             XtraMessageBox.Show("Saved Successfully", "Saved", MessageBoxButtons.OK,
                                 MessageBoxIcon.Information);
         }
         else
         {
             if (_mainVisitDiagnosis == null)
             {
                 return;
             }
             if (PEMRBusinessLogic.Update_VisitTiming_MainDiagnosis(this, _mainVisitDiagnosis))
             {
                 XtraMessageBox.Show("Saved Successfully", "Saved", MessageBoxButtons.OK,
                                     MessageBoxIcon.Information);
             }
         }
     }
 }