Esempio n. 1
0
 /// <summary> setups the sync logic for member _specialOffer</summary>
 /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
 private void SetupSyncSpecialOffer(IEntityCore relatedEntity)
 {
     if (_specialOffer != relatedEntity)
     {
         DesetupSyncSpecialOffer(true, true);
         _specialOffer = (SpecialOfferEntity)relatedEntity;
         this.PerformSetupSyncRelatedEntity(_specialOffer, new PropertyChangedEventHandler(OnSpecialOfferPropertyChanged), "SpecialOffer", AdventureWorks.Dal.Adapter.v42.RelationClasses.StaticSpecialOfferProductRelations.SpecialOfferEntityUsingSpecialOfferIdStatic, true, new string[] {  });
     }
 }
Esempio n. 2
0
 protected SpecialOfferProductEntity(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     if (SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _salesOrderDetails = (EntityCollection <SalesOrderDetailEntity>)info.GetValue("_salesOrderDetails", typeof(EntityCollection <SalesOrderDetailEntity>));
         _product           = (ProductEntity)info.GetValue("_product", typeof(ProductEntity));
         if (_product != null)
         {
             _product.AfterSave += new EventHandler(OnEntityAfterSave);
         }
         _specialOffer = (SpecialOfferEntity)info.GetValue("_specialOffer", typeof(SpecialOfferEntity));
         if (_specialOffer != null)
         {
             _specialOffer.AfterSave += new EventHandler(OnEntityAfterSave);
         }
         this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
     }
     // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
     // __LLBLGENPRO_USER_CODE_REGION_END
 }
Esempio n. 3
0
 /// <summary> Removes the sync logic for member _specialOffer</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 DesetupSyncSpecialOffer(bool signalRelatedEntity, bool resetFKFields)
 {
     this.PerformDesetupSyncRelatedEntity(_specialOffer, new PropertyChangedEventHandler(OnSpecialOfferPropertyChanged), "SpecialOffer", AdventureWorks.Dal.Adapter.v42.RelationClasses.StaticSpecialOfferProductRelations.SpecialOfferEntityUsingSpecialOfferIdStatic, true, signalRelatedEntity, "SpecialOfferProducts", resetFKFields, new int[] { (int)SpecialOfferProductFieldIndex.SpecialOfferId });
     _specialOffer = null;
 }
		/// <summary> setups the sync logic for member _specialOffer</summary>
		/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
		private void SetupSyncSpecialOffer(IEntityCore relatedEntity)
		{
			if(_specialOffer!=relatedEntity)
			{
				DesetupSyncSpecialOffer(true, true);
				_specialOffer = (SpecialOfferEntity)relatedEntity;
				this.PerformSetupSyncRelatedEntity( _specialOffer, new PropertyChangedEventHandler( OnSpecialOfferPropertyChanged ), "SpecialOffer", AdventureWorks.Dal.Adapter.v42.RelationClasses.StaticSpecialOfferProductRelations.SpecialOfferEntityUsingSpecialOfferIdStatic, true, new string[] {  } );
			}
		}
		/// <summary> Removes the sync logic for member _specialOffer</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 DesetupSyncSpecialOffer(bool signalRelatedEntity, bool resetFKFields)
		{
			this.PerformDesetupSyncRelatedEntity( _specialOffer, new PropertyChangedEventHandler( OnSpecialOfferPropertyChanged ), "SpecialOffer", AdventureWorks.Dal.Adapter.v42.RelationClasses.StaticSpecialOfferProductRelations.SpecialOfferEntityUsingSpecialOfferIdStatic, true, signalRelatedEntity, "SpecialOfferProducts", resetFKFields, new int[] { (int)SpecialOfferProductFieldIndex.SpecialOfferId } );
			_specialOffer = null;
		}
		protected SpecialOfferProductEntity(SerializationInfo info, StreamingContext context) : base(info, context)
		{
			if(SerializationHelper.Optimization != SerializationOptimization.Fast) 
			{
				_salesOrderDetails = (EntityCollection<SalesOrderDetailEntity>)info.GetValue("_salesOrderDetails", typeof(EntityCollection<SalesOrderDetailEntity>));
				_product = (ProductEntity)info.GetValue("_product", typeof(ProductEntity));
				if(_product!=null)
				{
					_product.AfterSave+=new EventHandler(OnEntityAfterSave);
				}
				_specialOffer = (SpecialOfferEntity)info.GetValue("_specialOffer", typeof(SpecialOfferEntity));
				if(_specialOffer!=null)
				{
					_specialOffer.AfterSave+=new EventHandler(OnEntityAfterSave);
				}
				this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
			}
			// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
			// __LLBLGENPRO_USER_CODE_REGION_END
		}