public static PdvEntity FetchPdv(DataAccessAdapterBase adapter, PrefetchPath2 prefetchPath, long PdvId) { PdvEntity _PdvEntity = new PdvEntity(PdvId); adapter.FetchEntity(_PdvEntity, prefetchPath); return(_PdvEntity); }
/// <summary> setups the sync logic for member _pdv</summary> /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param> private void SetupSyncPdv(IEntityCore relatedEntity) { if (_pdv != relatedEntity) { DesetupSyncPdv(true, true); _pdv = (PdvEntity)relatedEntity; this.PerformSetupSyncRelatedEntity(_pdv, new PropertyChangedEventHandler(OnPdvPropertyChanged), "Pdv", NinjaSoftware.EnioNg.CoolJ.RelationClasses.StaticArtiklRelations.PdvEntityUsingPdvIdStatic, true, new string[] { }); } }
protected ArtiklEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if (SerializationHelper.Optimization != SerializationOptimization.Fast) { _racunStavkaCollection = (EntityCollection <RacunStavkaEntity>)info.GetValue("_racunStavkaCollection", typeof(EntityCollection <RacunStavkaEntity>)); _firma = (FirmaEntity)info.GetValue("_firma", typeof(FirmaEntity)); if (_firma != null) { _firma.AfterSave += new EventHandler(OnEntityAfterSave); } _pdv = (PdvEntity)info.GetValue("_pdv", typeof(PdvEntity)); if (_pdv != null) { _pdv.AfterSave += new EventHandler(OnEntityAfterSave); } this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance()); } // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor // __LLBLGENPRO_USER_CODE_REGION_END }
/// <summary> Removes the sync logic for member _pdv</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 DesetupSyncPdv(bool signalRelatedEntity, bool resetFKFields) { this.PerformDesetupSyncRelatedEntity(_pdv, new PropertyChangedEventHandler(OnPdvPropertyChanged), "Pdv", NinjaSoftware.EnioNg.CoolJ.RelationClasses.StaticArtiklRelations.PdvEntityUsingPdvIdStatic, true, signalRelatedEntity, "ArtiklCollection", resetFKFields, new int[] { (int)ArtiklFieldIndex.PdvId }); _pdv = null; }