I am wanting to do a sanity check on the supplier partno when it is changed. My goal is to check all other inventory items for a matching supplier part number even if different separating characters have been used, for example, a supplier partno ABC_123-47 would be a match with abc/123_47.
I have done it in 6.5.13 and am just wanting to replicate the same in Jiwa 7.
My problem at the moment is finding the current value of Supplier PartNo. Once I have that I should be able to perform some appropriate string parsing to get say ABC12347. I can then do a database lookup in SQL to see if the string exists elsewhere.
My code at the moment is this:
- Code: Select all
Public Sub Setup(ByVal JiwaForm As JiwaApplication.IJiwaForm, ByVal Plugin As JiwaApplication.Plugin.Plugin) Implements JiwaApplication.IJiwaFormPlugin.Setup
Dim InventoryForm As JiwaInventoryUI.InventoryMaintenanceForm = DirectCast(JiwaForm, JiwaInventoryUI.InventoryMaintenanceForm)
AddHandler InventoryForm.grdSuppliers.LostFocus, AddressOf Check_SupplierPartNo
End Sub
Sub Check_SupplierPartNo(Sender As Object, e As System.EventArgs)
Dim inventory As JiwaInventory.Inventory = DirectCast(sender, JiwaInventory.Inventory)
Messagebox.Show("I want the supplier PartNo here")
End Sub
Can you help me to get the Supplier PartNo?
Cheers
Danny