Exemple #1
0
        public void RefreshUIFromDatabase()
        {
            tlvLoadedTables.ClearObjects();

            if (_loadMetadata == null)
            {
                return;
            }

            TableInfo[] allTables;
            HICDatabaseConfiguration config;

            try
            {
                if (!_loadMetadata.GetAllCatalogues().Any())
                {
                    throw new Exception("There are no Catalogues (Datasets) associated with this LoadMetadata, choose one or more Catalogues by clicking 'Edit..' in LoadMetadataUI ");
                }

                allTables = _loadMetadata.GetDistinctTableInfoList(true).ToArray();
                config    = new HICDatabaseConfiguration(_loadMetadata);
            }
            catch (Exception e)
            {
                CommonFunctionality.Fatal("Could not fetch data", e);
                tlvLoadedTables.Visible = false;
                return;
            }
            tlvLoadedTables.Visible = true;

            _raw = new LoadDiagramServerNode(LoadBubble.Raw, config.DeployInfo[LoadBubble.Raw], allTables, config);
            var staging = new LoadDiagramServerNode(LoadBubble.Staging, config.DeployInfo[LoadBubble.Staging], allTables, config);
            var live    = new LoadDiagramServerNode(LoadBubble.Live, config.DeployInfo[LoadBubble.Live], allTables, config);

            tlvLoadedTables.AddObject(_raw);
            tlvLoadedTables.AddObject(staging);
            tlvLoadedTables.AddObject(live);

            //expand the servers
            foreach (var rootObject in tlvLoadedTables.Objects)
            {
                ExpandToDepth(2, rootObject);
            }

            loadStateUI1.SetStatus(LoadStateUI.LoadState.Unknown);
        }
 protected bool Equals(LoadDiagramServerNode other)
 {
     return(base.Equals(other) && _bubble == other._bubble && Equals(_database, other._database));
 }