U.B. Funkey USB Detection Example VB.NET & WPF

USB Funkey Today I was helping a college get USB detection working on a WPF application. He was using a library I wrote for another windows forms application and was trying to use it in a WPF application.

The problem is that my library overrode the WndProc method of the main application form in order to capture and route the windows messages through to the library.

WPF does not natively have the WndProc as it uses a different messaging architecture, however an interop has been provided details of which can be found in "WPF and Win32 Interoperation Overview" and more "WPF-Win32 Interop Part 2: Hosting Win32 Controls (ListBox) in WPF Windows"

I’ve mentally bookmarked this subject to come back to as it looks like it gets involved but essentially if you want to detect the removal of a USB device in a WPF application you can do it by using the example I outline in this page. The example is a get you started and I would read around the subject before using this in production code.

Read all about U.B. Funkey USB Detection Example VB.NET & WPF

Publishing Catalogue Management System to ASP.NET

Project complete

Finally there has been a window of opportunity to get the CMS->Web application complete.

Read my write up of what  I’ve been up to with it here.

It uses WCF, LINQ to objects and a smart client windows forms application to publish item information from the catalogue management system in Quark Xpress format Oracle binary fields to a SQL server driven ASP.NET website.

This is version one and as always there are already some ideas on how it could be used to improve the experience of the site visitors. Already I’ve changed it to hot link product  codes and “see index” to a search shortcut.

To be honest, I’m just glad that finally I have put this one to bed. From Delphi to .NET it has been many years sitting on floppy disks on the shelf but finally it is born to generate some more turnover that in the current environment has to be a good thing. It should also be a spring board to offering even richer information on the site!

Read about in part 1.

cmstoWebapp

Zebra Thermal Label Printing using VB.NET

Many, years ago (2001) I wrote a small application in Delphi that would allow a user to print thermal labels to a Zebra or Eltron EPL or ZPL language printer. It also supported printing to dotmatrix labels. That shows how long ago it must have been.
the labels were based on information drawn out of Dynamics GP. Thus warehouse bin location, item description etc was pulled through from GP allowing the goods in department to quickly print off labels for goods they were bagging or stocking.
As we have recently added another company to our premesis it is now desireable for the application to automatically detect which company the part number entered belongs to and print a label with the correct layout for that company out. The applicaiton originally written in Delphi is overdue for a rewrite into .NET.

Original Delphi Dynamics GP Thermal label software

There was no hours available in work time to write this applicaiton so I took it home to write in the evenings. The following posts show you how I got on. I had, as usual forgotten about some of the nice features I had encorporated into the original application.

Part II to follow....

Dynamics GP Warehouse Despatch Fulfilment .NET

Some years ago I wrote a lovely bit of software to that allowed us to gain much more control over the way that orders are handled by the warehouse at despatch.

Once an order is sent to the "Warehouse" Batch a custom windows service prints off a pick list for that order or sends the order to a "Pending Stock" batch if it is awaiting allocation of more goods due to pending purchase orders or stock shortages. The order is checked for weight and manual handling warnings are printed on the pick if any item requires special handling as does notice get applied should there be hazodous chemicals or problems with air frieghting the item. The picklist is then added to a despatch screen as awaiting picking and fulfilment.

The operative takes the pick list from the printer and goes off to pick the order (version II was always  intended to feed the virtual picklist to PDA's that the staff would carry, not got that one done yet!). Once they have the pick complete, the items are weighed and they then scan the barcode on the picklist at the despatch terminal. The terminal asks the user for the weight of the consignment cartons/boxes and the dimentions if they are exceptional or for export. The wizard then asks for the picker, checker and despatcher names for that pick. Finally it caculates the best carrier for the consignment depending on the weight, if the order has none stock items (thus would be delay if item was to be lost in normal post), if the value of the consignment is over a threshold, the time of day (to catch the next carrier arriving), dimentions are checked for those supported by different carriers, including if the consignment is on a pallet. The soup is stirred and a service and carrier selected to get the items to the customer by the time they requested.

A despatch note is printed by the despatch terminal and tracking numbers are obtained from the carrier systems, and labels printed off for the parcels, and xml sent to the carrier machines so they know all about what they have to deliver.

It automates much more such as preventing duplicate despatches, taking notice of process holds and customer credit issues, charging Credit cards if they were applied to the order, its great!

However I've another company implemenation to do over the next couple of weeks, we are putting Dynamics GP into a computer periferal company that we aquired. Although they have very similar requirements to those already existing they also add in the complexity of a trade counter operation. This means the software now needs to support sales staff at the counter fulfilling orders, producing invoices etc. Cool - I like a challenge. Thus I've cracked open the solution file and started having a look at how it all works again as a refresher to see what needs adapting for the next implementation. Now I've realised that times have moved on with GP and .NET. We now have the WCF and the WPF to help me out together with better webservices in GP. All this application is direct to table, which was the only way to go when it was written, econnect was an arm and a leg and laden with bugs. Now it is a mature affordable soution - thanks MS!

Thus I start thinking about where to go as I also have to think about multiple binning that was never used in the old implementation. This is where you have stock held in multiple locations in the warehouses and set priority for where the stock should be drawn from. Useful if you wish to keep bulk stock up a height and draw it down to accessable locations further down the racks. This lead me to a blog of interest  http://scruffylookingcatherder.com/archive/2008/01/03/custom-dynamics-warehousing.aspx where Jacob sounds he is in a similar suituation to my own using similar technology sets to solve the problems. Jacob also has some interesting posts on development to read.

Now I just need to get my skates on and work out how to get my application working for next week....