Exemplo n.º 1
0
        internal void UpdatePointFromVisibility(GeoCalcPoint point)
        {
            _log.DebugEx("> UpdatePoint START.");

            GeoCalculatiorFacade.UpdateUserSessionPoint(point);

            _log.DebugEx("> UpdatePoint END.");
        }
Exemplo n.º 2
0
        public void UpdateUserPoint(GeoCalcPoint point)
        {
            log.InfoEx($"UpdateUserPoint. Processing Id: {point.GuidId}");
            var pointEntity = context.GeoCalcSessionPoints.FirstOrDefault(entity => entity.id == point.GuidId);

            if (pointEntity != null)
            {
                pointEntity.Update(point);
                Submit();

                log.InfoEx($"GeoCalcPoint {point.GuidId} was successfully updated");
            }
            else
            {
                pointEntity = point.Get();
                context.GeoCalcSessionPoints.InsertOnSubmit(pointEntity);
                Submit();

                log.InfoEx($"GeoCalcPoint {point.GuidId} was successfully added");
            }
        }
Exemplo n.º 3
0
 public static void UpdateUserSessionPoint(GeoCalcPoint point)
 {
     log.InfoEx("> UpdateUserSessionPoint START");
     if (point != null)
     {
         try
         {
             using (var accessor = new GeoCalculatorDataAccess())
             {
                 accessor.UpdateUserPoint(point);
             }
         }
         catch (Exception ex)
         {
             log.InfoEx("> UpdateUserSessionPoint Exception: {0}", ex.Message);
         }
     }
     else
     {
         log.InfoEx("UpdateUserSessionPoint point == null");
     }
     log.InfoEx("> UpdateUserSessionPoint END");
 }