Ejemplo n.º 1
0
        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);
                }
            };
        }
Ejemplo n.º 2
0
        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);
                }
            };
        }
Ejemplo n.º 3
0
        public DbEX()
        {
            dataManager = MainDescription.MainFrm.PluginDictionary["数据管理"] as IDataManager;
            ConnectorSelector = new ExtendSelector<IDataBaseConnector>();

            ConnectorSelector.SetSource(dataManager.CurrentConnectors);
        }
Ejemplo n.º 4
0
Archivo: DbEx.cs Proyecto: yxddxs/Hawk
        public DbEX()
        {
            dataManager       = MainDescription.MainFrm.PluginDictionary["数据管理"] as IDataManager;
            ConnectorSelector = new ExtendSelector <IDataBaseConnector>();


            ConnectorSelector.SetSource(dataManager.CurrentConnectors);
        }
Ejemplo n.º 5
0
        protected DBConnectorBase()
        {
            IsUseable = false;


            TableNames = new ExtendSelector <TableInfo>();
            TableNames.SetSource(new List <TableInfo>());
            AutoConnect = false;
        }
Ejemplo n.º 6
0
        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());
        }
Ejemplo n.º 7
0
        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());
        }
Ejemplo n.º 8
0
        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"); };
        }