Exemplo n.º 1
0
        private void JournalSearch_OnReply(EntitySearchResultEvent response)
        {
            _eventAggregator.GetEvent <PubSubEvent <EntitySearchResultEvent> >()
            .Unsubscribe(JournalSearch_OnReply);

            if (response.DialogResult.Equals(true))
            {
                RootEntity = _cashJournalRepository.Find(response.EntityId);
            }
        }
Exemplo n.º 2
0
        private void ComponentSearch_OnReply(EntitySearchResultEvent response)
        {
            _eventAggregator.GetEvent <PubSubEvent <EntitySearchResultEvent> >()
            .Unsubscribe(ComponentSearch_OnReply);

            if (!response.DialogResult.Equals(true))
            {
                return;
            }

            Product component = _productRepository.Find(response.EntityId);
            Product kit       = RootEntity as Product;

            _productRepository.AddComponent(kit, component);
        }