Ejemplo n.º 1
0
 /// <summary> setups the sync logic for member _person</summary>
 /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
 private void SetupSyncPerson(IEntityCore relatedEntity)
 {
     if (_person != relatedEntity)
     {
         DesetupSyncPerson(true, true);
         _person = (PersonEntity)relatedEntity;
         this.PerformSetupSyncRelatedEntity(_person, new PropertyChangedEventHandler(OnPersonPropertyChanged), "Person", SquawkTalk.Datalayer.RelationClasses.StaticEmailTemplateRelations.PersonEntityUsingPersonGuidStatic, true, ref _alreadyFetchedPerson, new string[] {  });
     }
 }
Ejemplo n.º 2
0
 /// <summary>Private CTor for deserialization</summary>
 /// <param name="info"></param>
 /// <param name="context"></param>
 protected EmailTemplateEntity(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     _person = (PersonEntity)info.GetValue("_person", typeof(PersonEntity));
     if (_person != null)
     {
         _person.AfterSave += new EventHandler(OnEntityAfterSave);
     }
     _personReturnsNewIfNotFound = info.GetBoolean("_personReturnsNewIfNotFound");
     _alwaysFetchPerson          = info.GetBoolean("_alwaysFetchPerson");
     _alreadyFetchedPerson       = info.GetBoolean("_alreadyFetchedPerson");
     this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance(), PersistenceInfoProviderSingleton.GetInstance());
     // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
     // __LLBLGENPRO_USER_CODE_REGION_END
 }
Ejemplo n.º 3
0
 /// <summary> Removes the sync logic for member _person</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 DesetupSyncPerson(bool signalRelatedEntity, bool resetFKFields)
 {
     this.PerformDesetupSyncRelatedEntity(_person, new PropertyChangedEventHandler(OnPersonPropertyChanged), "Person", SquawkTalk.Datalayer.RelationClasses.StaticEmailTemplateRelations.PersonEntityUsingPersonGuidStatic, true, signalRelatedEntity, "EmailTemplates", resetFKFields, new int[] { (int)EmailTemplateFieldIndex.PersonGuid });
     _person = null;
 }