private void lkeServer_EditValueChanged(object sender, EventArgs e) { try { lkeDatabase.Properties.DataSource = oDbUtilityBL.GetDatabases(lkeServer.EditValue.ToString()); } catch (Exception ex) { DbUtilityHelper.DisplayMessageBox("The system could not load databases. Try again\n" + ex.Message, "warning"); } }
/// <summary> /// Populates databases unders the selected server /// </summary> /// <param name="serverName"></param> private void PopulateDatabases(string serverName) { try { //SplashScreenManager.ShowForm(typeof(WaitForm1)); if (!string.IsNullOrEmpty(serverName)) { lkeDatabases.Properties.DataSource = oDbUtilityBL.GetDatabases(serverName); } //SplashScreenManager.CloseForm(); } catch (Exception ex) { DbUtilityHelper.DisplayMessageBox(ex.Message, "error"); } }