/// <summary> Removes the sync logic for member _customerDemographic</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 DesetupSyncCustomerDemographic(bool signalRelatedEntity, bool resetFKFields) { this.PerformDesetupSyncRelatedEntity( _customerDemographic, new PropertyChangedEventHandler( OnCustomerDemographicPropertyChanged ), "CustomerDemographic", NW26.RelationClasses.StaticCustomerCustomerDemoRelations.CustomerDemographicEntityUsingCustomerTypeIdStatic, true, signalRelatedEntity, "CustomerCustomerDemos", resetFKFields, new int[] { (int)CustomerCustomerDemoFieldIndex.CustomerTypeId } ); _customerDemographic = null; }
/// <summary> setups the sync logic for member _customerDemographic</summary> /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param> private void SetupSyncCustomerDemographic(IEntityCore relatedEntity) { if(_customerDemographic!=relatedEntity) { DesetupSyncCustomerDemographic(true, true); _customerDemographic = (CustomerDemographicEntity)relatedEntity; this.PerformSetupSyncRelatedEntity( _customerDemographic, new PropertyChangedEventHandler( OnCustomerDemographicPropertyChanged ), "CustomerDemographic", NW26.RelationClasses.StaticCustomerCustomerDemoRelations.CustomerDemographicEntityUsingCustomerTypeIdStatic, true, new string[] { } ); } }
protected CustomerCustomerDemoEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if(SerializationHelper.Optimization != SerializationOptimization.Fast) { _customer = (CustomerEntity)info.GetValue("_customer", typeof(CustomerEntity)); if(_customer!=null) { _customer.AfterSave+=new EventHandler(OnEntityAfterSave); } _customerDemographic = (CustomerDemographicEntity)info.GetValue("_customerDemographic", typeof(CustomerDemographicEntity)); if(_customerDemographic!=null) { _customerDemographic.AfterSave+=new EventHandler(OnEntityAfterSave); } this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance()); } // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor // __LLBLGENPRO_USER_CODE_REGION_END }