예제 #1
0
 /// <summary> setups the sync logic for member _stateProvince</summary>
 /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
 private void SetupSyncStateProvince(IEntityCore relatedEntity)
 {
     if (_stateProvince != relatedEntity)
     {
         DesetupSyncStateProvince(true, true);
         _stateProvince = (StateProvinceEntity)relatedEntity;
         this.PerformSetupSyncRelatedEntity(_stateProvince, new PropertyChangedEventHandler(OnStateProvincePropertyChanged), "StateProvince", AdventureWorks.Dal.Adapter.v42.RelationClasses.StaticAddressRelations.StateProvinceEntityUsingStateProvinceIdStatic, true, new string[] {  });
     }
 }
예제 #2
0
 protected SalesTaxRateEntity(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     if (SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _stateProvince = (StateProvinceEntity)info.GetValue("_stateProvince", typeof(StateProvinceEntity));
         if (_stateProvince != null)
         {
             _stateProvince.AfterSave += new EventHandler(OnEntityAfterSave);
         }
         this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
     }
     // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
     // __LLBLGENPRO_USER_CODE_REGION_END
 }
예제 #3
0
 protected AddressEntity(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     if (SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _businessEntityAddresses = (EntityCollection <BusinessEntityAddressEntity>)info.GetValue("_businessEntityAddresses", typeof(EntityCollection <BusinessEntityAddressEntity>));
         _salesOrderHeaders       = (EntityCollection <SalesOrderHeaderEntity>)info.GetValue("_salesOrderHeaders", typeof(EntityCollection <SalesOrderHeaderEntity>));
         _salesOrderHeaders_      = (EntityCollection <SalesOrderHeaderEntity>)info.GetValue("_salesOrderHeaders_", typeof(EntityCollection <SalesOrderHeaderEntity>));
         _stateProvince           = (StateProvinceEntity)info.GetValue("_stateProvince", typeof(StateProvinceEntity));
         if (_stateProvince != null)
         {
             _stateProvince.AfterSave += new EventHandler(OnEntityAfterSave);
         }
         this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
     }
     // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
     // __LLBLGENPRO_USER_CODE_REGION_END
 }
예제 #4
0
 /// <summary> Removes the sync logic for member _stateProvince</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 DesetupSyncStateProvince(bool signalRelatedEntity, bool resetFKFields)
 {
     this.PerformDesetupSyncRelatedEntity(_stateProvince, new PropertyChangedEventHandler(OnStateProvincePropertyChanged), "StateProvince", AdventureWorks.Dal.Adapter.v42.RelationClasses.StaticAddressRelations.StateProvinceEntityUsingStateProvinceIdStatic, true, signalRelatedEntity, "Addresses", resetFKFields, new int[] { (int)AddressFieldIndex.StateProvinceId });
     _stateProvince = null;
 }
		/// <summary> setups the sync logic for member _stateProvince</summary>
		/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
		private void SetupSyncStateProvince(IEntityCore relatedEntity)
		{
			if(_stateProvince!=relatedEntity)
			{
				DesetupSyncStateProvince(true, true);
				_stateProvince = (StateProvinceEntity)relatedEntity;
				this.PerformSetupSyncRelatedEntity( _stateProvince, new PropertyChangedEventHandler( OnStateProvincePropertyChanged ), "StateProvince", AdventureWorks.Dal.Adapter.v42.RelationClasses.StaticSalesTaxRateRelations.StateProvinceEntityUsingStateProvinceIdStatic, true, new string[] {  } );
			}
		}
		/// <summary> Removes the sync logic for member _stateProvince</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 DesetupSyncStateProvince(bool signalRelatedEntity, bool resetFKFields)
		{
			this.PerformDesetupSyncRelatedEntity( _stateProvince, new PropertyChangedEventHandler( OnStateProvincePropertyChanged ), "StateProvince", AdventureWorks.Dal.Adapter.v42.RelationClasses.StaticSalesTaxRateRelations.StateProvinceEntityUsingStateProvinceIdStatic, true, signalRelatedEntity, "SalesTaxRates", resetFKFields, new int[] { (int)SalesTaxRateFieldIndex.StateProvinceId } );
			_stateProvince = null;
		}
		protected SalesTaxRateEntity(SerializationInfo info, StreamingContext context) : base(info, context)
		{
			if(SerializationHelper.Optimization != SerializationOptimization.Fast) 
			{
				_stateProvince = (StateProvinceEntity)info.GetValue("_stateProvince", typeof(StateProvinceEntity));
				if(_stateProvince!=null)
				{
					_stateProvince.AfterSave+=new EventHandler(OnEntityAfterSave);
				}
				this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
			}
			// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
			// __LLBLGENPRO_USER_CODE_REGION_END
		}
예제 #8
0
		protected AddressEntity(SerializationInfo info, StreamingContext context) : base(info, context)
		{
			if(SerializationHelper.Optimization != SerializationOptimization.Fast) 
			{
				_businessEntityAddresses = (EntityCollection<BusinessEntityAddressEntity>)info.GetValue("_businessEntityAddresses", typeof(EntityCollection<BusinessEntityAddressEntity>));
				_salesOrderHeaders = (EntityCollection<SalesOrderHeaderEntity>)info.GetValue("_salesOrderHeaders", typeof(EntityCollection<SalesOrderHeaderEntity>));
				_salesOrderHeaders_ = (EntityCollection<SalesOrderHeaderEntity>)info.GetValue("_salesOrderHeaders_", typeof(EntityCollection<SalesOrderHeaderEntity>));
				_stateProvince = (StateProvinceEntity)info.GetValue("_stateProvince", typeof(StateProvinceEntity));
				if(_stateProvince!=null)
				{
					_stateProvince.AfterSave+=new EventHandler(OnEntityAfterSave);
				}
				this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
			}
			// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
			// __LLBLGENPRO_USER_CODE_REGION_END
		}