/// ------------------------------------------------------------------------------------------------
        #region public functions

        /// <summary>
        /// Refresh the list of vists data
        /// </summary>
        public void OnRefreshList()
        {
            List <CreateVisitsList> VisitsList;
            CreateVisitsList        VisitsData;

            Lstvw_Main.BeginRefresh();
            IndexMapping iMap;

            iMap = AppData.PropertyModel.SelectedRecord.IndexMap;
            iMap = new IndexMapping(iMap.Property, iMap.RequestGroup, iMap.Record, 0);
            var InspectionList = AppData.PropertyModel.EntityFromMapping(iMap) as SRiInspection;

            VisitsList = new List <CreateVisitsList>();
            var visitcount = InspectionList.Visits.Count;

            for (int j = 0; j < visitcount; j++)
            {
                var data = InspectionList.Visits[j];
                VisitsData = new CreateVisitsList()
                {
                    VisitTypeDescription = data.VisitTypeDescription,
                    ScheduleDate         = data.Visit.DateScheduled.ToString("dd MMM yyyy", "Scheduled for ", "Not scheduled"),
                    CompletedDate        = data.Visit.DateVisit.ToString("dd MMM yyyy", "Completed on ", "Outstanding"),
                    VisitListIndex       = j
                };
                VisitsList.Add(VisitsData);
            }
            Lstvw_Main.ItemsSource   = VisitsList;
            Lstvw_Main.HeightRequest = (VisitsList.Count * 110) + 40;
            Lstvw_Main.EndRefresh();
            GC.Collect();
        }
        /// ------------------------------------------------------------------------------------------------

        /// ------------------------------------------------------------------------------------------------
        #region private functions
        /// <summary>
        /// Refresh the list of vists data
        /// </summary>
        private void OnRefreshList()
        {
            try
            {
                Lstvw_Main.BeginRefresh();
                var iMap = AppData.PropertyModel.SelectedRecord.IndexMap;
                iMap = new IndexMapping(iMap.Property, iMap.RequestGroup, iMap.Record, 0);
                var inspectionList = AppData.PropertyModel.EntityFromMapping(iMap) as SRiInspection;
                var visitsList     = new List <CreateVisitsList>();
                if (inspectionList != null)
                {
                    var visitcount = inspectionList.Visits.Count;
                    for (int j = 0; j < visitcount; j++)
                    {
                        var data       = inspectionList.Visits[j];
                        var visitsData = new CreateVisitsList()
                        {
                            VisitTypeDescription = data.VisitTypeDescription,
                            ScheduleDate         = data.Visit.DateScheduled.ToString("dd MMM yyyy", "Scheduled for ", "Not scheduled"),
                            CompletedDate        = data.Visit.DateVisit.ToString("dd MMM yyyy", "Completed on ", "Outstanding"),
                            VisitListIndex       = j
                        };
                        visitsList.Add(visitsData);
                    }
                }
                Lstvw_Main.ItemsSource   = visitsList;
                Lstvw_Main.HeightRequest = visitsList.Count * 100;
                Lstvw_Main.EndRefresh();
                GC.Collect();
            }
            catch (Exception ex)
            {
                LogTracking.LogTrace(ex.ToString());
            }
        }
        ///
        /// ------------------------------------------------------------------------------------------------
        /// Name            RefreshList
        /// ------------------------------------------------------------------------------------------------
        ///
        /// <summary>       Refresh the list after the action is added
        /// </summary>
        /// ------------------------------------------------------------------------------------------------
        ///
        private void OnRefreshList()
        {
            _lstVisitsAction.Clear();
            Lstvw_Main.BeginRefresh();
            var details = AppData.PropertyModel.SelectedVisit.Visit.Visit;

            LoadActionList(details);
            Lstvw_Main.EndRefresh();
        }
 /// ------------------------------------------------------------------------------------------------
 /// Name            RefreshList
 /// ------------------------------------------------------------------------------------------------
 ///
 /// <summary>       Refresh the list after the action is added
 /// </summary>
 /// ------------------------------------------------------------------------------------------------
 ///
 private void OnRefreshList()
 {
     try
     {
         _lstVisitsAction.Clear();
         Lstvw_Main.BeginRefresh();
         var details = AppData.PropertyModel.SelectedVisit.Visit.Visit;
         LoadActionList(details);
         Lstvw_Main.EndRefresh();
     }
     catch (Exception ex)
     {
         LogTracking.LogTrace(ex.ToString());
     }
 }