public void TarifaEditTest1() { TarifaEntity tarifa = new TarifaEntity(); tarifa.Naziv = "test tarifa"; tarifa.Stopa = 55.55M; tarifa.IsActive = true; tarifa.Save(_adapter, true, false); Dictionary<string, string> routeValues = new Dictionary<string, string>(); routeValues.Add("tarifaId", tarifa.TarifaId.ToString()); string page = FetchPage("TarifaEdit", routeValues); }
/// <summary> setups the sync logic for member _tarifa</summary> /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param> private void SetupSyncTarifa(IEntityCore relatedEntity) { if(_tarifa!=relatedEntity) { DesetupSyncTarifa(true, true); _tarifa = (TarifaEntity)relatedEntity; this.PerformSetupSyncRelatedEntity( _tarifa, new PropertyChangedEventHandler( OnTarifaPropertyChanged ), "Tarifa", NinjaSoftware.Enio.CoolJ.RelationClasses.StaticRacunGlavaRelations.TarifaEntityUsingTarifaIdStatic, true, new string[] { } ); } }
/// <summary> Removes the sync logic for member _tarifa</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 DesetupSyncTarifa(bool signalRelatedEntity, bool resetFKFields) { this.PerformDesetupSyncRelatedEntity( _tarifa, new PropertyChangedEventHandler( OnTarifaPropertyChanged ), "Tarifa", NinjaSoftware.Enio.CoolJ.RelationClasses.StaticRacunGlavaRelations.TarifaEntityUsingTarifaIdStatic, true, signalRelatedEntity, "RacunGlavaCollection", resetFKFields, new int[] { (int)RacunGlavaFieldIndex.TarifaId } ); _tarifa = null; }
protected RacunGlavaEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if(SerializationHelper.Optimization != SerializationOptimization.Fast) { _racunStavkaCollection = (EntityCollection<RacunStavkaEntity>)info.GetValue("_racunStavkaCollection", typeof(EntityCollection<RacunStavkaEntity>)); _partner = (PartnerEntity)info.GetValue("_partner", typeof(PartnerEntity)); if(_partner!=null) { _partner.AfterSave+=new EventHandler(OnEntityAfterSave); } _status = (StatusRoEntity)info.GetValue("_status", typeof(StatusRoEntity)); if(_status!=null) { _status.AfterSave+=new EventHandler(OnEntityAfterSave); } _tarifa = (TarifaEntity)info.GetValue("_tarifa", typeof(TarifaEntity)); if(_tarifa!=null) { _tarifa.AfterSave+=new EventHandler(OnEntityAfterSave); } this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance()); } // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor // __LLBLGENPRO_USER_CODE_REGION_END }
private TarifaEntity FetchTarifa(DataAccessAdapterBase adapter, long? tarifaId) { TarifaEntity tarifa; if (tarifaId.HasValue && 0 != tarifaId.Value) { tarifa = TarifaEntity.FetchTarifa(adapter, null, tarifaId.Value); } else { tarifa = new TarifaEntity(); } return tarifa; }
public static TarifaEntity FetchTarifa(DataAccessAdapterBase adapter, PrefetchPath2 prefetchPath, long TarifaId) { TarifaEntity _TarifaEntity = new TarifaEntity(TarifaId); adapter.FetchEntity(_TarifaEntity, prefetchPath); return _TarifaEntity; }