Exemplo n.º 1
0
 private void DoAddTables()
 {
     AddTablesAndColumnsRequest.Raise(new AddTablesAndColumnsConfirmation(viewModel.DataViewModel)
     {
         Title = "Adding tables and columns..."
     }, (result) =>
     {
         if (result != null && result.Confirmed && result.SelectedSprint != null && result.SelectedSprint.DbSchemaTables != null)
         {
             foreach (var t in result.SelectedSprint.DbSchemaTables)
             {
                 if (t.IsChecked && t.IsVisible)
                 {
                     var newDBTable = new NodeDbTable(EventAggregator, this, viewModel)
                     {
                         Name = t.Name
                     };
                     if (t.Columns != null)
                     {
                         newDBTable.Nodes = new ObservableCollection <NodeDbColumn>();
                         foreach (var c in t.Columns)
                         {
                             if (c.IsChecked && c.IsVisible)
                             {
                                 var newCol = new NodeDbColumn(EventAggregator, newDBTable, viewModel)
                                 {
                                     Name = c.Name
                                 };
                                 newDBTable.Nodes.Add(newCol);
                             }
                         }
                     }
                     this.Nodes.Add(newDBTable);
                 }
             }
         }
     });
 }
Exemplo n.º 2
0
 public NodeDbColumn(IEventAggregator eventAggregator, NodeDbTable dbTable, MainViewModel viewModel) : base(eventAggregator)
 {
     this.viewModel = viewModel;
     NodeDbTable    = dbTable;
 }
Exemplo n.º 3
0
 public NodeDbColumn(IEventAggregator eventAggregator, NodeDbTable dbTable) : base(eventAggregator)
 {
     NodeDbTable = dbTable;
 }