/// <summary> Removes the sync logic for member _customers</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 DesetupSyncCustomers(bool signalRelatedEntity, bool resetFKFields) { this.PerformDesetupSyncRelatedEntity( _customers, new PropertyChangedEventHandler( OnCustomersPropertyChanged ), "Customers", NW26.RelationClasses.StaticOrdersRelations.CustomersEntityUsingCustomerIdStatic, true, signalRelatedEntity, "Orders", resetFKFields, new int[] { (int)OrdersFieldIndex.CustomerId } ); _customers = null; }
/// <summary> setups the sync logic for member _customers</summary> /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param> private void SetupSyncCustomers(IEntityCore relatedEntity) { if(_customers!=relatedEntity) { DesetupSyncCustomers(true, true); _customers = (CustomersEntity)relatedEntity; this.PerformSetupSyncRelatedEntity( _customers, new PropertyChangedEventHandler( OnCustomersPropertyChanged ), "Customers", NW26.RelationClasses.StaticOrdersRelations.CustomersEntityUsingCustomerIdStatic, true, new string[] { } ); } }
protected OrdersEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if(SerializationHelper.Optimization != SerializationOptimization.Fast) { _orderDetails = (EntityCollection<OrderDetailsEntity>)info.GetValue("_orderDetails", typeof(EntityCollection<OrderDetailsEntity>)); _customers = (CustomersEntity)info.GetValue("_customers", typeof(CustomersEntity)); if(_customers!=null) { _customers.AfterSave+=new EventHandler(OnEntityAfterSave); } _employees = (EmployeesEntity)info.GetValue("_employees", typeof(EmployeesEntity)); if(_employees!=null) { _employees.AfterSave+=new EventHandler(OnEntityAfterSave); } _shippers = (ShippersEntity)info.GetValue("_shippers", typeof(ShippersEntity)); if(_shippers!=null) { _shippers.AfterSave+=new EventHandler(OnEntityAfterSave); } this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance()); } // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor // __LLBLGENPRO_USER_CODE_REGION_END }