Beispiel #1
0
 protected PurchaseOrderHeaderEntity(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     if (SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _purchaseOrderDetails = (EntityCollection <PurchaseOrderDetailEntity>)info.GetValue("_purchaseOrderDetails", typeof(EntityCollection <PurchaseOrderDetailEntity>));
         _employee             = (EmployeeEntity)info.GetValue("_employee", typeof(EmployeeEntity));
         if (_employee != null)
         {
             _employee.AfterSave += new EventHandler(OnEntityAfterSave);
         }
         _shipMethod = (ShipMethodEntity)info.GetValue("_shipMethod", typeof(ShipMethodEntity));
         if (_shipMethod != null)
         {
             _shipMethod.AfterSave += new EventHandler(OnEntityAfterSave);
         }
         _vendor = (VendorEntity)info.GetValue("_vendor", typeof(VendorEntity));
         if (_vendor != null)
         {
             _vendor.AfterSave += new EventHandler(OnEntityAfterSave);
         }
         this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
     }
     // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
     // __LLBLGENPRO_USER_CODE_REGION_END
 }
Beispiel #2
0
 /// <summary> setups the sync logic for member _shipMethod</summary>
 /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
 private void SetupSyncShipMethod(IEntityCore relatedEntity)
 {
     if (_shipMethod != relatedEntity)
     {
         DesetupSyncShipMethod(true, true);
         _shipMethod = (ShipMethodEntity)relatedEntity;
         this.PerformSetupSyncRelatedEntity(_shipMethod, new PropertyChangedEventHandler(OnShipMethodPropertyChanged), "ShipMethod", AdventureWorks.Dal.Adapter.v42.RelationClasses.StaticPurchaseOrderHeaderRelations.ShipMethodEntityUsingShipMethodIdStatic, true, new string[] {  });
     }
 }
Beispiel #3
0
 /// <summary> Removes the sync logic for member _shipMethod</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 DesetupSyncShipMethod(bool signalRelatedEntity, bool resetFKFields)
 {
     this.PerformDesetupSyncRelatedEntity(_shipMethod, new PropertyChangedEventHandler(OnShipMethodPropertyChanged), "ShipMethod", AdventureWorks.Dal.Adapter.v42.RelationClasses.StaticPurchaseOrderHeaderRelations.ShipMethodEntityUsingShipMethodIdStatic, true, signalRelatedEntity, "PurchaseOrderHeaders", resetFKFields, new int[] { (int)PurchaseOrderHeaderFieldIndex.ShipMethodId });
     _shipMethod = null;
 }