GetCategories |
Scroll |
Gets a list of categories and folders from Thereforeā¢ where the connected user has the specified permissions.
Namespace: Therefore.API
Visual Basic Public Overridable Function GetCategories ( _ pAccessMask As ITheRoleAccessMask, _ nFlags As TheGetObjectFlags, _ pCategoryList As TheFolderItemList, _ pFolderList As TheFolderList _ ) C# public virtual void GetCategories ( ITheRoleAccessMask pAccessMask, TheGetObjectFlags nFlags, out TheFolderItemList pCategoryList, out TheFolderList pFolderList )
Parameters pAccessMask Permissions the user needs to have for a category to be returned.
nFlags TheGetObjectFlags determining if and which folders are loaded from the server.
[out] pCategoryList TheFolderItemList filled with TheFolderItem objects each containing category number, category name and the number of the containing folder.
[out] pFolderList TheFolderList with the requested folders.
Return Value None. |
|
Example |
Visual Basic Imports Therefore.API '...
' Connect to the Thereforeā¢ Server Dim server As TheServer = New TheServer() server.Connect(TheClientType.CustomApplication)
' Get category and folder lists from the server Dim categories As TheFolderItemList = Nothing Dim folders As TheFolderList = Nothing Dim accessmask As TheRoleAccessMask = New TheRoleAccessMask() server.GetCategories(accessmask, _ TheGetObjectFlags.GetAllFolders, categories, folders)
' Optional: Show a message box with both lists System.Windows.Forms.MessageBox.Show(categories.ToString() _ + vbNewLine + vbNewLine + folders.ToString() ) C# using Therefore.API; //...
// Connect to the Thereforeā¢ Server TheServer server = new TheServer(); server.Connect(TheClientType.CustomApplication);
// Get category and folder lists from the server TheFolderItemList categories; TheFolderList folders; server.GetCategories(new TheRoleAccessMask(), TheGetObjectFlags.GetAllFolders, out categories, out folders);
// Optional: Show a message box with both lists System.Windows.Forms.MessageBox.Show(categories.ToString() + "\r\n\r\n" + folders.ToString()); |
Requires Connection You must be connected to the Thereforeā¢ Server when calling this method. |