Business One DAO (Data Access Object) Implementation. More...
Inherited by Dover.Framework.DAO.BusinessOneDAOSQLImpl.
Public Member Functions | |
void | SaveBOMIfNotExists (IBOM bom, INotifier notifier=null) |
Save a BOM XML if not presented in the DataBase. More... | |
void | UpdateOrSaveBOMIfNotExists (IBOM BOM, INotifier notifier=null) |
Save a BOM if not exists and update it if exists. More... | |
string | GetXMLBom< V > (object[] keys, BoObjectTypes objType) |
Return a BOM XML, containing various BO elements. More... | |
List< int > | ListMissingBOMKeys (IBOM bom) |
List all elements that are not present on the database, from the specified BOM More... | |
List< int > | ListOutdatedBOMKeys (IBOM bom) |
List all elements that are not present or outdated on the database, from the specified BOM More... | |
string | GetNextCode (String udt) |
Return the next code for the specified user table. This method implements a code on the following format: XXXXXXXX, where X is an hex digit.; More... | |
string | GetCurrentUser () |
Return the current user code. More... | |
void | ExecuteStatement (string sql) |
Execute an SQL statement with no return value (INSERT/UPDATE). More... | |
T | ExecuteSqlForObject< T > (string sql) |
Execute the SQL Statement and return the supplied object. For each statement selected value, a corresponding property must exists on the specified object. More... | |
List< T > | ExecuteSqlForList< T > (string sql) |
Execute the SQL Statement and return a list of the supplied object type. For each statement selected value, a corresponding property must exists on the specified object. More... | |
T | GetBOMFromXML< T > (Stream resourceStream) |
Return a BOM object with the specified resourceStream. More... | |
void | UpdateOrSavePermissionIfNotExists (Attribute.PermissionAttribute permissionAttribute) |
Update a permission attribute on the database if not exists. More... | |
bool | IsSuperUser () |
Return true if current iser us SuperUser. More... | |
void | SaveBOM (IBOM doc, INotifier notifier=null) |
Saves BOM, without checking if it exists. More... | |
bool | PermissionExists (Attribute.PermissionAttribute permissionAttribute) |
Check if the specified Permission exists. More... | |
dynamic | GetBusinessObject (BoObjectTypes objType) |
Return the desired Business Object API from current Company More... | |
void | UpdateBusinessObject (object b1Object) |
Call the Update() API on the desired object. On Error an exception is thrown and the Business Object is cleaned from memory (ReleaseComObject is called). More... | |
void | SaveBusinessObject (object b1Object) |
Call the Save() API on the desired object. On Error an exception is thrown and the Business Object is cleaned from memory (ReleaseComObject is called). More... | |
void | Release (object b1Object) |
Proper release of COM resources. More... | |
Business One DAO (Data Access Object) Implementation.
List<T> Dover.Framework.DAO.BusinessOneDAO.ExecuteSqlForList< T > | ( | string | sql | ) |
Execute the SQL Statement and return a list of the supplied object type. For each statement selected value, a corresponding property must exists on the specified object.
T | Object type to wrap into the list. |
sql | SQL statement |
T Dover.Framework.DAO.BusinessOneDAO.ExecuteSqlForObject< T > | ( | string | sql | ) |
Execute the SQL Statement and return the supplied object. For each statement selected value, a corresponding property must exists on the specified object.
T | Return object type |
sql | SQL statement |
void Dover.Framework.DAO.BusinessOneDAO.ExecuteStatement | ( | string | sql | ) |
Execute an SQL statement with no return value (INSERT/UPDATE).
sql | SQL Statement |
T Dover.Framework.DAO.BusinessOneDAO.GetBOMFromXML< T > | ( | Stream | resourceStream | ) |
Return a BOM object with the specified resourceStream.
T | BOM type |
resourceStream | Stream containing XML data. |
dynamic Dover.Framework.DAO.BusinessOneDAO.GetBusinessObject | ( | BoObjectTypes | objType | ) |
Return the desired Business Object API from current Company
objType | Desired ObjectType |
string Dover.Framework.DAO.BusinessOneDAO.GetCurrentUser | ( | ) |
Return the current user code.
string Dover.Framework.DAO.BusinessOneDAO.GetNextCode | ( | String | udt | ) |
Return the next code for the specified user table. This method implements a code on the following format: XXXXXXXX, where X is an hex digit.;
udt | User Defined Table |
string Dover.Framework.DAO.BusinessOneDAO.GetXMLBom< V > | ( | object[] | keys, |
BoObjectTypes | objType | ||
) |
Return a BOM XML, containing various BO elements.
V | SAP Business One DI API object type |
keys | keys to be fetched |
objType | SAP Business One DI API enum representing the object type |
bool Dover.Framework.DAO.BusinessOneDAO.IsSuperUser | ( | ) |
Return true if current iser us SuperUser.
List<int> Dover.Framework.DAO.BusinessOneDAO.ListMissingBOMKeys | ( | IBOM | bom | ) |
List all elements that are not present on the database, from the specified BOM
bom | BOM with all Business One objects |
List<int> Dover.Framework.DAO.BusinessOneDAO.ListOutdatedBOMKeys | ( | IBOM | bom | ) |
List all elements that are not present or outdated on the database, from the specified BOM
bom | BOM with all Business Obe objects |
bool Dover.Framework.DAO.BusinessOneDAO.PermissionExists | ( | Attribute.PermissionAttribute | permissionAttribute | ) |
Check if the specified Permission exists.
permissionAttribute | Permission attribute to check for |
void Dover.Framework.DAO.BusinessOneDAO.Release | ( | object | b1Object | ) |
Proper release of COM resources.
b1Object | COM object that will be released |
void Dover.Framework.DAO.BusinessOneDAO.SaveBOM | ( | IBOM | doc, |
INotifier | notifier = null |
||
) |
Saves BOM, without checking if it exists.
doc | BOM object representing the BusinessOne data to be saved. |
notifier | If present, for each attempt, a trigger event will happen. This is usefull when the calling need to knows the added ID, of to do some transaction related stuff OnError. |
void Dover.Framework.DAO.BusinessOneDAO.SaveBOMIfNotExists | ( | IBOM | bom, |
INotifier | notifier = null |
||
) |
Save a BOM XML if not presented in the DataBase.
bom | BOM, containing the XML that will be added. |
notifier | If present, for each attempt, a trigger event will happen. This is usefull when the calling need to knows the added ID, of to do some transaction related stuff OnError. |
void Dover.Framework.DAO.BusinessOneDAO.SaveBusinessObject | ( | object | b1Object | ) |
Call the Save() API on the desired object. On Error an exception is thrown and the Business Object is cleaned from memory (ReleaseComObject is called).
b1Object | COM object that will have Save() call done. |
void Dover.Framework.DAO.BusinessOneDAO.UpdateBusinessObject | ( | object | b1Object | ) |
Call the Update() API on the desired object. On Error an exception is thrown and the Business Object is cleaned from memory (ReleaseComObject is called).
b1Object | COM object that will have Update() call done. |
void Dover.Framework.DAO.BusinessOneDAO.UpdateOrSaveBOMIfNotExists | ( | IBOM | BOM, |
INotifier | notifier = null |
||
) |
Save a BOM if not exists and update it if exists.
udoBOM | |
notifier |
void Dover.Framework.DAO.BusinessOneDAO.UpdateOrSavePermissionIfNotExists | ( | Attribute.PermissionAttribute | permissionAttribute | ) |
Update a permission attribute on the database if not exists.
permissionAttribute | PermissionAttribute |