コード例 #1
0
		/// <summary> Removes the sync logic for member _salesOrderHeader</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 DesetupSyncSalesOrderHeader(bool signalRelatedEntity, bool resetFKFields)
		{
			this.PerformDesetupSyncRelatedEntity( _salesOrderHeader, new PropertyChangedEventHandler( OnSalesOrderHeaderPropertyChanged ), "SalesOrderHeader", AdventureWorks.Dal.Adapter.v50.RelationClasses.StaticSalesOrderDetailRelations.SalesOrderHeaderEntityUsingSalesOrderIdStatic, true, signalRelatedEntity, "SalesOrderDetails", resetFKFields, new int[] { (int)SalesOrderDetailFieldIndex.SalesOrderId } );
			_salesOrderHeader = null;
		}
コード例 #2
0
		/// <summary> setups the sync logic for member _salesOrderHeader</summary>
		/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
		private void SetupSyncSalesOrderHeader(IEntityCore relatedEntity)
		{
			if(_salesOrderHeader!=relatedEntity)
			{
				DesetupSyncSalesOrderHeader(true, true);
				_salesOrderHeader = (SalesOrderHeaderEntity)relatedEntity;
				this.PerformSetupSyncRelatedEntity( _salesOrderHeader, new PropertyChangedEventHandler( OnSalesOrderHeaderPropertyChanged ), "SalesOrderHeader", AdventureWorks.Dal.Adapter.v50.RelationClasses.StaticSalesOrderDetailRelations.SalesOrderHeaderEntityUsingSalesOrderIdStatic, true, new string[] {  } );
			}
		}
コード例 #3
0
		protected SalesOrderDetailEntity(SerializationInfo info, StreamingContext context) : base(info, context)
		{
			if(SerializationHelper.Optimization != SerializationOptimization.Fast) 
			{
				_salesOrderHeader = (SalesOrderHeaderEntity)info.GetValue("_salesOrderHeader", typeof(SalesOrderHeaderEntity));
				if(_salesOrderHeader!=null)
				{
					_salesOrderHeader.AfterSave+=new EventHandler(OnEntityAfterSave);
				}
				_specialOfferProduct = (SpecialOfferProductEntity)info.GetValue("_specialOfferProduct", typeof(SpecialOfferProductEntity));
				if(_specialOfferProduct!=null)
				{
					_specialOfferProduct.AfterSave+=new EventHandler(OnEntityAfterSave);
				}
				this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
			}
			// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
			// __LLBLGENPRO_USER_CODE_REGION_END
		}