コード例 #1
0
		/// <summary> setups the sync logic for member _location</summary>
		/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
		private void SetupSyncLocation(IEntityCore relatedEntity)
		{
			if(_location!=relatedEntity)
			{
				DesetupSyncLocation(true, true);
				_location = (LocationEntity)relatedEntity;
				this.PerformSetupSyncRelatedEntity( _location, new PropertyChangedEventHandler( OnLocationPropertyChanged ), "Location", AdventureWorks.Dal.Adapter.v50.RelationClasses.StaticProductInventoryRelations.LocationEntityUsingLocationIdStatic, true, new string[] {  } );
			}
		}
コード例 #2
0
		protected ProductInventoryEntity(SerializationInfo info, StreamingContext context) : base(info, context)
		{
			if(SerializationHelper.Optimization != SerializationOptimization.Fast) 
			{
				_location = (LocationEntity)info.GetValue("_location", typeof(LocationEntity));
				if(_location!=null)
				{
					_location.AfterSave+=new EventHandler(OnEntityAfterSave);
				}
				_product = (ProductEntity)info.GetValue("_product", typeof(ProductEntity));
				if(_product!=null)
				{
					_product.AfterSave+=new EventHandler(OnEntityAfterSave);
				}
				this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
			}
			// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
			// __LLBLGENPRO_USER_CODE_REGION_END
		}
コード例 #3
0
		/// <summary> Removes the sync logic for member _location</summary>
		/// <param name="signalRelatedEntity">If set to true, it will call the related entity's UnsetRelatedEntity method</param>
		/// <param name="resetFKFields">if set to true it will also reset the FK fields pointing to the related entity</param>
		private void DesetupSyncLocation(bool signalRelatedEntity, bool resetFKFields)
		{
			this.PerformDesetupSyncRelatedEntity( _location, new PropertyChangedEventHandler( OnLocationPropertyChanged ), "Location", AdventureWorks.Dal.Adapter.v50.RelationClasses.StaticProductInventoryRelations.LocationEntityUsingLocationIdStatic, true, signalRelatedEntity, "ProductInventories", resetFKFields, new int[] { (int)ProductInventoryFieldIndex.LocationId } );
			_location = null;
		}
コード例 #4
0
 /// <summary> Removes the sync logic for member _location</summary>
 /// <param name="signalRelatedEntity">If set to true, it will call the related entity's UnsetRelatedEntity method</param>
 /// <param name="resetFKFields">if set to true it will also reset the FK fields pointing to the related entity</param>
 private void DesetupSyncLocation(bool signalRelatedEntity, bool resetFKFields)
 {
     this.PerformDesetupSyncRelatedEntity(_location, new PropertyChangedEventHandler(OnLocationPropertyChanged), "Location", AdventureWorks.Dal.Adapter.v50.RelationClasses.StaticWorkOrderRoutingRelations.LocationEntityUsingLocationIdStatic, true, signalRelatedEntity, "WorkOrderRoutings", resetFKFields, new int[] { (int)WorkOrderRoutingFieldIndex.LocationId });
     _location = null;
 }