API Reference
Loading...
Searching...
No Matches
Public Member Functions | List of all members
DB.Api.ApplicationTemplates Class Reference

Class to handle DB templates. Templates include various tables of template data including activity templates, glazing templates, etc. More...

Public Member Functions

Table AddTable (string tableName, int fieldCount)
 Adds an empty table with specified name and number of fields to ApplicationTemplates object.
 
Table GetTable (string tableName)
 Retrieves an existing ApplicationTemplates table with specified name.
 
void RemoveTable (string tableName)
 Removes an existing ApplicationTemplates table with specified name.
 
void RemoveAllTables ()
 Removes all tables and all table contents from ApplicationTemplates object.
 
bool CreateNewFile (string fileName, string path)
 Creates file using name supplied and if successful associates file with ApplicationTemplates object.
 
bool AddTableFromFile (string tableName, string filePath)
 Populates the specified ApplicationTemplates table with the contents of the specified ASCII file.
 
bool OpenFile (string fileName, string path)
 Loads all ApplicationTemplates tables from specified binary file (previously created by saving ApplicationTemplates object).
 
bool SaveFile ()
 Saves ApplicationTemplates tables to binary file previously created using CreateNewFile.
 
bool CopyTableToSite (string name)
 Copies specified table from ApplicationTemplates object to Site level tables.
 
int CopyAllTablesToSite ()
 Copies all ApplicationTemplates tables to site level tables.
 
bool ClearTable (string name)
 Removes contents of specified ApplicationTemplates table.
 
void Dispose ()
 

Detailed Description

Class to handle DB templates. Templates include various tables of template data including activity templates, glazing templates, etc.

Member Function Documentation

◆ AddTable()

Table DB.Api.ApplicationTemplates.AddTable ( string  tableName,
int  fieldCount 
)

Adds an empty table with specified name and number of fields to ApplicationTemplates object.

Parameters
tableNameName of table.
fieldCountNumber of fields (columns) in table.
Returns
TRUE if table added successfully otherwise FALSE.

◆ AddTableFromFile()

bool DB.Api.ApplicationTemplates.AddTableFromFile ( string  tableName,
string  filePath 
)

Populates the specified ApplicationTemplates table with the contents of the specified ASCII file.

Parameters
tableNameName of ApplicationTemplates table to be populated.
filePathFull path of ASCII file containing table data.
Returns
TRUE if table populated successfully successful otherwise FALSE.

◆ ClearTable()

bool DB.Api.ApplicationTemplates.ClearTable ( string  name)

Removes contents of specified ApplicationTemplates table.

Parameters
nameName of table to be cleared.
Returns
TRUE if table cleared successfully otherwise FALSE.

◆ CopyAllTablesToSite()

int DB.Api.ApplicationTemplates.CopyAllTablesToSite ( )

Copies all ApplicationTemplates tables to site level tables.

Returns
TRUE if tables copied successfully otherwise FALSE.

◆ CopyTableToSite()

bool DB.Api.ApplicationTemplates.CopyTableToSite ( string  name)

Copies specified table from ApplicationTemplates object to Site level tables.

Parameters
nameName of table to be copied.
Returns
TRUE if table copied successfully otherwise FALSE.

◆ CreateNewFile()

bool DB.Api.ApplicationTemplates.CreateNewFile ( string  fileName,
string  path 
)

Creates file using name supplied and if successful associates file with ApplicationTemplates object.

Parameters
fileNameName of new ApplicationTemplates file.
pathFile path.
Returns
TRUE if file created successfully otherwise FALSE.

◆ GetTable()

Table DB.Api.ApplicationTemplates.GetTable ( string  tableName)

Retrieves an existing ApplicationTemplates table with specified name.

Parameters
tableNameName of table.
Returns
TRUE if table exists and retrieved successfully otherwise FALSE.

◆ OpenFile()

bool DB.Api.ApplicationTemplates.OpenFile ( string  fileName,
string  path 
)

Loads all ApplicationTemplates tables from specified binary file (previously created by saving ApplicationTemplates object).

Parameters
fileNameName of ApplicationTemplates file.
pathFile path.
Returns
TRUE if tables loaded successfully successful otherwise FALSE.

◆ RemoveTable()

void DB.Api.ApplicationTemplates.RemoveTable ( string  tableName)

Removes an existing ApplicationTemplates table with specified name.

Parameters
tableNameName of table to be removed.

◆ SaveFile()

bool DB.Api.ApplicationTemplates.SaveFile ( )

Saves ApplicationTemplates tables to binary file previously created using CreateNewFile.

Returns
TRUE if tables saved successfully otherwise FALSE.

The documentation for this class was generated from the following file: