protected HealthPlanRevenueItemEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if (SerializationHelper.Optimization != SerializationOptimization.Fast) { _healthPlanRevenue = (HealthPlanRevenueEntity)info.GetValue("_healthPlanRevenue", typeof(HealthPlanRevenueEntity)); if (_healthPlanRevenue != null) { _healthPlanRevenue.AfterSave += new EventHandler(OnEntityAfterSave); } _package = (PackageEntity)info.GetValue("_package", typeof(PackageEntity)); if (_package != null) { _package.AfterSave += new EventHandler(OnEntityAfterSave); } _test = (TestEntity)info.GetValue("_test", typeof(TestEntity)); if (_test != null) { _test.AfterSave += new EventHandler(OnEntityAfterSave); } base.FixupDeserialization(FieldInfoProviderSingleton.GetInstance()); } // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor // __LLBLGENPRO_USER_CODE_REGION_END }
/// <summary> setups the sync logic for member _healthPlanRevenue</summary> /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param> private void SetupSyncHealthPlanRevenue(IEntity2 relatedEntity) { if (_healthPlanRevenue != relatedEntity) { DesetupSyncHealthPlanRevenue(true, true); _healthPlanRevenue = (HealthPlanRevenueEntity)relatedEntity; base.PerformSetupSyncRelatedEntity(_healthPlanRevenue, new PropertyChangedEventHandler(OnHealthPlanRevenuePropertyChanged), "HealthPlanRevenue", HealthPlanRevenueItemEntity.Relations.HealthPlanRevenueEntityUsingHealthPlanRevenueId, true, new string[] { }); } }
/// <summary> Initializes the class members</summary> protected virtual void InitClassMembers() { _healthPlanRevenue = null; _package = null; _test = null; PerformDependencyInjection(); // __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers // __LLBLGENPRO_USER_CODE_REGION_END OnInitClassMembersComplete(); }
public bool UpdatePreviousHealthPlanRevenue(DateTime dateTo, long healthPlanRevenueId) { using (var myAdapter = PersistenceLayer.GetDataAccessAdapter()) { var healthPlanRevenueEntity = new HealthPlanRevenueEntity(healthPlanRevenueId) { DateTo = dateTo }; var bucket = new RelationPredicateBucket(HealthPlanRevenueFields.Id == healthPlanRevenueId); return(myAdapter.UpdateEntitiesDirectly(healthPlanRevenueEntity, bucket) > 0); } }
/// <summary> Removes the sync logic for member _healthPlanRevenue</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 DesetupSyncHealthPlanRevenue(bool signalRelatedEntity, bool resetFKFields) { base.PerformDesetupSyncRelatedEntity(_healthPlanRevenue, new PropertyChangedEventHandler(OnHealthPlanRevenuePropertyChanged), "HealthPlanRevenue", HealthPlanRevenueItemEntity.Relations.HealthPlanRevenueEntityUsingHealthPlanRevenueId, true, signalRelatedEntity, "HealthPlanRevenueItem", resetFKFields, new int[] { (int)HealthPlanRevenueItemFieldIndex.HealthPlanRevenueId }); _healthPlanRevenue = null; }