private void LoadObjectDatasets() { if (_database.Datasets == null || _database.Datasets.Count == 0) { _database.Connect(); _database.LoadDatasets(); _database.DisConnect(); } foreach (IObjectDataset template in _database.Datasets) { cmbTemplate.Items.Add(template.Name); } }
private void LoadDatabase(ITemplateDatabase database, TreeNode pNode) { if (database.Workspace == null) { database.Connect(); } string dbName = ((IWorkspace)database.Workspace).PathName; if (database.IsTemplateDatabase()) { TreeNode tmpNode = pNode.Nodes.Add(dbName + "\\模板", "模板", 2); TreeNode domainNode = pNode.Nodes.Add(dbName + "\\数据字典", "数据字典", 3); TreeNode datasetNode = pNode.Nodes.Add(dbName + "\\数据集", "数据集", 7); } }