Show / Hide Table of Contents

Class DBMapper

DBMappers are used to store a range of data in Excel to the database. A special type of DBMapper is the CUD DBMapper for realizing the former DBSheets

Inheritance
System.Object
DBModif
DBMapper
Inherited Members
DBModif.dbmodifName
DBModif.TargetRange
DBModif.paramTargetName
DBModif.database
DBModif.execOnSave
DBModif.askBeforeExecute
DBModif.env
DBModif.confirmText
DBModif.confirmExecution(Boolean)
DBModif.getTargetRangeAddress()
DBModif.getTargetRange()
DBModif.getEnv()
DBModif.getName()
DBModif.getParamFromXML(CustomXMLNode, String, String)
DBModif.setTargetRange(Range)
DBModif.openDatabase(String)
DBModif.doDBRefresh(String, Dictionary<String, Boolean>, Dictionary<String, Boolean>, Boolean)
Namespace: DBaddin
Assembly: DBaddin.dll
Syntax
public class DBMapper : DBModif

Constructors

| Improve this Doc View Source

DBMapper(CustomXMLNode, Range)

normal constructor with definition XML

Declaration
public DBMapper(CustomXMLNode definitionXML, Range paramTarget)
Parameters
Name Description
definitionXML
paramTarget
| Improve this Doc View Source

DBMapper(String, String, Range)

legacy constructor for mapping existing DBMapper macro calls (copy in clipboard)

Declaration
public DBMapper(string defkey, string paramDefs, Range paramTarget)
Parameters
Name Description
defkey
paramDefs
paramTarget

Fields

| Improve this Doc View Source

CUDFlags

respect C/U/D Flags (DBSheet functionality)

Declaration
public bool CUDFlags
Field Value
Description

Methods

| Improve this Doc View Source

addHiddenFeatureDefs(CustomXMLNode)

to re-add hidden features only available in XML

Declaration
public override void addHiddenFeatureDefs(CustomXMLNode definitionXML)
Parameters
Name Description
definitionXML

the definition node of the DB Modifier where the hidden features should be added

Overrides
DBModif.addHiddenFeatureDefs(CustomXMLNode)
| Improve this Doc View Source

DBModifSaveNeeded()

checks whether DBModifier needs saving, either because execOnSave is set or in case of CUD DBMappers if any i/u/d Flags are present

Declaration
public override bool DBModifSaveNeeded()
Returns
Description

true if save needed

Overrides
DBModif.DBModifSaveNeeded()
| Improve this Doc View Source

doDBModif(Boolean, String, Boolean)

execute the modifications for the DB Mapper by storing the data modifications in the DBMapper range to the database

Declaration
public override void doDBModif(bool WbIsSaving = false, string calledByDBSeq = "", bool TransactionOpen = false)
Parameters
Name Description
WbIsSaving

flag for being called during Workbook saving

calledByDBSeq

the name of the DB Sequence that called the DBMapper

TransactionOpen

flag whether a transaction is open during the DB Sequence

Overrides
DBModif.doDBModif(Boolean, String, Boolean)
| Improve this Doc View Source

extendDataRange()

extend DataRange to "whole" DBMApper area (first row (header/field names) to the right and first column (first primary key) down)

Declaration
public void extendDataRange()
| Improve this Doc View Source

hadChanges()

Declaration
public bool hadChanges()
Returns
Description
| Improve this Doc View Source

insertCUDMarks(Range, Boolean)

inserts CUD (Create/Update/Delete) Marks at the right end of the DBMapper range

Declaration
public void insertCUDMarks(Range changedRange, bool deleteFlag = false)
Parameters
Name Description
changedRange

passed TargetRange by Change Event or delete button

deleteFlag

if delete button was pressed, this is true

| Improve this Doc View Source

resetCUDFlags()

reset CUD FLags, either after completion of doDBModif or on request (refresh)

Declaration
public void resetCUDFlags()
| Improve this Doc View Source

setDBModifCreateFields(ref DBModifCreate)

set the fields in the DB Modifier Create Dialog with attributes of object

Declaration
public override void setDBModifCreateFields(ref DBModifCreate theDBModifCreateDlg)
Parameters
Name Description
theDBModifCreateDlg
Overrides
DBModif.setDBModifCreateFields(ref DBModifCreate)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX