コード例 #1
0
 /// <summary> setups the sync logic for member _countryRegion</summary>
 /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
 private void SetupSyncCountryRegion(IEntityCore relatedEntity)
 {
     if (_countryRegion != relatedEntity)
     {
         DesetupSyncCountryRegion(true, true);
         _countryRegion = (CountryRegionEntity)relatedEntity;
         this.PerformSetupSyncRelatedEntity(_countryRegion, new PropertyChangedEventHandler(OnCountryRegionPropertyChanged), "CountryRegion", AdventureWorks.Dal.Adapter.v50.RelationClasses.StaticCountryRegionCurrencyRelations.CountryRegionEntityUsingCountryRegionCodeStatic, true, new string[] {  });
     }
 }
コード例 #2
0
 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 SalesTerritoryEntity(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     if (SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _customers               = (EntityCollection <CustomerEntity>)info.GetValue("_customers", typeof(EntityCollection <CustomerEntity>));
         _salesOrderHeaders       = (EntityCollection <SalesOrderHeaderEntity>)info.GetValue("_salesOrderHeaders", typeof(EntityCollection <SalesOrderHeaderEntity>));
         _salesPeople             = (EntityCollection <SalesPersonEntity>)info.GetValue("_salesPeople", typeof(EntityCollection <SalesPersonEntity>));
         _salesTerritoryHistories = (EntityCollection <SalesTerritoryHistoryEntity>)info.GetValue("_salesTerritoryHistories", typeof(EntityCollection <SalesTerritoryHistoryEntity>));
         _stateProvinces          = (EntityCollection <StateProvinceEntity>)info.GetValue("_stateProvinces", typeof(EntityCollection <StateProvinceEntity>));
         _countryRegion           = (CountryRegionEntity)info.GetValue("_countryRegion", typeof(CountryRegionEntity));
         if (_countryRegion != null)
         {
             _countryRegion.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 _countryRegion</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 DesetupSyncCountryRegion(bool signalRelatedEntity, bool resetFKFields)
 {
     this.PerformDesetupSyncRelatedEntity(_countryRegion, new PropertyChangedEventHandler(OnCountryRegionPropertyChanged), "CountryRegion", AdventureWorks.Dal.Adapter.v50.RelationClasses.StaticCountryRegionCurrencyRelations.CountryRegionEntityUsingCountryRegionCodeStatic, true, signalRelatedEntity, "CountryRegionCurrencies", resetFKFields, new int[] { (int)CountryRegionCurrencyFieldIndex.CountryRegionCode });
     _countryRegion = null;
 }
コード例 #5
0
		/// <summary> setups the sync logic for member _countryRegion</summary>
		/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
		private void SetupSyncCountryRegion(IEntityCore relatedEntity)
		{
			if(_countryRegion!=relatedEntity)
			{
				DesetupSyncCountryRegion(true, true);
				_countryRegion = (CountryRegionEntity)relatedEntity;
				this.PerformSetupSyncRelatedEntity( _countryRegion, new PropertyChangedEventHandler( OnCountryRegionPropertyChanged ), "CountryRegion", AdventureWorks.Dal.Adapter.v50.RelationClasses.StaticCountryRegionCurrencyRelations.CountryRegionEntityUsingCountryRegionCodeStatic, true, new string[] {  } );
			}
		}
コード例 #6
0
		/// <summary> Removes the sync logic for member _countryRegion</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 DesetupSyncCountryRegion(bool signalRelatedEntity, bool resetFKFields)
		{
			this.PerformDesetupSyncRelatedEntity( _countryRegion, new PropertyChangedEventHandler( OnCountryRegionPropertyChanged ), "CountryRegion", AdventureWorks.Dal.Adapter.v50.RelationClasses.StaticCountryRegionCurrencyRelations.CountryRegionEntityUsingCountryRegionCodeStatic, true, signalRelatedEntity, "CountryRegionCurrencies", resetFKFields, new int[] { (int)CountryRegionCurrencyFieldIndex.CountryRegionCode } );
			_countryRegion = null;
		}
コード例 #7
0
		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
		}
コード例 #8
0
		protected StateProvinceEntity(SerializationInfo info, StreamingContext context) : base(info, context)
		{
			if(SerializationHelper.Optimization != SerializationOptimization.Fast) 
			{
				_addresses = (EntityCollection<AddressEntity>)info.GetValue("_addresses", typeof(EntityCollection<AddressEntity>));
				_salesTaxRates = (EntityCollection<SalesTaxRateEntity>)info.GetValue("_salesTaxRates", typeof(EntityCollection<SalesTaxRateEntity>));
				_countryRegion = (CountryRegionEntity)info.GetValue("_countryRegion", typeof(CountryRegionEntity));
				if(_countryRegion!=null)
				{
					_countryRegion.AfterSave+=new EventHandler(OnEntityAfterSave);
				}
				_salesTerritory = (SalesTerritoryEntity)info.GetValue("_salesTerritory", typeof(SalesTerritoryEntity));
				if(_salesTerritory!=null)
				{
					_salesTerritory.AfterSave+=new EventHandler(OnEntityAfterSave);
				}
				this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
			}
			// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
			// __LLBLGENPRO_USER_CODE_REGION_END
		}