Ejemplo n.º 1
0
 private void PopulateLatestVisit(IndexedVisit visit, ref DataRow row)
 {
     row[Schema.LatestVisitValue.Name]         = visit.Value;
     row[Schema.LatestVisitStartDateTime.Name] = visit.StartDateTime;
     row[Schema.LatestVisitEndDateTime.Name]   = visit.EndDateTime;
     row[Schema.LatestVisitDuration.Name]      = Calculator.GetDuration(visit.StartDateTime, visit.EndDateTime);
     if (visit.WhoIs == null)
     {
         return;
     }
     row[Schema.LatestVisitCityDisplayName.Name]    = visit.WhoIs.City;
     row[Schema.LatestVisitCountryDisplayName.Name] = visit.WhoIs.Country;
     row[Schema.LatestVisitRegionDisplayName.Name]  = visit.WhoIs.Region;
     row["VisitIp"] = visit.WhoIs.Ip;
 }
Ejemplo n.º 2
0
 private void PopulateLatestVisit(IndexedVisit visit, ref IContactSearchResult contact)
 {
     contact.LatestVisitId            = visit.InteractionId;
     contact.LatestVisitStartDateTime = visit.StartDateTime;
     contact.LatestVisitEndDateTime   = visit.EndDateTime;
     contact.LatestVisitPageViewCount = visit.VisitPageCount;
     contact.LatestVisitValue         = visit.Value;
     contact.ValuePerVisit            = Calculator.GetAverageValue(contact.Value, contact.VisitCount);
     if (visit.WhoIs == null)
     {
         return;
     }
     contact.LatestVisitLocationCityDisplayName    = visit.WhoIs.City;
     contact.LatestVisitLocationCountryDisplayName = visit.WhoIs.Country;
     contact.LatestVisitLocationRegionDisplayName  = visit.WhoIs.Region;
     contact.LatestVisitLocationId = visit.LocationId;
 }