private void OnNodesReferencesRegistered(MetadataTreeNode root) { this.Nodes.Add(root); Z.Notify(new Notification { Title = "Hermes", Content = "Ссылки зарегистрированы." }); }
private void OnDependentNodesBuilt(MetadataTreeNode node) { this.SelectedNode.Children.Clear(); foreach (MetadataTreeNode child in node.Children) { child.Parent = this.SelectedNode; this.SelectedNode.Children.Add(child); } }
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); }); }
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 }); } }
private void ReportProgress(MetadataTreeNode node) { }
private void OnNodesForeignReferencesRegistered(MetadataTreeNode root) { Z.Notify(new Notification { Title = "Hermes", Content = "Внешние ссылки зарегистрированы." }); }
public void OnDataNodesTreeBuilt(MetadataTreeNode node) { this.Nodes.Add(node); }