Exemplo n.º 1
0
 /// <summary> Retrieves the related entity of type 'THistoryJadwalEntity', using a relation of type '1:1'</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the currently loaded related entity and will refetch the entity from the persistent storage</param>
 /// <returns>A fetched entity of type 'THistoryJadwalEntity' which is related to this entity.</returns>
 public virtual THistoryJadwalEntity GetSingleThistoryJadwal(bool forceFetch)
 {
     if( ( !_alreadyFetchedThistoryJadwal || forceFetch || _alwaysFetchThistoryJadwal) && !base.IsSerializing && !base.IsDeserializing && !base.InDesignMode )
     {
         THistoryJadwalEntity newEntity = new THistoryJadwalEntity();
         IEntityRelation relation = TJadwalEntity.Relations.THistoryJadwalEntityUsingDEntry;
         if(base.ParticipatesInTransaction)
         {
             base.Transaction.Add(newEntity);
         }
         bool fetchResult = false;
         if(base.CheckIfLazyLoadingShouldOccur(relation))
         {
             fetchResult = newEntity.FetchUsingPK(this.DEntry.GetValueOrDefault());
         }
         if(!_thistoryJadwalReturnsNewIfNotFound && !fetchResult)
         {
             this.ThistoryJadwal = null;
         }
         else
         {
             if((base.ActiveContext!=null)&&fetchResult)
             {
                 newEntity = (THistoryJadwalEntity)base.ActiveContext.Get(newEntity);
             }
             this.ThistoryJadwal = newEntity;
             _alreadyFetchedThistoryJadwal = fetchResult;
         }
         if(base.ParticipatesInTransaction && !fetchResult)
         {
             base.Transaction.Remove(newEntity);
         }
     }
     return _thistoryJadwal;
 }
Exemplo n.º 2
0
 /// <summary> setups the sync logic for member _thistoryJadwal</summary>
 /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
 private void SetupSyncThistoryJadwal(IEntity relatedEntity)
 {
     if(_thistoryJadwal!=relatedEntity)
     {
         DesetupSyncThistoryJadwal(true, true);
         _thistoryJadwal = (THistoryJadwalEntity)relatedEntity;
         base.PerformSetupSyncRelatedEntity( _thistoryJadwal, new PropertyChangedEventHandler( OnThistoryJadwalPropertyChanged ), "ThistoryJadwal", TJadwalEntity.Relations.THistoryJadwalEntityUsingDEntry, true, ref _alreadyFetchedThistoryJadwal, new string[] {  } );
     }
 }
Exemplo n.º 3
0
        /// <summary> Initializes the class members</summary>
        private void InitClassMembers()
        {
            _mpic = null;
            _mpicReturnsNewIfNotFound = true;
            _alwaysFetchMpic = false;
            _alreadyFetchedMpic = false;
            _thistoryJadwal = null;
            _thistoryJadwalReturnsNewIfNotFound = true;
            _alwaysFetchThistoryJadwal = false;
            _alreadyFetchedThistoryJadwal = false;

            PerformDependencyInjection();

            // __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
            // __LLBLGENPRO_USER_CODE_REGION_END

            OnInitClassMembersComplete();
        }
Exemplo n.º 4
0
 /// <summary> Removes the sync logic for member _thistoryJadwal</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 DesetupSyncThistoryJadwal(bool signalRelatedEntity, bool resetFKFields)
 {
     base.PerformDesetupSyncRelatedEntity( _thistoryJadwal, new PropertyChangedEventHandler( OnThistoryJadwalPropertyChanged ), "ThistoryJadwal", TJadwalEntity.Relations.THistoryJadwalEntityUsingDEntry, true, signalRelatedEntity, "Tjadwal", false, new int[] { (int)TJadwalFieldIndex.DEntry } );
     _thistoryJadwal = null;
 }
Exemplo n.º 5
0
        /// <summary>Private CTor for deserialization</summary>
        /// <param name="info"></param>
        /// <param name="context"></param>
        protected TJadwalEntity(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
            _mpic = (MPicEntity)info.GetValue("_mpic", typeof(MPicEntity));
            if(_mpic!=null)
            {
                _mpic.AfterSave+=new EventHandler(OnEntityAfterSave);
            }
            _mpicReturnsNewIfNotFound = info.GetBoolean("_mpicReturnsNewIfNotFound");
            _alwaysFetchMpic = info.GetBoolean("_alwaysFetchMpic");
            _alreadyFetchedMpic = info.GetBoolean("_alreadyFetchedMpic");
            _thistoryJadwal = (THistoryJadwalEntity)info.GetValue("_thistoryJadwal", typeof(THistoryJadwalEntity));
            if(_thistoryJadwal!=null)
            {
                _thistoryJadwal.AfterSave+=new EventHandler(OnEntityAfterSave);
            }
            _thistoryJadwalReturnsNewIfNotFound = info.GetBoolean("_thistoryJadwalReturnsNewIfNotFound");
            _alwaysFetchThistoryJadwal = info.GetBoolean("_alwaysFetchThistoryJadwal");
            _alreadyFetchedThistoryJadwal = info.GetBoolean("_alreadyFetchedThistoryJadwal");
            base.FixupDeserialization(FieldInfoProviderSingleton.GetInstance(), PersistenceInfoProviderSingleton.GetInstance());

            // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
            // __LLBLGENPRO_USER_CODE_REGION_END
        }
Exemplo n.º 6
0
        /// <summary>Creates a new, empty THistoryJadwalEntity object.</summary>
        /// <returns>A new, empty THistoryJadwalEntity object.</returns>
        public override IEntity Create()
        {
            IEntity toReturn = new THistoryJadwalEntity();

            // __LLBLGENPRO_USER_CODE_REGION_START CreateNewTHistoryJadwal
            // __LLBLGENPRO_USER_CODE_REGION_END

            return toReturn;
        }