//Set Databases to CMB public void DatabasesToCombobox(ComboBox comboBox) { //Clear cmb comboBox.Items.Clear(); List <string> temp = GetDbInfo.GetAllDatabases(); if (temp.Count > 0) { temp.Insert(0, "All Databases"); } else { temp.Add("No Db Found"); } //Add all items foreach (string i in temp) { comboBox.Items.Add(i); } //Set selected item comboBox.SelectedIndex = 0; }
//Get database Status public static void Status(StackPanel container) { container.Children.Clear(); foreach (string i in GetDbInfo.GetAllDatabases()) { if (GetDbInfo.CreateDBConnection(i) == null) { StatusItem(i, DBStatus.Error, container); } else { StatusItem(i, DBStatus.Oke, container); } } }