/// <summary> Removes the sync logic for member _salesPerson</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 DesetupSyncSalesPerson(bool signalRelatedEntity, bool resetFKFields) { this.PerformDesetupSyncRelatedEntity( _salesPerson, new PropertyChangedEventHandler( OnSalesPersonPropertyChanged ), "SalesPerson", AdventureWorks.Dal.Adapter.v42.RelationClasses.StaticSalesTerritoryHistoryRelations.SalesPersonEntityUsingSalesPersonIdStatic, true, signalRelatedEntity, "SalesTerritoryHistories", resetFKFields, new int[] { (int)SalesTerritoryHistoryFieldIndex.SalesPersonId } ); _salesPerson = null; }
/// <summary> setups the sync logic for member _salesPerson</summary> /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param> private void SetupSyncSalesPerson(IEntityCore relatedEntity) { if(_salesPerson!=relatedEntity) { DesetupSyncSalesPerson(true, true); _salesPerson = (SalesPersonEntity)relatedEntity; this.PerformSetupSyncRelatedEntity( _salesPerson, new PropertyChangedEventHandler( OnSalesPersonPropertyChanged ), "SalesPerson", AdventureWorks.Dal.Adapter.v42.RelationClasses.StaticSalesTerritoryHistoryRelations.SalesPersonEntityUsingSalesPersonIdStatic, true, new string[] { } ); } }
protected SalesTerritoryHistoryEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if(SerializationHelper.Optimization != SerializationOptimization.Fast) { _salesPerson = (SalesPersonEntity)info.GetValue("_salesPerson", typeof(SalesPersonEntity)); if(_salesPerson!=null) { _salesPerson.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 }
protected StoreEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if(SerializationHelper.Optimization != SerializationOptimization.Fast) { _customers = (EntityCollection<CustomerEntity>)info.GetValue("_customers", typeof(EntityCollection<CustomerEntity>)); _salesPerson = (SalesPersonEntity)info.GetValue("_salesPerson", typeof(SalesPersonEntity)); if(_salesPerson!=null) { _salesPerson.AfterSave+=new EventHandler(OnEntityAfterSave); } _businessEntity = (BusinessEntityEntity)info.GetValue("_businessEntity", typeof(BusinessEntityEntity)); if(_businessEntity!=null) { _businessEntity.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 _salesPerson</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 DesetupSyncSalesPerson(bool signalRelatedEntity, bool resetFKFields) { this.PerformDesetupSyncRelatedEntity( _salesPerson, new PropertyChangedEventHandler( OnSalesPersonPropertyChanged ), "SalesPerson", AdventureWorks.Dal.Adapter.v42.RelationClasses.StaticEmployeeRelations.SalesPersonEntityUsingSalesPersonIdStatic, false, signalRelatedEntity, "Employee", false, new int[] { (int)EmployeeFieldIndex.EmployeeId } ); _salesPerson = null; }
protected EmployeeEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if(SerializationHelper.Optimization != SerializationOptimization.Fast) { _documents = (EntityCollection<DocumentEntity>)info.GetValue("_documents", typeof(EntityCollection<DocumentEntity>)); _employeeDepartmentHistories = (EntityCollection<EmployeeDepartmentHistoryEntity>)info.GetValue("_employeeDepartmentHistories", typeof(EntityCollection<EmployeeDepartmentHistoryEntity>)); _employeePayHistories = (EntityCollection<EmployeePayHistoryEntity>)info.GetValue("_employeePayHistories", typeof(EntityCollection<EmployeePayHistoryEntity>)); _jobCandidates = (EntityCollection<JobCandidateEntity>)info.GetValue("_jobCandidates", typeof(EntityCollection<JobCandidateEntity>)); _purchaseOrderHeaders = (EntityCollection<PurchaseOrderHeaderEntity>)info.GetValue("_purchaseOrderHeaders", typeof(EntityCollection<PurchaseOrderHeaderEntity>)); _person = (PersonEntity)info.GetValue("_person", typeof(PersonEntity)); if(_person!=null) { _person.AfterSave+=new EventHandler(OnEntityAfterSave); } _salesPerson = (SalesPersonEntity)info.GetValue("_salesPerson", typeof(SalesPersonEntity)); if(_salesPerson!=null) { _salesPerson.AfterSave+=new EventHandler(OnEntityAfterSave); } this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance()); } // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor // __LLBLGENPRO_USER_CODE_REGION_END }
protected SalesOrderHeaderEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if(SerializationHelper.Optimization != SerializationOptimization.Fast) { _salesOrderDetails = (EntityCollection<SalesOrderDetailEntity>)info.GetValue("_salesOrderDetails", typeof(EntityCollection<SalesOrderDetailEntity>)); _salesOrderHeaderSalesReasons = (EntityCollection<SalesOrderHeaderSalesReasonEntity>)info.GetValue("_salesOrderHeaderSalesReasons", typeof(EntityCollection<SalesOrderHeaderSalesReasonEntity>)); _address = (AddressEntity)info.GetValue("_address", typeof(AddressEntity)); if(_address!=null) { _address.AfterSave+=new EventHandler(OnEntityAfterSave); } _address_ = (AddressEntity)info.GetValue("_address_", typeof(AddressEntity)); if(_address_!=null) { _address_.AfterSave+=new EventHandler(OnEntityAfterSave); } _creditCard = (CreditCardEntity)info.GetValue("_creditCard", typeof(CreditCardEntity)); if(_creditCard!=null) { _creditCard.AfterSave+=new EventHandler(OnEntityAfterSave); } _currencyRate = (CurrencyRateEntity)info.GetValue("_currencyRate", typeof(CurrencyRateEntity)); if(_currencyRate!=null) { _currencyRate.AfterSave+=new EventHandler(OnEntityAfterSave); } _customer = (CustomerEntity)info.GetValue("_customer", typeof(CustomerEntity)); if(_customer!=null) { _customer.AfterSave+=new EventHandler(OnEntityAfterSave); } _salesPerson = (SalesPersonEntity)info.GetValue("_salesPerson", typeof(SalesPersonEntity)); if(_salesPerson!=null) { _salesPerson.AfterSave+=new EventHandler(OnEntityAfterSave); } _salesTerritory = (SalesTerritoryEntity)info.GetValue("_salesTerritory", typeof(SalesTerritoryEntity)); if(_salesTerritory!=null) { _salesTerritory.AfterSave+=new EventHandler(OnEntityAfterSave); } _shipMethod = (ShipMethodEntity)info.GetValue("_shipMethod", typeof(ShipMethodEntity)); if(_shipMethod!=null) { _shipMethod.AfterSave+=new EventHandler(OnEntityAfterSave); } this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance()); } // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor // __LLBLGENPRO_USER_CODE_REGION_END }