예제 #1
0
 public static void SetSeriesId(string name, int seriesId)
 {
     var updateEntity = new ImportSeriesNameEntity { SeriesId = seriesId };
     Database.UpdateEntitiesDirectly(updateEntity, new RelationPredicateBucket(ImportSeriesNameFields.Name == name));
 }
 /// <summary> Removes the sync logic for member _importSeriesName</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 DesetupSyncImportSeriesName(bool signalRelatedEntity, bool resetFKFields)
 {
     this.PerformDesetupSyncRelatedEntity( _importSeriesName, new PropertyChangedEventHandler( OnImportSeriesNamePropertyChanged ), "ImportSeriesName", TVJunkie.DatabaseAccessLayer.RelationClasses.StaticImportSeriesNameCandidateRelations.ImportSeriesNameEntityUsingImportSeriesNameIdStatic, true, signalRelatedEntity, "ImportSeriesNameCandidates", resetFKFields, new int[] { (int)ImportSeriesNameCandidateFieldIndex.ImportSeriesNameId } );
     _importSeriesName = null;
 }
 /// <summary> setups the sync logic for member _importSeriesName</summary>
 /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
 private void SetupSyncImportSeriesName(IEntityCore relatedEntity)
 {
     if(_importSeriesName!=relatedEntity)
     {
         DesetupSyncImportSeriesName(true, true);
         _importSeriesName = (ImportSeriesNameEntity)relatedEntity;
         this.PerformSetupSyncRelatedEntity( _importSeriesName, new PropertyChangedEventHandler( OnImportSeriesNamePropertyChanged ), "ImportSeriesName", TVJunkie.DatabaseAccessLayer.RelationClasses.StaticImportSeriesNameCandidateRelations.ImportSeriesNameEntityUsingImportSeriesNameIdStatic, true, new string[] {  } );
     }
 }
 protected ImportSeriesNameCandidateEntity(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     if(SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _importSeriesName = (ImportSeriesNameEntity)info.GetValue("_importSeriesName", typeof(ImportSeriesNameEntity));
         if(_importSeriesName!=null)
         {
             _importSeriesName.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
     }
     // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
     // __LLBLGENPRO_USER_CODE_REGION_END
 }