public JoinDBTF() { dataManager = MainDescription.MainFrm.PluginDictionary["数据管理"] as IDataManager; ConnectorSelector = new ExtendSelector <IDataBaseConnector>(); TableSelector = new ExtendSelector <TableInfo>(); ImportColumns = new ObservableCollection <string>(); ConnectorSelector.GetItems = () => dataManager.CurrentConnectors.ToList(); ConnectorSelector.SelectChanged += (s, e) => TableSelector.SetSource(ConnectorSelector.SelectItem.RefreshTableNames()); TableSelector.SelectChanged += (s, e) => { IDataBaseConnector connector = ConnectorSelector.SelectItem; if (connector == null) { return; } TableInfo table = TableSelector.SelectItem; if (table == null) { return; } IEnumerable <IDictionarySerializable> datas = ConnectorSelector.SelectItem.GetEntities(table.Name, typeof(FreeDocument), 10, 0); IEnumerable <string> keys = datas.GetKeys(); ImportColumns.Clear(); foreach (string key in keys) { ImportColumns.Add(key); } }; }
public JoinDBTF() { dataManager = MainDescription.MainFrm.PluginDictionary["数据管理"] as IDataManager; ConnectorSelector = new ExtendSelector<IDataBaseConnector>(); TableSelector = new ExtendSelector<TableInfo>(); ImportColumns = new ObservableCollection<string>(); ConnectorSelector.GetItems = () => dataManager.CurrentConnectors.ToList(); ConnectorSelector.SelectChanged += (s, e) => TableSelector.SetSource(ConnectorSelector.SelectItem.RefreshTableNames()); TableSelector.SelectChanged += (s, e) => { IDataBaseConnector connector = ConnectorSelector.SelectItem; if (connector == null) return; TableInfo table = TableSelector.SelectItem; if (table == null) return; IEnumerable<IDictionarySerializable> datas = ConnectorSelector.SelectItem.GetEntities(table.Name, typeof (FreeDocument), 10, 0); IEnumerable<string> keys = datas.GetKeys(); ImportColumns.Clear(); foreach (string key in keys) { ImportColumns.Add(key); } }; }
public DbEX() { dataManager = MainDescription.MainFrm.PluginDictionary["数据管理"] as IDataManager; ConnectorSelector = new ExtendSelector<IDataBaseConnector>(); ConnectorSelector.SetSource(dataManager.CurrentConnectors); }
public DbEX() { dataManager = MainDescription.MainFrm.PluginDictionary["数据管理"] as IDataManager; ConnectorSelector = new ExtendSelector <IDataBaseConnector>(); ConnectorSelector.SetSource(dataManager.CurrentConnectors); }
protected DBConnectorBase() { IsUseable = false; TableNames = new ExtendSelector <TableInfo>(); TableNames.SetSource(new List <TableInfo>()); AutoConnect = false; }
public DbGE() { dataManager = MainDescription.MainFrm.PluginDictionary["数据管理"] as IDataManager; ConnectorSelector=new ExtendSelector<IDataBaseConnector>(); ConnectorSelector.GetItems = () => dataManager.CurrentConnectors.ToList(); TableNames=new ExtendSelector<TableInfo>(); Mount = -1; ConnectorSelector.SelectChanged += (s, e) => TableNames.SetSource(ConnectorSelector.SelectItem.RefreshTableNames()); }
public DbGE() { dataManager = MainDescription.MainFrm.PluginDictionary["数据管理"] as IDataManager; ConnectorSelector = new ExtendSelector <IDataBaseConnector>(); ConnectorSelector.GetItems = () => dataManager.CurrentConnectors.ToList(); TableNames = new ExtendSelector <TableInfo>(); Mount = -1; ConnectorSelector.SelectChanged += (s, e) => TableNames.SetSource(ConnectorSelector.SelectItem.RefreshTableNames()); }
public DbGE() { dataManager = MainDescription.MainFrm.PluginDictionary["数据管理"] as IDataManager; ConnectorSelector = new ExtendSelector <IDataBaseConnector>(); ConnectorSelector.GetItems = () => dataManager.CurrentConnectors.ToList(); TableNames = new ExtendSelector <string>(); Mount = -1; ConnectorSelector.SelectChanged += (s, e) => TableNames.SetSource(ConnectorSelector.SelectItem.RefreshTableNames().Select(d => d.Name)); TableNames.SelectChanged += (s, e) => { this.InformPropertyChanged("TableNames"); }; }