Example #1
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     if (PEMRBusinessLogic.ActivePEMRObject != null)
     {
         if (PEMRBusinessLogic.ActivePEMRObject.List_VisitTiming_MainAdnexaSegmentSign == null ||
             PEMRBusinessLogic.ActivePEMRObject.List_VisitTiming_MainAdnexaSegmentSign.Count == 0)
         {
             _mainAdnexaSegmentSign = PEMRBusinessLogic.CreateNew_VisitTiming_MainAdnexaSegmentSign(FurtherDetails_OD, FurtherDetails_OD,
                                                                                                    ApplicationStaticConfiguration.PEMRSavingMode);
             if (_mainAdnexaSegmentSign == null)
             {
                 return;
             }
             if (PEMRBusinessLogic.ActivePEMRObject.List_VisitTiming_MainAdnexaSegmentSign == null)
             {
                 PEMRBusinessLogic.ActivePEMRObject.List_VisitTiming_MainAdnexaSegmentSign = new List <VisitTiming_MainAdnexaSegmentSign>();
             }
             PEMRBusinessLogic.ActivePEMRObject.List_VisitTiming_MainAdnexaSegmentSign.Add(_mainAdnexaSegmentSign);
             XtraMessageBox.Show("Saved Successfully", "Saved", MessageBoxButtons.OK,
                                 MessageBoxIcon.Information);
         }
         else
         {
             if (_mainAdnexaSegmentSign == null)
             {
                 return;
             }
             if (PEMRBusinessLogic.Update_VisitTiming_MainAdnexaSegmentSign(this, _mainAdnexaSegmentSign))
             {
                 XtraMessageBox.Show("Saved Successfully", "Saved", MessageBoxButtons.OK,
                                     MessageBoxIcon.Information);
             }
         }
     }
 }