private void newButton_Click(object sender, EventArgs e) { var form = new ConnectionStringBuilderForm(); if (form.ShowDialog() == DialogResult.OK) { var connectionProperties = form.ConnectionProperties; Add(connectionProperties); } }
private void Edit_Click(object sender, EventArgs e) { var configurationNode = SelectedConfigurationNode; var form = new ConnectionStringBuilderForm(); form.ConnectionProperties = ConnectionPropertiesRepository.GetFromConfiguration(configurationNode); var dialogResult = form.ShowDialog(); if (dialogResult == DialogResult.OK) { ConnectionPropertiesRepository.Save(form.ConnectionProperties, configurationNode); var row = _dataTable.DefaultView[_dataGrid.CurrentCell.RowIndex].Row; LoadConnection(configurationNode, row); } }
private void Edit_Click(object sender, EventArgs e) { var folder = SelectedConfigurationNode; var connectionProperties = new ConnectionProperties(); connectionProperties.Load(folder); var form = new ConnectionStringBuilderForm(); form.ConnectionProperties = connectionProperties; var dialogResult = form.ShowDialog(); if (dialogResult == DialogResult.OK) { connectionProperties = form.ConnectionProperties; connectionProperties.Save(folder); var row = _dataTable.DefaultView[_dataGrid.CurrentCell.RowIndex].Row; LoadConnection(folder, row); } }