public GeographicalPosition(IGeographicalPosition position)
 {
     this.Id               = position.Id;
     this.TaxyId           = position.TaxyId;
     this.DriverId         = position.DriverId;
     this.TravelId         = position.TravelId;
     this.Latitude         = position.Latitude;
     this.Longitude        = position.Longitude;
     this.RegistrationDate = position.RegistrationDate;
 }
        public async Task SetCurrentPosition(IGeographicalPosition currentPosition)
        {
            GeographicalPositionEntity currentPositionEntity = new GeographicalPositionEntity(currentPosition);

            using (AzureManager azureManager = new AzureManager(SettingProvider.Instance.GetString(Constants.STORAGE),
                                                                SettingProvider.Instance.GetInt(Constants.MAXATTEMPTS), SettingProvider.Instance.GetInt(Constants.WAITSECONDS)))
            {
                azureManager.InsertOrReplaceEntity(SettingProvider.Instance.GetString(Constants.WATNAME), currentPositionEntity, true);

                await Task.CompletedTask;
            }
        }
 public GeographicalPositionEntity(IGeographicalPosition position)
 {
     this.Id               = position.Id;
     this.TaxyId           = position.TaxyId;
     this.DriverId         = position.DriverId;
     this.TravelId         = position.TravelId;
     this.Latitude         = position.Latitude;
     this.Longitude        = position.Longitude;
     this.RegistrationDate = position.RegistrationDate;
     this.PartitionKey     = position.TravelId.ToString().ToUpperInvariant();
     this.RowKey           = position.TaxyId.ToString().ToUpperInvariant();
 }
Beispiel #4
0
        public async Task SetPositionHistory(IGeographicalPosition position)
        {
            using (DataManager dataManager = new DataManager(SettingProvider.Instance.GetString(Constants.DATABASE), Provider.SqlServer))
            {
                IDataParameter[] parameters = new IDataParameter[7];

                parameters[0] = new SqlParameter("@Id", position.Id);
                parameters[1] = new SqlParameter("@TaxyId", position.TaxyId);
                parameters[2] = new SqlParameter("@DriverId", position.DriverId);
                parameters[3] = new SqlParameter("@TravelId", position.TravelId);
                parameters[4] = new SqlParameter("@Latitude", position.Latitude);
                parameters[5] = new SqlParameter("@Longitude", position.Longitude);
                parameters[6] = new SqlParameter("@RegistrationDate", position.RegistrationDate);

                dataManager.Execute("[gbm].[SetPositionHistory]", parameters);

                await Task.CompletedTask;
            }
        }
 public async Task SetPositionHistory(IGeographicalPosition position)
 {
     throw new NotImplementedException("Método no implementado.");
 }
Beispiel #6
0
 public async Task SetPositionHistory(IGeographicalPosition position)
 {
     await DataEngine.SetPositionHistory(position);
 }
Beispiel #7
0
 public async Task SetCurrentPosition(IGeographicalPosition currentPosition)
 {
     await DataEngine.SetCurrentPosition(currentPosition);
 }