示例#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();
 }