Ejemplo n.º 1
0
 /// <summary> setups the sync logic for member _productModel</summary>
 /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
 private void SetupSyncProductModel(IEntityCore relatedEntity)
 {
     if (_productModel != relatedEntity)
     {
         DesetupSyncProductModel(true, true);
         _productModel = (ProductModelEntity)relatedEntity;
         this.PerformSetupSyncRelatedEntity(_productModel, new PropertyChangedEventHandler(OnProductModelPropertyChanged), "ProductModel", AdventureWorks.Dal.Adapter.v41.RelationClasses.StaticProductModelProductDescriptionCultureRelations.ProductModelEntityUsingProductModelIdStatic, true, new string[] {  });
     }
 }
 protected ProductModelIllustrationEntity(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     if (SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _illustration = (IllustrationEntity)info.GetValue("_illustration", typeof(IllustrationEntity));
         if (_illustration != null)
         {
             _illustration.AfterSave += new EventHandler(OnEntityAfterSave);
         }
         _productModel = (ProductModelEntity)info.GetValue("_productModel", typeof(ProductModelEntity));
         if (_productModel != null)
         {
             _productModel.AfterSave += new EventHandler(OnEntityAfterSave);
         }
         this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
     }
     // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
     // __LLBLGENPRO_USER_CODE_REGION_END
 }
Ejemplo n.º 3
0
		/// <summary> setups the sync logic for member _productModel</summary>
		/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
		private void SetupSyncProductModel(IEntityCore relatedEntity)
		{
			if(_productModel!=relatedEntity)
			{
				DesetupSyncProductModel(true, true);
				_productModel = (ProductModelEntity)relatedEntity;
				this.PerformSetupSyncRelatedEntity( _productModel, new PropertyChangedEventHandler( OnProductModelPropertyChanged ), "ProductModel", AdventureWorks.Dal.Adapter.v41.RelationClasses.StaticProductRelations.ProductModelEntityUsingProductModelIdStatic, true, new string[] {  } );
			}
		}
Ejemplo n.º 4
0
		/// <summary> Removes the sync logic for member _productModel</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 DesetupSyncProductModel(bool signalRelatedEntity, bool resetFKFields)
		{
			this.PerformDesetupSyncRelatedEntity( _productModel, new PropertyChangedEventHandler( OnProductModelPropertyChanged ), "ProductModel", AdventureWorks.Dal.Adapter.v41.RelationClasses.StaticProductRelations.ProductModelEntityUsingProductModelIdStatic, true, signalRelatedEntity, "Products", resetFKFields, new int[] { (int)ProductFieldIndex.ProductModelId } );
			_productModel = null;
		}
