/// <summary> Removes the sync logic for member _employee</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 DesetupSyncEmployee(bool signalRelatedEntity, bool resetFKFields)
 {
     this.PerformDesetupSyncRelatedEntity( _employee, new PropertyChangedEventHandler( OnEmployeePropertyChanged ), "Employee", Northwind.Data.RelationClasses.StaticOrderRelations.EmployeeEntityUsingEmployeeIdStatic, true, signalRelatedEntity, "Orders", resetFKFields, new int[] { (int)OrderFieldIndex.EmployeeId } );
     _employee = null;
 }
 /// <summary> setups the sync logic for member _employee</summary>
 /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
 private void SetupSyncEmployee(IEntityCore relatedEntity)
 {
     if(_employee!=relatedEntity)
     {
         DesetupSyncEmployee(true, true);
         _employee = (EmployeeEntity)relatedEntity;
         this.PerformSetupSyncRelatedEntity( _employee, new PropertyChangedEventHandler( OnEmployeePropertyChanged ), "Employee", Northwind.Data.RelationClasses.StaticOrderRelations.EmployeeEntityUsingEmployeeIdStatic, 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>));
         _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
 }
 protected EmployeeTerritoryEntity(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     if(SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _employee = (EmployeeEntity)info.GetValue("_employee", typeof(EmployeeEntity));
         if(_employee!=null)
         {
             _employee.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _territory = (TerritoryEntity)info.GetValue("_territory", typeof(TerritoryEntity));
         if(_territory!=null)
         {
             _territory.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
     }
     // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
     // __LLBLGENPRO_USER_CODE_REGION_END
 }
コード例 #5
0
 /// <summary> setups the sync logic for member _reportsTo</summary>
 /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
 private void SetupSyncReportsTo(IEntityCore relatedEntity)
 {
     if(_reportsTo!=relatedEntity)
     {
         DesetupSyncReportsTo(true, true);
         _reportsTo = (EmployeeEntity)relatedEntity;
         this.PerformSetupSyncRelatedEntity( _reportsTo, new PropertyChangedEventHandler( OnReportsToPropertyChanged ), "ReportsTo", Northwind.Data.RelationClasses.StaticEmployeeRelations.EmployeeEntityUsingEmployeeIdReportsToIdStatic, true, new string[] {  } );
     }
 }
コード例 #6
0
 /// <summary> Removes the sync logic for member _reportsTo</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 DesetupSyncReportsTo(bool signalRelatedEntity, bool resetFKFields)
 {
     this.PerformDesetupSyncRelatedEntity( _reportsTo, new PropertyChangedEventHandler( OnReportsToPropertyChanged ), "ReportsTo", Northwind.Data.RelationClasses.StaticEmployeeRelations.EmployeeEntityUsingEmployeeIdReportsToIdStatic, true, signalRelatedEntity, "Employees", resetFKFields, new int[] { (int)EmployeeFieldIndex.ReportsToId } );
     _reportsTo = null;
 }
コード例 #7
0
 protected EmployeeEntity(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     if(SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _employees = (EntityCollection<EmployeeEntity>)info.GetValue("_employees", typeof(EntityCollection<EmployeeEntity>));
         _employeeTerritories = (EntityCollection<EmployeeTerritoryEntity>)info.GetValue("_employeeTerritories", typeof(EntityCollection<EmployeeTerritoryEntity>));
         _orders = (EntityCollection<OrderEntity>)info.GetValue("_orders", typeof(EntityCollection<OrderEntity>));
         _reportsTo = (EmployeeEntity)info.GetValue("_reportsTo", typeof(EmployeeEntity));
         if(_reportsTo!=null)
         {
             _reportsTo.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
     }
     // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
     // __LLBLGENPRO_USER_CODE_REGION_END
 }