/// <summary> Removes the sync logic for member _product</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 DesetupSyncProduct(bool signalRelatedEntity, bool resetFKFields) { this.PerformDesetupSyncRelatedEntity( _product, new PropertyChangedEventHandler( OnProductPropertyChanged ), "Product", AdventureWorks.Dal.Adapter.v42.RelationClasses.StaticShoppingCartItemRelations.ProductEntityUsingProductIdStatic, true, signalRelatedEntity, "ShoppingCartItems", resetFKFields, new int[] { (int)ShoppingCartItemFieldIndex.ProductId } ); _product = null; }
/// <summary> setups the sync logic for member _product</summary> /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param> private void SetupSyncProduct(IEntityCore relatedEntity) { if(_product!=relatedEntity) { DesetupSyncProduct(true, true); _product = (ProductEntity)relatedEntity; this.PerformSetupSyncRelatedEntity( _product, new PropertyChangedEventHandler( OnProductPropertyChanged ), "Product", AdventureWorks.Dal.Adapter.v42.RelationClasses.StaticShoppingCartItemRelations.ProductEntityUsingProductIdStatic, true, new string[] { } ); } }
protected ShoppingCartItemEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if(SerializationHelper.Optimization != SerializationOptimization.Fast) { _product = (ProductEntity)info.GetValue("_product", typeof(ProductEntity)); if(_product!=null) { _product.AfterSave+=new EventHandler(OnEntityAfterSave); } this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance()); } // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor // __LLBLGENPRO_USER_CODE_REGION_END }
protected WorkOrderEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if(SerializationHelper.Optimization != SerializationOptimization.Fast) { _workOrderRoutings = (EntityCollection<WorkOrderRoutingEntity>)info.GetValue("_workOrderRoutings", typeof(EntityCollection<WorkOrderRoutingEntity>)); _product = (ProductEntity)info.GetValue("_product", typeof(ProductEntity)); if(_product!=null) { _product.AfterSave+=new EventHandler(OnEntityAfterSave); } _scrapReason = (ScrapReasonEntity)info.GetValue("_scrapReason", typeof(ScrapReasonEntity)); if(_scrapReason!=null) { _scrapReason.AfterSave+=new EventHandler(OnEntityAfterSave); } this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance()); } // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor // __LLBLGENPRO_USER_CODE_REGION_END }
/// <summary> setups the sync logic for member _product_</summary> /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param> private void SetupSyncProduct_(IEntityCore relatedEntity) { if(_product_!=relatedEntity) { DesetupSyncProduct_(true, true); _product_ = (ProductEntity)relatedEntity; this.PerformSetupSyncRelatedEntity( _product_, new PropertyChangedEventHandler( OnProduct_PropertyChanged ), "Product_", AdventureWorks.Dal.Adapter.v42.RelationClasses.StaticBillOfMaterialRelations.ProductEntityUsingProductAssemblyIdStatic, true, new string[] { } ); } }
/// <summary> Removes the sync logic for member _product_</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 DesetupSyncProduct_(bool signalRelatedEntity, bool resetFKFields) { this.PerformDesetupSyncRelatedEntity( _product_, new PropertyChangedEventHandler( OnProduct_PropertyChanged ), "Product_", AdventureWorks.Dal.Adapter.v42.RelationClasses.StaticBillOfMaterialRelations.ProductEntityUsingProductAssemblyIdStatic, true, signalRelatedEntity, "BillOfMaterials_", resetFKFields, new int[] { (int)BillOfMaterialFieldIndex.ProductAssemblyId } ); _product_ = 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 }