private void btnRemoveFromList_OS_Click(object sender, EventArgs e)
        {
            if (AddedEOMSign_OS == null || AddedEOMSign_OS.Count == 0)
            {
                XtraMessageBox.Show(
                    "You should select at least one Segment Sign to be remove." + "\r\n" +
                    "You can select one or more Segment Signs to remove", "Note", MessageBoxButtons.OK, MessageBoxIcon.Hand,
                    MessageBoxDefaultButton.Button1, DefaultBoolean.Default);
                return;
            }

            foreach (object selectedItem in lstAddedEOMSign_OS.SelectedItems)
            {
                if (selectedItem is SegmentSign_cu)
                {
                    SegmentSign_cu segment = SegmentSign_cu.ItemsList.Find(item =>
                                                                           Convert.ToInt32(item.ID).Equals(Convert.ToInt32(((SegmentSign_cu)selectedItem).ID)));
                    if (segment != null)
                    {
                        if (AddedEOMSign_OS.Exists(item =>
                                                   Convert.ToInt32(item.ID).Equals(Convert.ToInt32(((SegmentSign_cu)selectedItem).ID))))
                        {
                            AddedEOMSign_OS.Remove(segment);
                        }
                        VisitTiming_EOMSign visitTimingEOM =
                            PEMRBusinessLogic.ActivePEMRObject.List_VisitTiming_EOMSign.Find(item =>
                                                                                             Convert.ToInt32(item.SegmentSign_CU_ID).Equals(Convert.ToInt32(segment.ID)) &&
                                                                                             Convert.ToInt32(item.Eye_P_ID).Equals(Convert.ToInt32(DB_EyeType_p.OS)));
                        if (visitTimingEOM != null)
                        {
                            visitTimingEOM.PEMRElementStatus = PEMRElementStatus.Removed;
                        }
                        PEMRBusinessLogic.Remove_VisitTiming_EOMSign(visitTimingEOM);
                    }
                }
            }

            TempEOMSignListToBeAdded_OS = null;
            CommonViewsActions.FillListBoxControl(lstAddedEOMSign_OS, AddedEOMSign_OS);
            lstAddedEOMSign_OS.Refresh();
            SetCount_OS();
            SetCount_OS();
            lstEOMSign_OS.SelectedIndex = -1;
        }
        private void btnAddList_OS_Click(object sender, EventArgs e)
        {
            if (TempEOMSignListToBeAdded_OS == null || TempEOMSignListToBeAdded_OS.Count == 0)
            {
                XtraMessageBox.Show(
                    "You should select at least one Anterior Segment Sign to be added." + "\r\n" +
                    "You can select one or more Anterior Segment Sign to add", "Note", MessageBoxButtons.OK,
                    MessageBoxIcon.Hand);
                return;
            }

            if (AddedEOMSign_OS == null)
            {
                AddedEOMSign_OS = new List <SegmentSign_cu>();
            }
            if (TempEOMSignListToBeAdded_OS != null && TempEOMSignListToBeAdded_OS.Count > 0)
            {
                foreach (SegmentSign_cu segmentSign in TempEOMSignListToBeAdded_OS)
                {
                    if (!AddedEOMSign_OS.Exists(item =>
                                                Convert.ToInt32(item.ID).Equals(Convert.ToInt32(segmentSign.ID))))
                    {
                        AddedEOMSign_OS.Add(segmentSign);
                        if (PEMRBusinessLogic.ActivePEMRObject.List_VisitTiming_MainEOMSign == null)
                        {
                            PEMRBusinessLogic.ActivePEMRObject.List_VisitTiming_MainEOMSign =
                                new List <VisitTiming_MainEOMSign>();
                            _mainEOMSign = PEMRBusinessLogic.CreateNew_VisitTiming_MainEOMSign(
                                FurtherDetails_OD, FurtherDetails_OS,
                                ApplicationStaticConfiguration.PEMRSavingMode);
                            PEMRBusinessLogic.ActivePEMRObject.List_VisitTiming_MainEOMSign.Add(
                                _mainEOMSign);
                        }

                        if (PEMRBusinessLogic.ActivePEMRObject.List_VisitTiming_MainEOMSign[0] != null)
                        {
                            if (!string.IsNullOrEmpty(txtReccommednations_OD.Text) ||
                                !string.IsNullOrWhiteSpace(txtReccommednations_OD.Text))
                            {
                                PEMRBusinessLogic.ActivePEMRObject.List_VisitTiming_MainEOMSign[0].GeneralDescription_OD
                                    = txtReccommednations_OD.Text;
                            }
                            else
                            {
                                PEMRBusinessLogic.ActivePEMRObject.List_VisitTiming_MainEOMSign[0]
                                .GeneralDescription_OD = null;
                            }
                        }

                        if (PEMRBusinessLogic.ActivePEMRObject.List_VisitTiming_EOMSign == null)
                        {
                            PEMRBusinessLogic.ActivePEMRObject.List_VisitTiming_EOMSign =
                                new List <VisitTiming_EOMSign>();
                        }
                        _visitTimingEOM = PEMRBusinessLogic.CreateNew_VisitTiming_EOMSign(
                            PEMRBusinessLogic.ActivePEMRObject.List_VisitTiming_MainEOMSign[0], segmentSign,
                            DB_EyeType_p.OS, ApplicationStaticConfiguration.ActiveLoginUser.Person_CU_ID,
                            DB_PEMRSavingMode.SaveImmediately);
                        if (_visitTimingEOM != null)
                        {
                            PEMRBusinessLogic.ActivePEMRObject.List_VisitTiming_EOMSign.Add(
                                _visitTimingEOM);
                        }
                    }
                }
            }

            TempEOMSignListToBeAdded_OS = null;
            CommonViewsActions.FillListBoxControl(lstAddedEOMSign_OS, AddedEOMSign_OS);
            lstAddedEOMSign_OS.Refresh();
            SetCount_OS();
            SetCount_OS();
            lstEOMSign_OS.SelectedIndex = -1;
        }