コード例 #1
0
 /// <summary> setups the sync logic for member _coupons</summary>
 /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
 private void SetupSyncCoupons(IEntity2 relatedEntity)
 {
     if (_coupons != relatedEntity)
     {
         DesetupSyncCoupons(true, true);
         _coupons = (CouponsEntity)relatedEntity;
         base.PerformSetupSyncRelatedEntity(_coupons, new PropertyChangedEventHandler(OnCouponsPropertyChanged), "Coupons", CouponSignUpModeEntity.Relations.CouponsEntityUsingCouponId, true, new string[] {  });
     }
 }
コード例 #2
0
 /// <summary> setups the sync logic for member _coupons</summary>
 /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
 private void SetupSyncCoupons(IEntity2 relatedEntity)
 {
     if (_coupons != relatedEntity)
     {
         DesetupSyncCoupons(true, true);
         _coupons = (CouponsEntity)relatedEntity;
         base.PerformSetupSyncRelatedEntity(_coupons, new PropertyChangedEventHandler(OnCouponsPropertyChanged), "Coupons", PackageSourceCodeDiscountEntity.Relations.CouponsEntityUsingSourceCodeId, true, new string[] {  });
     }
 }
コード例 #3
0
        /// <summary> Initializes the class members</summary>
        protected virtual void InitClassMembers()
        {
            _coupons = null;

            PerformDependencyInjection();

            // __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
            // __LLBLGENPRO_USER_CODE_REGION_END
            OnInitClassMembersComplete();
        }
コード例 #4
0
        protected CouponSignUpModeEntity(SerializationInfo info, StreamingContext context) : base(info, context)
        {
            if (SerializationHelper.Optimization != SerializationOptimization.Fast)
            {
                _coupons = (CouponsEntity)info.GetValue("_coupons", typeof(CouponsEntity));
                if (_coupons != null)
                {
                    _coupons.AfterSave += new EventHandler(OnEntityAfterSave);
                }

                base.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
            }

            // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
            // __LLBLGENPRO_USER_CODE_REGION_END
        }
コード例 #5
0
        public SourceCode GetSourceCodeById(long sourceCodeId)
        {
            var            sourceCodeEntity = new CouponsEntity(sourceCodeId);
            IPrefetchPath2 prefetchPath     = new PrefetchPath2((int)EntityType.CouponsEntity)
            {
                CouponsEntity.PrefetchPathCouponSignUpMode,
                CouponsEntity.PrefetchPathPackageSourceCodeDiscount,
                CouponsEntity.PrefetchPathTestSourceCodeDiscount,
                CouponsEntity.PrefetchPathProductSourceCodeDiscount,
                CouponsEntity.PrefetchPathShippingOptionSourceCodeDiscount,
                CouponsEntity.PrefetchPathEventCoupons
            };

            using (var adapter = PersistenceLayer.GetDataAccessAdapter())
            {
                if (!adapter.FetchEntity(sourceCodeEntity, prefetchPath))
                {
                    throw new ObjectNotFoundInPersistenceException <SourceCode>(sourceCodeId);
                }
            }
            return(_mapper.Map(sourceCodeEntity));
        }
コード例 #6
0
 /// <summary> Removes the sync logic for member _coupons</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 DesetupSyncCoupons(bool signalRelatedEntity, bool resetFKFields)
 {
     base.PerformDesetupSyncRelatedEntity(_coupons, new PropertyChangedEventHandler(OnCouponsPropertyChanged), "Coupons", PackageSourceCodeDiscountEntity.Relations.CouponsEntityUsingSourceCodeId, true, signalRelatedEntity, "PackageSourceCodeDiscount", resetFKFields, new int[] { (int)PackageSourceCodeDiscountFieldIndex.SourceCodeId });
     _coupons = null;
 }
コード例 #7
0
 /// <summary> Removes the sync logic for member _coupons</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 DesetupSyncCoupons(bool signalRelatedEntity, bool resetFKFields)
 {
     base.PerformDesetupSyncRelatedEntity(_coupons, new PropertyChangedEventHandler(OnCouponsPropertyChanged), "Coupons", EventCouponsEntity.Relations.CouponsEntityUsingCouponId, true, signalRelatedEntity, "EventCoupons", resetFKFields, new int[] { (int)EventCouponsFieldIndex.CouponId });
     _coupons = null;
 }