DBSheetCreateForm Class

Form for defining/creating DBSheet definitions

Inheritance Hierarchy

Namespace: DBaddinAssembly: DBaddin in (DBaddin.dll)

Syntax

public class DBSheetCreateForm : Form

The DBSheetCreateForm type exposes the following members.

Constructors

ClassSummary
public constructorDBSheetCreateForm()

Methods

NameSummary
private methodaddAllFields_Click(Object, EventArgs)
add all fields of currently selected Table to DBSheetCols definitions
private methodassignDBSheet_Click(Object, EventArgs)
direct assignment from Create Form...
private methodciReplace(String, String, String)
replaces keystr with changed in theString, case insensitive !!
private methodclearAllFields_Click(Object, EventArgs)
clears the defined columns and resets the selection fields (Table, ForTable) and the Query
public methodcorrectNonNull(String)
corrects field names of non null-able fields prepended with specialNonNullableChar (e.g. "*") back to the real name
public methodCreateInstance()
private methodcreateQuery_Click(Object, EventArgs)
create the final DBSheet Main Query
private methodCurrentFileLinkLabel_LinkClicked(Object, LinkLabelLinkClickedEventArgs)
current file link clicked: open file using default editor
private methodDatabase_SelectedIndexChanged(Object, EventArgs)
database changed, initialize everything else (Tables, DBSheetCols definition) from scratch
private methodDBSheetCols_CellMouseDown(Object, DataGridViewCellMouseEventArgs)
prepare context menus to be displayed after right mouse click
private methodDBSheetCols_CellValueChanged(Object, DataGridViewCellEventArgs)
handles the various changes in the DBSheetCols grid-view
private methodDBSheetCols_DataError(Object, DataGridViewDataErrorEventArgs)
ignore data errors when loading data into grid-view
private methodDBSheetCols_KeyDown(Object, KeyEventArgs)
catch key presses: Shift F10 or menu key to get the context menu, Ctrl-C/Ctrl-V for copy/pasting foreign lookup info, DEL for clearing cells
private methodDBSheetCols_MouseDown(Object, MouseEventArgs)
reset ContextMenuStrip if outside cells
private methodDBSheetCols_RowsRemoved(Object, DataGridViewRowsRemovedEventArgs)
check for first Row/field if primary column field set
private methodDBSheetColsEditable(Boolean)
if DBSheetCols Definitions should be editable, enable relevant controls
private methodDBSheetColsForDatabases_ItemClicked(Object, ToolStripItemClickedEventArgs)
private methodDBSheetCreateForm_Shown(Object, EventArgs)
entry point of form, invoked by clicking "create/edit DBSheet definition"
private methoddisplayContextMenus()
display context menus depending on cell selected
private methodEnvironEditable(Boolean)
Environment change possible
private methodEnvironment_SelectedIndexChanged(Object, EventArgs)
private methodfillDatabases()
fills all possible databases of current connection using db proprietary code in dbGetAllStr, data coming from field DBGetAllFieldName
private methodfillDatabasesAndSetDropDown()
fill the Database dropdown and set dropdown to database set in connection string
private methodfillTables()
fill all possible tables of currently selected Database
private methodfinalizeSetup()
private methodgetColumns()
fill all possible columns of currently selected table
private methodgetforeignTables()
fill foreign tables into list of strings (is called by and filled in DBSheetCols.CellValueChanged)
private methodgetforeignTables(String)
gets the possible foreign tables in the instance (over all databases)
private methodgetTableDataTypes()
gets the types of currently selected table including size, precision and scale into DataTypes
private methodInitializeComponent()
private methodloadDefs_Click(Object, EventArgs)
loads the DBSheet definitions from a file (xml format)
private methodmoveRow(Int32)
move row in direction given in param direction (-1: up, 1: down)
private methodMoveRowDown_Click(Object, EventArgs)
move (shift) row down
private methodMoveRowUp_Click(Object, EventArgs)
move (shift) row up
private methodPassword_Enter(Object, EventArgs)
entering Password box to remember local changed password
private methodPassword_KeyPress(Object, KeyPressEventArgs)
enter pressed in Password text-box triggering initialization
private methodPassword_Leave(Object, EventArgs)
leaving Password text-box triggering initialization
private methodQuery_TextChanged(Object, EventArgs)
private methodquotedReplace(String, String)
replaces tblPlaceHolder with changed in theString, quote aware (keystr is not replaced within quotes) !!
private methodRegenerateAllLookupQueries_Click(Object, EventArgs)
(re)generates ALL lookup queries
private methodRegenerateThisLookupQuery_Click(Object, EventArgs)
(re)generates the lookup query for active row/cell
private methodregenLookupForRow(Int32, Boolean)
(re)generate lookup for row in rowIndex
private methodRemoveLookupQueryTest_Click(Object, EventArgs)
removes the lookup query test currently open
private methodresetDBSheetCreateForm()
private methodsaveDefinitionsToFile(ref Boolean)
saves the definitions currently stored in theDBSheetCreateForm to newly selected file (saveAs = True) or to the file already stored in setting "dsdPath"
private methodsaveDefs_Click(Object, EventArgs)
save definitions button
private methodsaveDefsAs_Click(Object, EventArgs)
save definitions as button
private methodsaveEnabled(ref Boolean)
toggle saveEnabled behaviour
private methodsetLinkLabel(String)
sets current definition file path hyperlink label. Displayed is only the filename, full path is stored in tag and visible in tool-tip
private methodsetPasswordAndInit()
called after new password has been entered, reset stored password and fill database dropdown
private methodTable_SelectedIndexChanged(Object, EventArgs)
selecting the Table triggers enabling the DBSheetCols definition (fills columns/fields of that table and resetting DBSheetCols definition)
private methodTableEditable(Boolean)
Table/Database/Password change possible
private methodTestLookupQuery_Click(Object, EventArgs)
test the (generated or manually edited) lookup query in currently selected row
private methodtestQuery_Click(Object, EventArgs)
test the final DBSheet Main query or remove the test query sheet/workbook
private methodtestTheQuery(String, ref Boolean)
for testing either the main query or the selected lookup query being given in theQueryText
private methodWhereClause_TextChanged(Object, EventArgs)
private methodxmlDbsheetConfig()
creates xml DBsheet parameter string from the data entered in theDBSheetCreateForm

Properties

NameSummary
public propertiesaddAllFields
sealed propertiesassignDBSheet
public propertiesclearAllFields
public propertiescreateQuery
sealed propertiesCurrentFileLinkLabel
public propertiesDatabase
sealed propertiesDBSheetCols
sealed propertiesDBSheetColsForDatabases
sealed propertiesDBSheetColsLookupMenu
sealed propertiesDBSheetColsMoveMenu
sealed propertiesEnvironment
public propertiesLDatabase
public propertiesLenvironment
public propertiesloadDefs
public propertiesLPwd
public propertiesLQuery
public propertiesLTable
public propertiesLWhereParamClause
sealed propertiesMoveRowDown
sealed propertiesMoveRowUp
sealed propertiesPassword
public propertiesQuery
sealed propertiesRegenerateAllLookupQueries
sealed propertiesRegenerateThisLookupQuery
sealed propertiesRemoveLookupQueryTest
public propertiessaveDefs
public propertiessaveDefsAs
public propertiesTable
sealed propertiesTestLookupQuery
public propertiestestQuery
public propertiesWhereClause

Fields

NameDescription
private fieldcomponents
private fieldcurrentFilepath
private fieldFormDisabled
whether the form fields should react to changes (set if making changes within code)....
private fieldFormLocalPwd
private fieldlinklabelToolTip
private fieldmyDBConnHelper
common connection settings factored in helper class
private fieldselColIndex
private fieldselRowIndex
private fieldspecialNonNullableChar
character prepended before field name to specify non null-able fields
private fieldTableDataTypes
private fieldtblPlaceHolder
placeholder used in lookup queries to identify the current field's lookup table
public fieldToolTipMain
private fieldvisualControls