示例#1
0
 protected EmployeeDepartmentHistoryEntity(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     if (SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _department = (DepartmentEntity)info.GetValue("_department", typeof(DepartmentEntity));
         if (_department != null)
         {
             _department.AfterSave += new EventHandler(OnEntityAfterSave);
         }
         _employee = (EmployeeEntity)info.GetValue("_employee", typeof(EmployeeEntity));
         if (_employee != null)
         {
             _employee.AfterSave += new EventHandler(OnEntityAfterSave);
         }
         _shift = (ShiftEntity)info.GetValue("_shift", typeof(ShiftEntity));
         if (_shift != null)
         {
             _shift.AfterSave += new EventHandler(OnEntityAfterSave);
         }
         this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
     }
     // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
     // __LLBLGENPRO_USER_CODE_REGION_END
 }
示例#2
0
 /// <summary> Removes the sync logic for member _department</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 DesetupSyncDepartment(bool signalRelatedEntity, bool resetFKFields)
 {
     this.PerformDesetupSyncRelatedEntity(_department, new PropertyChangedEventHandler(OnDepartmentPropertyChanged), "Department", AdventureWorks.Dal.Adapter.v51.RelationClasses.StaticEmployeeDepartmentHistoryRelations.DepartmentEntityUsingDepartmentIdStatic, true, signalRelatedEntity, "EmployeeDepartmentHistories", resetFKFields, new int[] { (int)EmployeeDepartmentHistoryFieldIndex.DepartmentId });
     _department = null;
 }