The central class that manages SAP B1 company connection and provides core functionality.
SetupControl(string tableName, int version): Controls the setup version of a table
oCompany: SAP B1 company connection object
Handles data operations and database interactions.
ReadSingleData(string table, string column, string columnWhere, string valueWhere): Reads a single value from a tableReadSingleData(string table, string column, Dictionary<string, string> whereColumnValue): Reads a single value with multiple conditionsReadSingleData(string table, Dictionary<string, string> whereColumnValue): Reads a single record with conditionsReadListData(string table, Dictionary<string, string> whereColumnValue, int selectTop = 0): Reads multiple records with conditionsDeleteData(string table, string columnWhere, string valueWhere): Deletes records with a single conditionDeleteData(string table, Dictionary<string, string> whereColumnValue): Deletes records with multiple conditionsExecuteSql(string sql, SqlObjectType sqlType = SqlObjectType.Sql): Executes SQL queries
Handles SAP B1 form operations and UI components.
GetActiveForm(): Gets the currently active formSetCenter(): Centers the active form on screenAddButton(Form oForm, string uniqId, int pane, string caption, int top, int left, int width, int height): Adds a button to a formAddCheckBox(Form oForm, string table, string field, string uniqId, int pane, int top, int left, int width, int height): Adds a checkbox to a formAddFolder(Form oForm, string folderId, string caption, string folderBaseId): Adds a folder to a formAddEditText(Form oForm, string table, string field, string uniqId, int pane, int top, int left, int width, int height, bool visible = true): Adds an edit text fieldAddComboBox(Form oForm, string table, string field, string uniqId, int pane, int top, int left, int width, int height): Adds a combobox to a formRefresh(): Refreshes the active formAddMode(): Switches form to add mode
Handles table creation and management in SAP B1.
CreateTable(string TableName, string TableDesc, BoUTBTableType TableType): Creates a new tableCreateUserFields(string TableName, string FieldName, string FieldDescription, BoFieldTypes type, long size = 0, BoFldSubTypes subType = BoFldSubTypes.st_None, string LinkedTable = "", string DefaultValue = "", Dictionary<string, string> ValidValues = null): Creates user-defined fieldsAddUDO(string TableName, BoUDOObjType UDOType, List<string> childTable = null): Adds a User-Defined Object
Handles formatted searches and queries in SAP B1.
QueryAdd(int categoryId, string sql, string queryName, bool fmsAdd = false, string formId = "", string itemId = "", string colId = "", string colIdRelation = ""): Adds a new queryFmsAdd(int categoryId, string queryName, string formId, string ItemId, string colId, string colIdRelation): Adds a formatted searchFmsRemove(string categoryName): Removes formatted searchesGetCategoryId(string categoryName): Gets category ID for queriesGetTableFormId(string tableName): Gets form ID for a table
Handles database procedure creation.
CreateProcedure(string sql, string procName): Creates a stored procedureCreateView(string sql, string viewName): Creates a database viewCreateTrigger(string sql, string triggerName): Creates a database triggerCreateFunction(string sql, string function): Creates a database function
Provides helper methods for data operations.
GetValueString(Recordset data, string column): Gets string value from recordsetGetValueDecimal(Recordset data, string column): Gets decimal value from recordsetGetValueDate(Recordset data, string column): Gets date value from recordsetGetValueTime(Recordset data, string column, string columDate): Gets time value from recordset
Handles menu creation and management.
CreateMenuItem(string menuId, string menuTitle, string formName, int order): Creates a menu itemCreateMenuItem(SAPbouiCOM.Menus oMenus, SAPbouiCOM.MenuCreationParams oCreationPackage, string text, string uniqueID, int order): Creates a menu item with parametersCreateMenuItemMainMenu(string id, string title, string logo = "", string menuId = "43520"): Creates a main menu item
Handles status bar messages.
SetMessage(BoStatusBarMessageType messageType, string message, BoMessageTime messageTime = BoMessageTime.bmt_Medium): Sets a status bar message
Generic response class for method returns.
Success: Indicates if the operation was successfulMessage: Response messageData: Response dataRecordCount: Number of records affected