Esempio n. 1
0
        public TrackerDto GetTrackerDto()
        {
            var currentTracker = Tracker.Current;

            var trackerDto = new TrackerDto
            {
                CurrentPage = new CurrentPage {
                    Url = currentTracker.CurrentPage.Url
                },
                IsActive         = currentTracker.IsActive,
                Contact          = GetContact(),
                Interaction      = GetInteractions(currentTracker.Interaction),
                Facets           = this.GetContact().Facets.ToList(),
                PagesViewed      = LoadPages(),
                GoalsList        = eventRepository.GetCurrentGoals().ToList(),
                PastGoals        = eventRepository.GetHistoricGoals().ToList(),
                ListsAutomations = listsAutomationsRepository.GetCurrent(),
                CurrentCampaign  = campaignRepository.GetCurrent(),
                PastCampaigns    = campaignRepository.GetHistoric(),
                CurrentProfiles  = GetCurrentProfiles(),
                PastProfiles     = GetPastProfiles(),
                Classification   = currentTracker.Session.Contact.System.Classification
            };

            return(trackerDto);
        }
        public ActionResult Details()
        {
            var model = new TrackerDto();

            try
            {
                var contactRepository = new ContactRepository(DependencyResolver.Current.GetService <IServiceProvider>());
                model = contactRepository.GetTrackerDto();
                return(View(model));
            }
            catch
            {
                return(View(model));
            }
        }