Exemplo n.º 1
0
 /// <summary> setups the sync logic for member _productDescription</summary>
 /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
 private void SetupSyncProductDescription(IEntityCore relatedEntity)
 {
     if (_productDescription != relatedEntity)
     {
         DesetupSyncProductDescription(true, true);
         _productDescription = (ProductDescriptionEntity)relatedEntity;
         this.PerformSetupSyncRelatedEntity(_productDescription, new PropertyChangedEventHandler(OnProductDescriptionPropertyChanged), "ProductDescription", AdventureWorks.Dal.Adapter.v50.RelationClasses.StaticProductModelProductDescriptionCultureRelations.ProductDescriptionEntityUsingProductDescriptionIdStatic, true, new string[] {  });
     }
 }
Exemplo n.º 2
0
 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
 }
Exemplo n.º 3
0
 /// <summary> Removes the sync logic for member _productDescription</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 DesetupSyncProductDescription(bool signalRelatedEntity, bool resetFKFields)
 {
     this.PerformDesetupSyncRelatedEntity(_productDescription, new PropertyChangedEventHandler(OnProductDescriptionPropertyChanged), "ProductDescription", AdventureWorks.Dal.Adapter.v50.RelationClasses.StaticProductModelProductDescriptionCultureRelations.ProductDescriptionEntityUsingProductDescriptionIdStatic, true, signalRelatedEntity, "ProductModelProductDescriptionCultures", resetFKFields, new int[] { (int)ProductModelProductDescriptionCultureFieldIndex.ProductDescriptionId });
     _productDescription = null;
 }
Exemplo n.º 4
0
		/// <summary>Konvertira entitet u business object.</summary>
		protected ProductDescription(ProductDescriptionEntity entity)
			: base(entity)
		{
		}
Exemplo n.º 5
0
		/// <summary>Po potrebi konvertira entity u business objekt.</summary>
		public static ProductDescription ConvertEntityToBusinessObject(ProductDescriptionEntity entity)
		{
			ProductDescription bizobj = entity as ProductDescription;
			if (bizobj == null)
				bizobj = new ProductDescription(entity);

			return bizobj;
		}