예제 #1
0
        protected IList <PdmTable> GetPdmTables()
        {
            PdmReader reader = new PdmReader(FileName);

            reader.InitData();
            IList <PdmTable> pdmTables = reader.Tables;

            DbType = reader.GetDbType().ToString();
            return(pdmTables);
        }
예제 #2
0
        private void ReadPdmFile(string filePath)
        {
            var pdmReader = new PdmReader(filePath);

            pdmReader.InitData();

            TreeModelOperate.Context.Init(pdmReader.Models);
            XmlNodeOperate.Init(pdmReader.Tables);

            TwLeaf.ItemsSource = TreeModelOperate.Context.TreeModels;
            var tableInfos = XmlNodeOperate.Context.TableInfos;

            if (tableInfos != null && tableInfos.Count > 0)
            {
                var firstOrDefault = tableInfos.FirstOrDefault();
                if (firstOrDefault != null)
                {
                    BindColumnDataGrid(firstOrDefault.Id);
                }
            }
        }