private static ConnectionEditorForm.NamedArrayList UpdateDropDownList( ConnectionEditorForm.NamedArrayList array, string str) { return ConnectionEditorForm.UpdateDropDownList(array, str); }
internal ConnectionEditor( IngresDataAdapter adapter, System.ComponentModel.Design.IDesignerHost host) { if (adapter != null && adapter.SelectCommand != null && adapter.SelectCommand.Connection != null) connection = adapter.SelectCommand.Connection; else connection = new IngresConnection(); // format the connection string in key/value pairs nv = ConnectStringConfig.ParseConnectionString( connection.ConnectionString); // the editor will update the key/value pairs Form dlgConnection = new ConnectionEditorForm(nv); DialogResult result = dlgConnection.ShowDialog(); if (result == DialogResult.Cancel) // if Cancel button, return { //MessageBox.Show("Connection DialogResult.Cancel", "ConnectionEditor"); return; } // else (result == DialogResult.OK) // if Next button, go on // rebuild the updated key/value pairs back into a connection string connection.ConnectionString = ConnectStringConfig.ToConnectionString(nv); // connect the Connection object to the four Adapter commands if (adapter != null) { if (adapter.SelectCommand != null) adapter.SelectCommand.Connection = connection; if (adapter.InsertCommand != null) adapter.InsertCommand.Connection = connection; if (adapter.UpdateCommand != null) adapter.UpdateCommand.Connection = connection; if (adapter.DeleteCommand != null) adapter.DeleteCommand.Connection = connection; } }
} // LoadDropDownValues private static ConnectionEditorForm.NamedArrayList UpdateDropDownList( ConnectionEditorForm.NamedArrayList array, Control ctrl) { return UpdateDropDownList(array, ctrl.Text); }
internal ConnectionEditor(IngresConnection connectionParm) { connection = connectionParm; // format the connection string in key/value pairs nv = ConnectStringConfig.ParseConnectionString( connection.ConnectionString); // the editor will update the key/value pairs Form dlgConnection = new ConnectionEditorForm(nv); DialogResult result = dlgConnection.ShowDialog(); if (result == DialogResult.Cancel) // if Cancel button, return { //MessageBox.Show("Connection DialogResult.Cancel", "ConnectionEditor"); return; } // else (result == DialogResult.OK) // if Next button, go on // rebuild the updated key/value pairs back into a connection string connection.ConnectionString = ConnectStringConfig.ToConnectionString(nv); }