예제 #1
0
 protected virtual void OnEntityMessage(EntityMessage <TEntity, TPrimaryKey> message)
 {
     if (Entity == null)
     {
         return;
     }
     if (message.MessageType == EntityMessageType.Deleted && object.Equals(message.PrimaryKey, PrimaryKey))
     {
         Close();
     }
 }
예제 #2
0
            void OnMessage(EntityMessage <TEntity, TPrimaryKey> message)
            {
                if (!owner.IsLoaded)
                {
                    return;
                }
                switch (message.MessageType)
                {
                case EntityMessageType.Added:
                    OnEntityAdded(message.PrimaryKey);
                    break;

                case EntityMessageType.Changed:
                    OnEntityChanged(message.PrimaryKey);
                    break;

                case EntityMessageType.Deleted:
                    OnEntityDeleted(message.PrimaryKey);
                    break;
                }
            }
예제 #3
0
 void OnMessage(EntityMessage <TEntity, TPrimaryKey> message)
 {
     Refresh();
 }