Пример #1
0
 private void OnNodesReferencesRegistered(MetadataTreeNode root)
 {
     this.Nodes.Add(root);
     Z.Notify(new Notification {
         Title = "Hermes", Content = "Ссылки зарегистрированы."
     });
 }
Пример #2
0
 private void OnDependentNodesBuilt(MetadataTreeNode node)
 {
     this.SelectedNode.Children.Clear();
     foreach (MetadataTreeNode child in node.Children)
     {
         child.Parent = this.SelectedNode;
         this.SelectedNode.Children.Add(child);
     }
 }
Пример #3
0
        public void DocumentsTreeIsBuilt(MetadataTreeNode root)
        {
            if (root == null)
            {
                return;
            }

            Dispatcher.Invoke(() =>
            {
                MetadataTreeViewModel viewModel = this.DataContext as MetadataTreeViewModel;
                if (viewModel == null)
                {
                    return;
                }
                viewModel.Nodes.Add(root);
            });
        }
Пример #4
0
        private void OnRegisterNodesReferencesForExchange()
        {
            if (this.SourceInfoBase == null)
            {
                Z.Notify(new Notification {
                    Title = "Hermes", Content = "Не выбран источник данных!"
                });
                return;
            }
            if (this.Department == null)
            {
                Z.Notify(new Notification {
                    Title = "Hermes", Content = "Не выбран филиал!"
                });
                return;
            }
            if (this.Nodes.Count == 0)
            {
                Z.Notify(new Notification {
                    Title = "Hermes", Content = "Не выбран узел метаданных!"
                });
                return;
            }
            DocumentsTreeService service = new DocumentsTreeService();
            MetadataTreeNode     root    = this.Nodes[0];

            this.Nodes.Clear();
            try
            {
                service.Parameters.Add("SourceInfoBase", this.SourceInfoBase);
                service.Parameters.Add("TargetInfoBase", this.TargetInfoBase);
                service.Parameters.Add("StartPeriod", this.StartOfPeriod);
                service.Parameters.Add("EndPeriod", this.EndOfPeriod);
                service.Parameters.Add("Department", this.Department.Identity);
                service.RegisterNodesReferencesForExchange(root, new Progress <MetadataTreeNode>(OnNodesReferencesRegistered));
            }
            catch (Exception ex)
            {
                Z.Notify(new Notification {
                    Title = "Hermes", Content = Z.GetErrorText(ex) + Environment.NewLine + ex.StackTrace
                });
            }
        }
Пример #5
0
 private void ReportProgress(MetadataTreeNode node)
 {
 }
Пример #6
0
 private void OnNodesForeignReferencesRegistered(MetadataTreeNode root)
 {
     Z.Notify(new Notification {
         Title = "Hermes", Content = "Внешние ссылки зарегистрированы."
     });
 }
Пример #7
0
 public void OnDataNodesTreeBuilt(MetadataTreeNode node)
 {
     this.Nodes.Add(node);
 }