Ernst wrote:Oh my G. on that..
Oh my Great Language to use
Actually, in all seriousness it does not have to be c#, a decompiler like Telerik Just Decompile will show it to you in vb.net if you really must below for example is the inventory notes plugin all you have to do is find the DLL under program data.
The problem you are having is like the internet the examples available are in the more popular/used language.
- Code: Select all
Imports JiwaFinancials.Jiwa.JiwaApplication
Imports JiwaFinancials.Jiwa.JiwaApplication.Notes
Imports JiwaFinancials.Jiwa.JiwaApplication.Plugin
Imports JiwaFinancials.Jiwa.JiwaInventory
Imports JiwaFinancials.Jiwa.JiwaInventory.Import
Imports System
Imports System.Collections
Imports System.Runtime.CompilerServices
Public Class BusinessLogicPlugin
Inherits MarshalByRefObject
Implements IJiwaBusinessLogicPlugin
Public Sub New()
MyBase.New()
End Sub
Private Sub AppendProperties(ByVal destinationPropertyCollection As JiwaFinancials.Jiwa.JiwaInventory.Import.DestinationPropertyCollection)
Dim newDestinationProperty As DestinationProperty = destinationPropertyCollection.Manager.CollectionItemFactory.CreateCollectionItem(Of DestinationProperty)()
newDestinationProperty.RecID = "Inventory.Note.NoteType"
newDestinationProperty.Caption = "Inventory Note Type"
newDestinationProperty.SetterMethod = Sub(inventory As Inventory, value As String, rowData As String, row As String(), rowNo As Integer, mapping As Mapping) Me.SetNoteInfo(inventory, value, rowData, row, rowNo, mapping)
Dim strArrays() As String = { "InventoryNoteType", "Inventory Note Type", "NoteType", "Note Type" }
newDestinationProperty.Aliases = strArrays
destinationPropertyCollection.Add(newDestinationProperty)
newDestinationProperty = destinationPropertyCollection.Manager.CollectionItemFactory.CreateCollectionItem(Of DestinationProperty)()
newDestinationProperty.RecID = "Inventory.Note.NoteText"
newDestinationProperty.Caption = "Inventory Note Text"
newDestinationProperty.SetterMethod = Sub(inventory As Inventory, value As String, rowData As String, row As String(), rowNo As Integer, mapping As Mapping) Me.SetNoteInfo(inventory, value, rowData, row, rowNo, mapping)
strArrays = New String() { "InventoryNoteText", "Inventory Note Text", "NoteText", "Note Text", "Note" }
newDestinationProperty.Aliases = strArrays
destinationPropertyCollection.Add(newDestinationProperty)
End Sub
Private Sub DestinationProperties_ReadEnd(ByVal sender As Object, ByVal e As EventArgs)
Me.AppendProperties(DirectCast(sender, JiwaFinancials.Jiwa.JiwaInventory.Import.DestinationPropertyCollection))
End Sub
Public Overrides Function InitializeLifetimeService() As Object
Return Nothing
End Function
Private Sub SetNoteInfo(ByRef Inventory As JiwaFinancials.Jiwa.JiwaInventory.Inventory, ByVal Value As String, ByVal RowData As String, ByVal Row As String(), ByVal RowNo As Integer, ByVal Mapping As JiwaFinancials.Jiwa.JiwaInventory.Import.Mapping)
Dim noteTypeDescription As String = ""
Dim noteText As String = ""
Dim myLoop As Integer = 1
Dim strArrays As String() = Row
Dim num As Integer = 0
While num < CInt(strArrays.Length)
Dim cell As String = strArrays(num)
Dim recID As String = Mapping.MappingCollection(myLoop).DestinationProperty.RecID
If (recID IsNot Nothing) Then
If (recID = "Inventory.Note.NoteType") Then
noteTypeDescription = cell.Trim()
Mapping.MappingCollection(myLoop).HasBeenSet = True
ElseIf (recID = "Inventory.Note.NoteText") Then
noteText = cell.Trim()
Mapping.MappingCollection(myLoop).HasBeenSet = True
End If
End If
myLoop = myLoop + 1
num = num + 1
End While
Dim noteType As JiwaFinancials.Jiwa.JiwaApplication.Notes.NoteType = Nothing
If (noteTypeDescription.Trim().Length > 0) Then
Dim found As Boolean = False
For Each existingNoteType As JiwaFinancials.Jiwa.JiwaApplication.Notes.NoteType In Inventory.Notes.NoteTypeCollection
If (existingNoteType.Description.ToUpper() = noteTypeDescription.ToUpper()) Then
noteType = existingNoteType
found = True
Exit For
End If
Next
If (Not found) Then
Throw New Exception(String.Format("Note Type '{0}' not found", noteTypeDescription))
End If
End If
Dim note As JiwaFinancials.Jiwa.JiwaApplication.Notes.Note = Inventory.Manager.CollectionItemFactory.CreateCollectionItem(Of JiwaFinancials.Jiwa.JiwaApplication.Notes.Note)()
If (noteType IsNot Nothing) Then
note.NoteType = noteType
End If
note.NoteText = noteText
Inventory.Notes.Add(note)
End Sub
Public Sub Setup(ByVal JiwaBusinessLogic As IJiwaBusinessLogic, ByVal Plugin As JiwaFinancials.Jiwa.JiwaApplication.Plugin.Plugin) Implements IJiwaBusinessLogicPlugin.Setup
If (TypeOf JiwaBusinessLogic Is JiwaFinancials.Jiwa.JiwaInventory.Import.InventoryImport) Then
Dim inventoryImport As JiwaFinancials.Jiwa.JiwaInventory.Import.InventoryImport = DirectCast(JiwaBusinessLogic, JiwaFinancials.Jiwa.JiwaInventory.Import.InventoryImport)
Me.AppendProperties(inventoryImport.DestinationProperties)
AddHandler inventoryImport.DestinationProperties.ReadEnd, New IJiwaCollection.ReadEndEventHandler(Of DestinationProperty)(AddressOf Me.DestinationProperties_ReadEnd)
End If
End Sub
End Class