Ejemplo n.º 5
0
		protected ProductEntity(SerializationInfo info, StreamingContext context) : base(info, context)
		{
			if(SerializationHelper.Optimization != SerializationOptimization.Fast) 
			{
				_billOfMaterials = (EntityCollection<BillOfMaterialEntity>)info.GetValue("_billOfMaterials", typeof(EntityCollection<BillOfMaterialEntity>));
				_billOfMaterials_ = (EntityCollection<BillOfMaterialEntity>)info.GetValue("_billOfMaterials_", typeof(EntityCollection<BillOfMaterialEntity>));
				_productCostHistories = (EntityCollection<ProductCostHistoryEntity>)info.GetValue("_productCostHistories", typeof(EntityCollection<ProductCostHistoryEntity>));
				_productDocuments = (EntityCollection<ProductDocumentEntity>)info.GetValue("_productDocuments", typeof(EntityCollection<ProductDocumentEntity>));
				_productInventories = (EntityCollection<ProductInventoryEntity>)info.GetValue("_productInventories", typeof(EntityCollection<ProductInventoryEntity>));
				_productListPriceHistories = (EntityCollection<ProductListPriceHistoryEntity>)info.GetValue("_productListPriceHistories", typeof(EntityCollection<ProductListPriceHistoryEntity>));
				_productProductPhotos = (EntityCollection<ProductProductPhotoEntity>)info.GetValue("_productProductPhotos", typeof(EntityCollection<ProductProductPhotoEntity>));
				_productReviews = (EntityCollection<ProductReviewEntity>)info.GetValue("_productReviews", typeof(EntityCollection<ProductReviewEntity>));
				_productVendors = (EntityCollection<ProductVendorEntity>)info.GetValue("_productVendors", typeof(EntityCollection<ProductVendorEntity>));
				_purchaseOrderDetails = (EntityCollection<PurchaseOrderDetailEntity>)info.GetValue("_purchaseOrderDetails", typeof(EntityCollection<PurchaseOrderDetailEntity>));
				_shoppingCartItems = (EntityCollection<ShoppingCartItemEntity>)info.GetValue("_shoppingCartItems", typeof(EntityCollection<ShoppingCartItemEntity>));
				_specialOfferProducts = (EntityCollection<SpecialOfferProductEntity>)info.GetValue("_specialOfferProducts", typeof(EntityCollection<SpecialOfferProductEntity>));
				_transactionHistories = (EntityCollection<TransactionHistoryEntity>)info.GetValue("_transactionHistories", typeof(EntityCollection<TransactionHistoryEntity>));
				_workOrders = (EntityCollection<WorkOrderEntity>)info.GetValue("_workOrders", typeof(EntityCollection<WorkOrderEntity>));
				_productModel = (ProductModelEntity)info.GetValue("_productModel", typeof(ProductModelEntity));
				if(_productModel!=null)
				{
					_productModel.AfterSave+=new EventHandler(OnEntityAfterSave);
				}
				_productSubcategory = (ProductSubcategoryEntity)info.GetValue("_productSubcategory", typeof(ProductSubcategoryEntity));
				if(_productSubcategory!=null)
				{
					_productSubcategory.AfterSave+=new EventHandler(OnEntityAfterSave);
				}
				_unitMeasure = (UnitMeasureEntity)info.GetValue("_unitMeasure", typeof(UnitMeasureEntity));
				if(_unitMeasure!=null)
				{
					_unitMeasure.AfterSave+=new EventHandler(OnEntityAfterSave);
				}
				_unitMeasure_ = (UnitMeasureEntity)info.GetValue("_unitMeasure_", typeof(UnitMeasureEntity));
				if(_unitMeasure_!=null)
				{
					_unitMeasure_.AfterSave+=new EventHandler(OnEntityAfterSave);
				}
				this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
			}
			// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
			// __LLBLGENPRO_USER_CODE_REGION_END
		}
		protected ProductModelProductDescriptionCultureEntity(SerializationInfo info, StreamingContext context) : base(info, context)
		{
			if(SerializationHelper.Optimization != SerializationOptimization.Fast) 
			{
				_culture = (CultureEntity)info.GetValue("_culture", typeof(CultureEntity));
				if(_culture!=null)
				{
					_culture.AfterSave+=new EventHandler(OnEntityAfterSave);
				}
				_productDescription = (ProductDescriptionEntity)info.GetValue("_productDescription", typeof(ProductDescriptionEntity));
				if(_productDescription!=null)
				{
					_productDescription.AfterSave+=new EventHandler(OnEntityAfterSave);
				}
				_productModel = (ProductModelEntity)info.GetValue("_productModel", typeof(ProductModelEntity));
				if(_productModel!=null)
				{
					_productModel.AfterSave+=new EventHandler(OnEntityAfterSave);
				}
				this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
			}
			// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
			// __LLBLGENPRO_USER_CODE_REGION_END
		}
Ejemplo n.º 7
0
 /// <summary> Removes the sync logic for member _productModel</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 DesetupSyncProductModel(bool signalRelatedEntity, bool resetFKFields)
 {
     this.PerformDesetupSyncRelatedEntity(_productModel, new PropertyChangedEventHandler(OnProductModelPropertyChanged), "ProductModel", AdventureWorks.Dal.Adapter.v41.RelationClasses.StaticProductModelProductDescriptionCultureRelations.ProductModelEntityUsingProductModelIdStatic, true, signalRelatedEntity, "ProductModelProductDescriptionCultures", resetFKFields, new int[] { (int)ProductModelProductDescriptionCultureFieldIndex.ProductModelId });
     _productModel = null;
 }