This was a project for Ruby Tuesday, and as such some of this stuff is not public domain. I do not have source code for this.
This project was a fairly simple one, but it was one of the very few C# projects I got to work on. On our system we keep a set of small training videos we call “Rally Videos”. They are hard coded to a set of buttons on the POS, and the names have to be updated every time the videos change. At the time, this involved a new set of documentation (Change Control, Design Form, and etc), and a new SQL update script. While we were in the process of redesigning the screen these were on (to increase the number of buttons), the idea of automating the labels came up, and I ended up looking into it.
Updating the labels is really simple; it’s just an update statement based on the position of the button. The combined documentation and change control process is what made this such a time sink. I started by programmatic ally generating this update statement, using basic file input/output to gather the names of the videos from a text file (one title per line, up to 10 lines). At that point, the application created a sql file which I could then run against the database to update.
From there I had to look at executing it against the database within the app. To figure this out I had to open our custom DLLs and start reading through them. Eventually I found a set of database commands based on the standard database commands, which already handled the connection logic. From there, it was just a matter of passing the formatted statement to this function and running it.
By then putting this app in our task scheduler, I essentially removed my department from the process altogether. Now if they want to update video titles, they drop a text file off in a specific network location, and the rest is automated.
Recent Comments