private void btnGetDatabases_Click(object sender, EventArgs e) { //Attempt Login _user = textBoxLogin.Text; _password = textBoxPassword.Text; _url = textBoxURL.Text; _db = cmbDatabase.Text; //write config file saveConfig(); //get dbs from test connection try { _conn = IomFactory.CreateHttpServerConnection(_url, _db, _user, _password); string[] databases = _conn.GetDatabases(); for (int i = 0; i < databases.Length; i++) { cmbDatabase.Items.Add(databases[i]); } } catch (Exception err) { MessageBox.Show(err.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void btnGetDatabases_Click(object sender, EventArgs e) { var oldCursor = Cursor; Cursor = Cursors.WaitCursor; cmbDatabase.Items.Clear(); _url = txtUrl.Text; //get dbs from test connection try { _conn = IomFactory.CreateHttpServerConnection(_url, _db, _user, _password); string[] databases = _conn.GetDatabases(); for (int i = 0; i < databases.Length; i++) { cmbDatabase.Items.Add(databases[i]); } Cursor = oldCursor; } catch (Exception err) { Cursor = oldCursor; MessageBox.Show(err.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void Database_Click(object sender, EventArgs e) { HttpServerConnection server = IomFactory.CreateHttpServerConnection(URLTextBox.Text); string[] dbs = server.GetDatabases(); DBsComboBox.Items.Clear(); DBsComboBox.Items.AddRange(dbs); }
private void tbUrl_Leave(object sender, EventArgs e) { HttpServerConnection connection = IomFactory.CreateHttpServerConnection(tbUrl.Text); var dbs = connection.GetDatabases(); tbDb.Items.Clear(); foreach (var db in dbs) { tbDb.Items.Add(db); } }
public static string[] GetDatabases(string serverURL) { HttpServerConnection conn = IomFactory.CreateHttpServerConnection(serverURL); return(conn.GetDatabases()); }
private void btnGetDatabases_Click(object sender, EventArgs e) { //Attempt Login _user = textBoxLogin.Text; _password = textBoxPassword.Text; _url = textBoxURL.Text; _db = cmbDatabase.Text; //write config file saveConfig(); //get dbs from test connection try { _conn = IomFactory.CreateHttpServerConnection(_url, _db, _user, _password); string[] databases = _conn.GetDatabases(); for (int i = 0; i < databases.Length; i++) { cmbDatabase.Items.Add(databases[i]); } } catch (Exception err) { MessageBox.Show(err.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }