DBSheetCreateForm Class
Form for defining/creating DBSheet definitions
Inheritance Hierarchy
- System.Windows.Forms.Form
- DBaddin.DBSheetCreateForm
Namespace: DBaddinAssembly: DBaddin in (DBaddin.dll)
Syntax
public class DBSheetCreateForm : Form
The DBSheetCreateForm type exposes the following members.
Constructors
Class | Summary | |
---|---|---|
DBSheetCreateForm() |
Methods
Name | Summary | |
---|---|---|
addAllFields_Click(Object, EventArgs) | add all fields of currently selected Table to DBSheetCols definitions | |
assignDBSheet_Click(Object, EventArgs) | direct assignment from Create Form... | |
ciReplace(String, String, String) | replaces keystr with changed in theString, case insensitive !! | |
clearAllFields_Click(Object, EventArgs) | clears the defined columns and resets the selection fields (Table, ForTable) and the Query | |
correctNonNull(String) | corrects field names of non null-able fields prepended with specialNonNullableChar (e.g. "*") back to the real name | |
CreateInstance() | ||
createQuery_Click(Object, EventArgs) | create the final DBSheet Main Query | |
CurrentFileLinkLabel_LinkClicked(Object, LinkLabelLinkClickedEventArgs) | current file link clicked: open file using default editor | |
Database_SelectedIndexChanged(Object, EventArgs) | database changed, initialize everything else (Tables, DBSheetCols definition) from scratch | |
DBSheetCols_CellMouseDown(Object, DataGridViewCellMouseEventArgs) | prepare context menus to be displayed after right mouse click | |
DBSheetCols_CellValueChanged(Object, DataGridViewCellEventArgs) | handles the various changes in the DBSheetCols grid-view | |
DBSheetCols_DataError(Object, DataGridViewDataErrorEventArgs) | ignore data errors when loading data into grid-view | |
DBSheetCols_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 | |
DBSheetCols_MouseDown(Object, MouseEventArgs) | reset ContextMenuStrip if outside cells | |
DBSheetCols_RowsRemoved(Object, DataGridViewRowsRemovedEventArgs) | check for first Row/field if primary column field set | |
DBSheetColsEditable(Boolean) | if DBSheetCols Definitions should be editable, enable relevant controls | |
DBSheetColsForDatabases_ItemClicked(Object, ToolStripItemClickedEventArgs) | connect to the selected foreign database and get the tables into the ftable cell (!), the rest of the column still has the foreign tables of the main database. | |
DBSheetCreateForm_Shown(Object, EventArgs) | entry point of form, invoked by clicking "create/edit DBSheet definition" | |
displayContextMenus() | display context menus depending on cell selected | |
EnvironEditable(Boolean) | Environment change possible | |
Environment_SelectedIndexChanged(Object, EventArgs) | set selected environment (global) to set environment, reflect in ribbon and "restart" DBSheetCreateForm to get necessary information | |
fillDatabases() | fills all possible databases of current connection using db proprietary code in dbGetAllStr, data coming from field DBGetAllFieldName | |
fillDatabasesAndSetDropDown() | fill the Database dropdown and set dropdown to database set in connection string | |
fillTables() | fill all possible tables of currently selected Database | |
finalizeSetup() | factored out parts of setup for reuse in Environment_SelectedIndexChanged (after the environment is changed, need to reconnect and load all schema information) | |
getColumns() | fill all possible columns of currently selected table | |
getforeignTables() | fill foreign tables into list of strings (is called by and filled in DBSheetCols.CellValueChanged) | |
getforeignTables(String) | gets the possible foreign tables in the instance (over all databases) | |
getTableDataTypes() | gets the types of currently selected table including size, precision and scale into DataTypes | |
InitializeComponent() | ||
loadDefs_Click(Object, EventArgs) | loads the DBSheet definitions from a file (xml format) | |
moveRow(Int32) | move row in direction given in param direction (-1: up, 1: down) | |
MoveRowDown_Click(Object, EventArgs) | move (shift) row down | |
MoveRowUp_Click(Object, EventArgs) | move (shift) row up | |
Password_Enter(Object, EventArgs) | entering Password box to remember local changed password | |
Password_KeyPress(Object, KeyPressEventArgs) | enter pressed in Password text-box triggering initialization | |
Password_Leave(Object, EventArgs) | leaving Password text-box triggering initialization | |
Query_TextChanged(Object, EventArgs) | block assignment possibility of DBSheet after query has been changed (needs to be saved first) | |
quotedReplace(String, String) | replaces tblPlaceHolder with changed in theString, quote aware (keystr is not replaced within quotes) !! | |
RegenerateAllLookupQueries_Click(Object, EventArgs) | (re)generates ALL lookup queries | |
RegenerateThisLookupQuery_Click(Object, EventArgs) | (re)generates the lookup query for active row/cell | |
regenLookupForRow(Int32, Boolean) | (re)generate lookup for row in rowIndex | |
RemoveLookupQueryTest_Click(Object, EventArgs) | removes the lookup query test currently open | |
resetDBSheetCreateForm() | reset the DBSheet Create form after 1) an error (change environment to get out) or 2) to let user enter password (Password_Leave with setPasswordAndInit afterwards) | |
saveDefinitionsToFile(ref Boolean) | saves the definitions currently stored in theDBSheetCreateForm to newly selected file (saveAs = True) or to the file already stored in setting "dsdPath" | |
saveDefs_Click(Object, EventArgs) | save definitions button | |
saveDefsAs_Click(Object, EventArgs) | save definitions as button | |
saveEnabled(ref Boolean) | toggle saveEnabled behaviour | |
setLinkLabel(String) | sets current definition file path hyperlink label. Displayed is only the filename, full path is stored in tag and visible in tool-tip | |
setPasswordAndInit() | called after new password has been entered, reset stored password and fill database dropdown | |
Table_SelectedIndexChanged(Object, EventArgs) | selecting the Table triggers enabling the DBSheetCols definition (fills columns/fields of that table and resetting DBSheetCols definition) | |
TableEditable(Boolean) | Table/Database/Password change possible | |
TestLookupQuery_Click(Object, EventArgs) | test the (generated or manually edited) lookup query in currently selected row | |
testQuery_Click(Object, EventArgs) | test the final DBSheet Main query or remove the test query sheet/workbook | |
testTheQuery(String, ref Boolean) | for testing either the main query or the selected lookup query being given in theQueryText | |
WhereClause_TextChanged(Object, EventArgs) | block assignment possibility of DBSheet after query has been changed (needs to be saved first) | |
xmlDbsheetConfig() | creates xml DBsheet parameter string from the data entered in theDBSheetCreateForm |
Properties
Name | Summary | |
---|---|---|
addAllFields | ||
clearAllFields | ||
createQuery | ||
Database | ||
LDatabase | ||
Lenvironment | ||
loadDefs | ||
LPwd | ||
LQuery | ||
LTable | ||
LWhereParamClause | ||
Query | ||
saveDefs | ||
saveDefsAs | ||
Table | ||
testQuery | ||
WhereClause |
Fields
Name | Description | |
---|---|---|
components | ||
currentFilepath | the currently set file path of the DBSheet definition file | |
FormDisabled | whether the form fields should react to changes (set if making changes within code).... | |
FormLocalPwd | temporary storage for password to check if changed | |
linklabelToolTip | used to display the full path of the DBSheet definition filename | |
myDBConnHelper | common connection settings factored in helper class | |
selColIndex | store column index on key press/CellMouseDown to share with displayContextMenus | |
selRowIndex | store row index on key press/CellMouseDown to share with displayContextMenus, DBSheetColsForDatabases_ItemClicked, moveRow and RegenerateThisLookupQuery_Click | |
specialNonNullableChar | character prepended before field name to specify non null-able fields | |
TableDataTypes | mapping of column names (including null-able flag before) to their types (including size and precision) | |
tblPlaceHolder | placeholder used in lookup queries to identify the current field's lookup table | |
ToolTipMain | ||
visualControls |