private void OnInsertIntoTableMenuItemClick(object sender, EventArgs e) { string selectedDbName = DatabaseTreeView.SelectedNode.Parent.Text.ToString(); string selectedTableName = DatabaseTreeView.SelectedNode.Text.ToString(); Database database = dbContext.SchemaQuery.GetDatabase(selectedDbName); Table tableSchema = database.GetTable(selectedTableName); var insertForm = new InsertForm(dbContext, database, tableSchema); insertForm.Show(this); switch (insertForm.DialogResult) { case DialogResult.OK: break; } }