IService..::..GetInventoryCategories Method

Gets a list of inventory categories.

Namespace:  JiwaFinancials.Jiwa.JiwaWebService.WCF
Assembly:  JiwaWebService (in JiwaWebService.exe)

Syntax


[OperationContractAttribute]
[WebGetAttribute]
List<Category> GetInventoryCategories(
	int CategoryNo
)
<OperationContractAttribute> _
<WebGetAttribute> _
Function GetInventoryCategories ( _
	CategoryNo As Integer _
) As List(Of Category)
[OperationContractAttribute]
[WebGetAttribute]
List<Category^>^ GetInventoryCategories(
	int^ CategoryNo
)

Parameters

CategoryNo
Type: Int32
The category number (1 - 5).

Return Value

System.Collections.Generic.List(Of JiwaFinancials.Jiwa.JiwaApplication.Entities.Inventory.Category)

Examples


Get a list of inventory categories for Category No. 1, and iterate through the results.
VB.NET
Dim binding As System.ServiceModel.WSHttpBinding = New System.ServiceModel.WSHttpBinding()
  binding.MaxReceivedMessageSize = 50000000
  binding.ReaderQuotas.MaxArrayLength = 50000000
  binding.ReaderQuotas.MaxStringContentLength = 50000000
  Dim jiwaService As JiwaWebServiceReference.ServiceClient = New JiwaWebServiceReference.ServiceClient(binding, New ServiceModel.EndpointAddress("http://localhost:8001/jiwa7/services/7.0"))
  jiwaService.Logon("Admin", "password")

  Dim inventoryCategories As List(Of JiwaWebServiceReference.Category) = jiwaService.GetInventoryCategories(1)

  For Each item As JiwaWebServiceReference.Category In inventoryCategories
      Console.WriteLine(item.Description)
  Next

  jiwaService.Logoff()
  jiwaService.Close()