示例#1
0
 /// <summary> setups the sync logic for member _currency_</summary>
 /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
 private void SetupSyncCurrency_(IEntityCore relatedEntity)
 {
     if (_currency_ != relatedEntity)
     {
         DesetupSyncCurrency_(true, true);
         _currency_ = (CurrencyEntity)relatedEntity;
         this.PerformSetupSyncRelatedEntity(_currency_, new PropertyChangedEventHandler(OnCurrency_PropertyChanged), "Currency_", AdventureWorks.Dal.Adapter.v50.RelationClasses.StaticCurrencyRateRelations.CurrencyEntityUsingToCurrencyCodeStatic, true, new string[] {  });
     }
 }
 protected CountryRegionCurrencyEntity(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     if (SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _countryRegion = (CountryRegionEntity)info.GetValue("_countryRegion", typeof(CountryRegionEntity));
         if (_countryRegion != null)
         {
             _countryRegion.AfterSave += new EventHandler(OnEntityAfterSave);
         }
         _currency = (CurrencyEntity)info.GetValue("_currency", typeof(CurrencyEntity));
         if (_currency != null)
         {
             _currency.AfterSave += new EventHandler(OnEntityAfterSave);
         }
         this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
     }
     // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
     // __LLBLGENPRO_USER_CODE_REGION_END
 }
示例#3
0
 protected CurrencyRateEntity(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     if (SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _salesOrderHeaders = (EntityCollection <SalesOrderHeaderEntity>)info.GetValue("_salesOrderHeaders", typeof(EntityCollection <SalesOrderHeaderEntity>));
         _currency          = (CurrencyEntity)info.GetValue("_currency", typeof(CurrencyEntity));
         if (_currency != null)
         {
             _currency.AfterSave += new EventHandler(OnEntityAfterSave);
         }
         _currency_ = (CurrencyEntity)info.GetValue("_currency_", typeof(CurrencyEntity));
         if (_currency_ != null)
         {
             _currency_.AfterSave += new EventHandler(OnEntityAfterSave);
         }
         this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
     }
     // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
     // __LLBLGENPRO_USER_CODE_REGION_END
 }
 /// <summary> Removes the sync logic for member _currency</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 DesetupSyncCurrency(bool signalRelatedEntity, bool resetFKFields)
 {
     this.PerformDesetupSyncRelatedEntity(_currency, new PropertyChangedEventHandler(OnCurrencyPropertyChanged), "Currency", AdventureWorks.Dal.Adapter.v50.RelationClasses.StaticCountryRegionCurrencyRelations.CurrencyEntityUsingCurrencyCodeStatic, true, signalRelatedEntity, "CountryRegionCurrencies", resetFKFields, new int[] { (int)CountryRegionCurrencyFieldIndex.CurrencyCode });
     _currency = null;
 }
		/// <summary> setups the sync logic for member _currency</summary>
		/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
		private void SetupSyncCurrency(IEntityCore relatedEntity)
		{
			if(_currency!=relatedEntity)
			{
				DesetupSyncCurrency(true, true);
				_currency = (CurrencyEntity)relatedEntity;
				this.PerformSetupSyncRelatedEntity( _currency, new PropertyChangedEventHandler( OnCurrencyPropertyChanged ), "Currency", AdventureWorks.Dal.Adapter.v50.RelationClasses.StaticCountryRegionCurrencyRelations.CurrencyEntityUsingCurrencyCodeStatic, true, new string[] {  } );
			}
		}
		/// <summary> Removes the sync logic for member _currency</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 DesetupSyncCurrency(bool signalRelatedEntity, bool resetFKFields)
		{
			this.PerformDesetupSyncRelatedEntity( _currency, new PropertyChangedEventHandler( OnCurrencyPropertyChanged ), "Currency", AdventureWorks.Dal.Adapter.v50.RelationClasses.StaticCountryRegionCurrencyRelations.CurrencyEntityUsingCurrencyCodeStatic, true, signalRelatedEntity, "CountryRegionCurrencies", resetFKFields, new int[] { (int)CountryRegionCurrencyFieldIndex.CurrencyCode } );
			_currency = null;
		}
		protected CountryRegionCurrencyEntity(SerializationInfo info, StreamingContext context) : base(info, context)
		{
			if(SerializationHelper.Optimization != SerializationOptimization.Fast) 
			{
				_countryRegion = (CountryRegionEntity)info.GetValue("_countryRegion", typeof(CountryRegionEntity));
				if(_countryRegion!=null)
				{
					_countryRegion.AfterSave+=new EventHandler(OnEntityAfterSave);
				}
				_currency = (CurrencyEntity)info.GetValue("_currency", typeof(CurrencyEntity));
				if(_currency!=null)
				{
					_currency.AfterSave+=new EventHandler(OnEntityAfterSave);
				}
				this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
			}
			// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
			// __LLBLGENPRO_USER_CODE_REGION_END
		}
		/// <summary> Removes the sync logic for member _currency_</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 DesetupSyncCurrency_(bool signalRelatedEntity, bool resetFKFields)
		{
			this.PerformDesetupSyncRelatedEntity( _currency_, new PropertyChangedEventHandler( OnCurrency_PropertyChanged ), "Currency_", AdventureWorks.Dal.Adapter.v50.RelationClasses.StaticCurrencyRateRelations.CurrencyEntityUsingToCurrencyCodeStatic, true, signalRelatedEntity, "CurrencyRates_", resetFKFields, new int[] { (int)CurrencyRateFieldIndex.ToCurrencyCode } );
			_currency_ = null;
		}
		protected CurrencyRateEntity(SerializationInfo info, StreamingContext context) : base(info, context)
		{
			if(SerializationHelper.Optimization != SerializationOptimization.Fast) 
			{
				_salesOrderHeaders = (EntityCollection<SalesOrderHeaderEntity>)info.GetValue("_salesOrderHeaders", typeof(EntityCollection<SalesOrderHeaderEntity>));
				_currency = (CurrencyEntity)info.GetValue("_currency", typeof(CurrencyEntity));
				if(_currency!=null)
				{
					_currency.AfterSave+=new EventHandler(OnEntityAfterSave);
				}
				_currency_ = (CurrencyEntity)info.GetValue("_currency_", typeof(CurrencyEntity));
				if(_currency_!=null)
				{
					_currency_.AfterSave+=new EventHandler(OnEntityAfterSave);
				}
				this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
			}
			// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
			// __LLBLGENPRO_USER_CODE_REGION_END
		}
示例#10
0
 /// <summary> Removes the sync logic for member _currency_</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 DesetupSyncCurrency_(bool signalRelatedEntity, bool resetFKFields)
 {
     this.PerformDesetupSyncRelatedEntity(_currency_, new PropertyChangedEventHandler(OnCurrency_PropertyChanged), "Currency_", AdventureWorks.Dal.Adapter.v50.RelationClasses.StaticCurrencyRateRelations.CurrencyEntityUsingToCurrencyCodeStatic, true, signalRelatedEntity, "CurrencyRates_", resetFKFields, new int[] { (int)CurrencyRateFieldIndex.ToCurrencyCode });
     _currency_ = null;
 }