Exemplo n.º 1
0
        public static void Refresh()
        {
            var path = Path.Combine(Environment.CurrentDirectory, Settings.Default.DatabaseRelativePath);

            if (!Directory.Exists(path))
            {
                MessageBox.Show(string.Format("Не найдена директория с данными: '{0}'", path));
                return;
            }

            foreach (var file in Directory.GetFiles(path, @"*.mdb"))
            {
                var reader = new TableReader(file);
                var schema = new TablesSchema(file);
                foreach (var tableName in schema.GetTableNames())
                {
                    Put(new TableKey(tableName, file), reader.FetchTable(tableName));
                }
            }
        }
Exemplo n.º 2
0
        public static void Refresh()
        {
            var path = Path.Combine(Environment.CurrentDirectory, Settings.Default.DatabaseRelativePath);

            if (!Directory.Exists(path))
            {
                MessageBox.Show(string.Format("Не найдена директория с данными: '{0}'", path));
                return;
            }

            foreach (var file in Directory.GetFiles(path, @"*.mdb"))
            {
                var reader = new TableReader(file);
                var schema = new TablesSchema(file);
                foreach (var tableName in schema.GetTableNames())
                {
                    Put(new TableKey(tableName, file), reader.FetchTable(tableName));
                }
            }
        }