private PropertyLocation GetZielort(OperationData entity) { PropertyLocation pl = new PropertyLocation(); pl.Street = entity.ZielortStreet; pl.StreetNumber = entity.ZielortStreetNumber; pl.ZipCode = entity.ZielortZipCode; pl.City = entity.ZielortCity; pl.Intersection = entity.ZielortIntersection; pl.Location = entity.ZielortLocation; pl.Property = entity.ZielortProperty; string[] latlng = entity.ZielortLatLng.Split(';'); pl.GeoLatitude = latlng[0]; pl.GeoLongitude = latlng[1]; return(pl); }
Operation IOperationServiceInternal.StoreOperation(Operation operation) { using (OperationManagementEntities entities = EntityFrameworkHelper.CreateContext<OperationManagementEntities>(EdmxPath)) { OperationData data = new OperationData(operation); entities.Operations.AddObject(data); entities.SaveChanges(); operation.Id = data.Id; return operation; } }
private PropertyLocation GetZielort(OperationData entity) { PropertyLocation pl = new PropertyLocation(); pl.Street = entity.ZielortStreet; pl.StreetNumber = entity.ZielortStreetNumber; pl.ZipCode = entity.ZielortZipCode; pl.City = entity.ZielortCity; pl.Intersection = entity.ZielortIntersection; pl.Location = entity.ZielortLocation; pl.Property = entity.ZielortProperty; string[] latlng = entity.ZielortLatLng.Split(';'); pl.GeoLatitude = latlng[0]; pl.GeoLongitude = latlng[1]; return pl; }
/// <summary> /// Deprecated Method for adding a new object to the Operations EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToOperations(OperationData operationData) { base.AddObject("Operations", operationData); }
/// <summary> /// Create a new OperationData object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="isAcknowledged">Initial value of the IsAcknowledged property.</param> /// <param name="timestampIncome">Initial value of the TimestampIncome property.</param> /// <param name="timestampAlarm">Initial value of the TimestampAlarm property.</param> /// <param name="operationGuid">Initial value of the OperationGuid property.</param> public static OperationData CreateOperationData(global::System.Int32 id, global::System.Boolean isAcknowledged, global::System.DateTime timestampIncome, global::System.DateTime timestampAlarm, global::System.Guid operationGuid) { OperationData operationData = new OperationData(); operationData.Id = id; operationData.IsAcknowledged = isAcknowledged; operationData.TimestampIncome = timestampIncome; operationData.TimestampAlarm = timestampAlarm; operationData.OperationGuid = operationGuid; return operationData; }