Fortunately, we've made it really easy to login to jiwa and interact with our business logic.
You just need to add references to your Visual Studio solution/project to the Jiwa Assemblies (Jiwa*.dll). If, say for example, you wanted to interact with the sales order business logic then you need to add a references to JiwaSales.dll. How do you know which assembly to reference ? try exploring the relevant reference API documentation for your version.
You should set Copy Local to true for the references to the Jiwa assemblies, otherwise any plugins enabled will produce errors on login.
Ok, so once you have the necessary references, let show a simple example of logging into Jiwa, reading a sales order and processing it :
- Code: Select all
Imports JiwaFinancials.Jiwa
Public Class TestClass
Private Sub ProcessSalesOrder(ByVal InvoiceNo As String)
JiwaApplication.Manager.Instance.Logon("JiwaMike", "JiwaDemo", JiwaFinancials.Jiwa.JiwaODBC.database.AuthenticationModes.JiwaAuthentication, "Admin", "password")
Dim salesOrder As JiwaSales.SalesOrder.SalesOrder = JiwaApplication.Manager.Instance.BusinessLogicFactory.CreateBusinessLogic(Of JiwaSales.SalesOrder.SalesOrder)(Nothing)
salesOrder.Find(JiwaApplication.IJiwaNavigable.ReadModes.Actual, "SO_Main.InvoiceNo", InvoiceNo , "")
salesOrder.Process()
Console.WriteLine(String.Format("Invoice No. {0} is now processed.", salesOrder.InvoiceNo))
JiwaApplication.Manager.Instance.LogOff()
End Sub
End Class