コード例 #1
0
 protected BusinessEntityEntity(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     if (SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _businessEntityAddresses = (EntityCollection <BusinessEntityAddressEntity>)info.GetValue("_businessEntityAddresses", typeof(EntityCollection <BusinessEntityAddressEntity>));
         _businessEntityContacts  = (EntityCollection <BusinessEntityContactEntity>)info.GetValue("_businessEntityContacts", typeof(EntityCollection <BusinessEntityContactEntity>));
         _person = (PersonEntity)info.GetValue("_person", typeof(PersonEntity));
         if (_person != null)
         {
             _person.AfterSave += new EventHandler(OnEntityAfterSave);
         }
         _store = (StoreEntity)info.GetValue("_store", typeof(StoreEntity));
         if (_store != null)
         {
             _store.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
 }
コード例 #2
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
 }
コード例 #3
0
 /// <summary> setups the sync logic for member _vendor</summary>
 /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
 private void SetupSyncVendor(IEntityCore relatedEntity)
 {
     if (_vendor != relatedEntity)
     {
         DesetupSyncVendor(true, true);
         _vendor = (VendorEntity)relatedEntity;
         this.PerformSetupSyncRelatedEntity(_vendor, new PropertyChangedEventHandler(OnVendorPropertyChanged), "Vendor", AdventureWorks.Dal.Adapter.v50.RelationClasses.StaticProductVendorRelations.VendorEntityUsingVendorIdStatic, true, new string[] {  });
     }
 }
コード例 #4
0
 protected ProductVendorEntity(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     if (SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _product = (ProductEntity)info.GetValue("_product", typeof(ProductEntity));
         if (_product != null)
         {
             _product.AfterSave += new EventHandler(OnEntityAfterSave);
         }
         _unitMeasure = (UnitMeasureEntity)info.GetValue("_unitMeasure", typeof(UnitMeasureEntity));
         if (_unitMeasure != null)
         {
             _unitMeasure.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
 }
コード例 #5
0
 /// <summary> Removes the sync logic for member _vendor</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 DesetupSyncVendor(bool signalRelatedEntity, bool resetFKFields)
 {
     this.PerformDesetupSyncRelatedEntity(_vendor, new PropertyChangedEventHandler(OnVendorPropertyChanged), "Vendor", AdventureWorks.Dal.Adapter.v50.RelationClasses.StaticProductVendorRelations.VendorEntityUsingVendorIdStatic, true, signalRelatedEntity, "ProductVendors", resetFKFields, new int[] { (int)ProductVendorFieldIndex.VendorId });
     _vendor = null;
 }
コード例 #6
0
		/// <summary> setups the sync logic for member _vendor</summary>
		/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
		private void SetupSyncVendor(IEntityCore relatedEntity)
		{
			if(_vendor!=relatedEntity)
			{
				DesetupSyncVendor(true, true);
				_vendor = (VendorEntity)relatedEntity;
				this.PerformSetupSyncRelatedEntity( _vendor, new PropertyChangedEventHandler( OnVendorPropertyChanged ), "Vendor", AdventureWorks.Dal.Adapter.v50.RelationClasses.StaticBusinessEntityRelations.VendorEntityUsingVendorIdStatic, false, new string[] {  } );
			}
		}
コード例 #7
0
		/// <summary> Removes the sync logic for member _vendor</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 DesetupSyncVendor(bool signalRelatedEntity, bool resetFKFields)
		{
			this.PerformDesetupSyncRelatedEntity( _vendor, new PropertyChangedEventHandler( OnVendorPropertyChanged ), "Vendor", AdventureWorks.Dal.Adapter.v50.RelationClasses.StaticBusinessEntityRelations.VendorEntityUsingVendorIdStatic, false, signalRelatedEntity, "BusinessEntity", false, new int[] { (int)BusinessEntityFieldIndex.BusinessEntityId } );
			_vendor = null;
		}
コード例 #8
0
		protected BusinessEntityEntity(SerializationInfo info, StreamingContext context) : base(info, context)
		{
			if(SerializationHelper.Optimization != SerializationOptimization.Fast) 
			{
				_businessEntityAddresses = (EntityCollection<BusinessEntityAddressEntity>)info.GetValue("_businessEntityAddresses", typeof(EntityCollection<BusinessEntityAddressEntity>));
				_businessEntityContacts = (EntityCollection<BusinessEntityContactEntity>)info.GetValue("_businessEntityContacts", typeof(EntityCollection<BusinessEntityContactEntity>));
				_person = (PersonEntity)info.GetValue("_person", typeof(PersonEntity));
				if(_person!=null)
				{
					_person.AfterSave+=new EventHandler(OnEntityAfterSave);
				}
				_store = (StoreEntity)info.GetValue("_store", typeof(StoreEntity));
				if(_store!=null)
				{
					_store.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
		}
コード例 #9
0
 /// <summary> Removes the sync logic for member _vendor</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 DesetupSyncVendor(bool signalRelatedEntity, bool resetFKFields)
 {
     this.PerformDesetupSyncRelatedEntity(_vendor, new PropertyChangedEventHandler(OnVendorPropertyChanged), "Vendor", AdventureWorks.Dal.Adapter.v50.RelationClasses.StaticBusinessEntityRelations.VendorEntityUsingVendorIdStatic, false, signalRelatedEntity, "BusinessEntity", false, new int[] { (int)BusinessEntityFieldIndex.BusinessEntityId });
     _vendor = null;
 }
コード例 #10
0
		/// <summary> Removes the sync logic for member _vendor</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 DesetupSyncVendor(bool signalRelatedEntity, bool resetFKFields)
		{
			this.PerformDesetupSyncRelatedEntity( _vendor, new PropertyChangedEventHandler( OnVendorPropertyChanged ), "Vendor", AdventureWorks.Dal.Adapter.v50.RelationClasses.StaticProductVendorRelations.VendorEntityUsingVendorIdStatic, true, signalRelatedEntity, "ProductVendors", resetFKFields, new int[] { (int)ProductVendorFieldIndex.VendorId } );
			_vendor = null;
		}
コード例 #11
0
		protected ProductVendorEntity(SerializationInfo info, StreamingContext context) : base(info, context)
		{
			if(SerializationHelper.Optimization != SerializationOptimization.Fast) 
			{
				_product = (ProductEntity)info.GetValue("_product", typeof(ProductEntity));
				if(_product!=null)
				{
					_product.AfterSave+=new EventHandler(OnEntityAfterSave);
				}
				_unitMeasure = (UnitMeasureEntity)info.GetValue("_unitMeasure", typeof(UnitMeasureEntity));
				if(_unitMeasure!=null)
				{
					_unitMeasure.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
		}
コード例 #12
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
		}