/// <summary> Removes the sync logic for member _shipper</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 DesetupSyncShipper(bool signalRelatedEntity, bool resetFKFields) { this.PerformDesetupSyncRelatedEntity( _shipper, new PropertyChangedEventHandler( OnShipperPropertyChanged ), "Shipper", NW26.RelationClasses.StaticOrderRelations.ShipperEntityUsingShipViaStatic, true, signalRelatedEntity, "Orders", resetFKFields, new int[] { (int)OrderFieldIndex.ShipVia } ); _shipper = null; }
/// <summary> setups the sync logic for member _shipper</summary> /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param> private void SetupSyncShipper(IEntityCore relatedEntity) { if(_shipper!=relatedEntity) { DesetupSyncShipper(true, true); _shipper = (ShipperEntity)relatedEntity; this.PerformSetupSyncRelatedEntity( _shipper, new PropertyChangedEventHandler( OnShipperPropertyChanged ), "Shipper", NW26.RelationClasses.StaticOrderRelations.ShipperEntityUsingShipViaStatic, true, new string[] { } ); } }
protected OrderEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if(SerializationHelper.Optimization != SerializationOptimization.Fast) { _orderDetails = (EntityCollection<OrderDetailEntity>)info.GetValue("_orderDetails", typeof(EntityCollection<OrderDetailEntity>)); _productCollectionViaOrderDetail = (EntityCollection<ProductEntity>)info.GetValue("_productCollectionViaOrderDetail", typeof(EntityCollection<ProductEntity>)); _customer = (CustomerEntity)info.GetValue("_customer", typeof(CustomerEntity)); if(_customer!=null) { _customer.AfterSave+=new EventHandler(OnEntityAfterSave); } _employee = (EmployeeEntity)info.GetValue("_employee", typeof(EmployeeEntity)); if(_employee!=null) { _employee.AfterSave+=new EventHandler(OnEntityAfterSave); } _shipper = (ShipperEntity)info.GetValue("_shipper", typeof(ShipperEntity)); if(_shipper!=null) { _shipper.AfterSave+=new EventHandler(OnEntityAfterSave); } this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance()); } // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor // __LLBLGENPRO_USER_CODE_REGION_END }