private void LoadServers() { try { //Retrieve the available servers. List <string> ListResult = DBSettings.GetServers(); for (int j = 0; j < ListResult.Count; j++) { cmbServer.Items.Add(ListResult[j]); } if (this.cmbServer.Items.Count > 0) { this.cmbServer.SelectedIndex = 0; } else { this.cmbServer.Text = "<No available SQL Servers>"; } } catch (Exception ex) { MessageBox.ShowBox("MessageID74", BMC_Icon.Error); ExceptionManager.Publish(ex); } }
private void GetSQLServers() { //Retrieve the available servers. List <string> ListResult = DBSettings.GetServers(); for (int j = 0; j < ListResult.Count; j++) { cmbServers.Items.Add(ListResult[j]); } if (this.cmbServers.Items.Count > 0) { this.cmbServers.SelectedIndex = 0; } else { this.cmbServers.Text = "<No available SQL Servers>"; } }