public void PdvEditTest1() { PdvEntity pdv = new PdvEntity(); pdv.Naziv = "test pdv"; pdv.Stopa = 22.22M; pdv.Save(_adapter, true, false); Dictionary<string, string> routeValues = new Dictionary<string, string>(); routeValues.Add("pdvId", pdv.PdvId.ToString()); string page = FetchPage("PdvEdit", routeValues); }
/// <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.Enio.CoolJ.RelationClasses.StaticArtiklRelations.PdvEntityUsingPdvIdStatic, true, new string[] { } ); } }
/// <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.Enio.CoolJ.RelationClasses.StaticArtiklRelations.PdvEntityUsingPdvIdStatic, true, signalRelatedEntity, "ArtiklCollection", resetFKFields, new int[] { (int)ArtiklFieldIndex.PdvId } ); _pdv = null; }
protected ArtiklEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if(SerializationHelper.Optimization != SerializationOptimization.Fast) { _racunStavkaCollection = (EntityCollection<RacunStavkaEntity>)info.GetValue("_racunStavkaCollection", typeof(EntityCollection<RacunStavkaEntity>)); _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 }
private PdvEntity FetchPdv(DataAccessAdapterBase adapter, long? pdvId) { PdvEntity pdv; if (pdvId.HasValue && 0 != pdvId.Value) { pdv = PdvEntity.FetchPdv(adapter, null, pdvId.Value); } else { pdv = new PdvEntity(); } return pdv; }
public static PdvEntity FetchPdv(DataAccessAdapterBase adapter, PrefetchPath2 prefetchPath, long PdvId) { PdvEntity _PdvEntity = new PdvEntity(PdvId); adapter.FetchEntity(_PdvEntity, prefetchPath); return _PdvEntity; }