IService..::..GetPhysicalWarehouses Method

Gets a list of the warehouses.

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

Syntax


Return Value

System.Collections.Generic.List(Of JiwaFinancials.Jiwa.)

Examples


Read all physical warehouses (each of which contains a list of logical warehouses), and then outputs to console the physical and logical warehouse name
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 physicalWarehouses As List(Of JiwaWebServiceReference.PhysicalWarehouse) = jiwaService.GetPhysicalWarehouses()

  For Each physicalWarehouse As JiwaWebServiceReference.PhysicalWarehouse In physicalWarehouses
      For Each logicalWarehouse As JiwaWebServiceReference.LogicalWarehouse In physicalWarehouse.LogicalWarehouses
          Console.WriteLine(String.Format("{0} / {1}", logicalWarehouse.Description, physicalWarehouse.Description))
      Next
  Next

  jiwaService.Logoff()
  jiwaService.Close()