C#

Mad King DataGrid

This post is about scrolling in WPF and the egocentric DataGrid control. I’ll give the project background but if all you’re interested in is the final solution, scroll on down a bit. I’ll leave a trail of headers so you should be able to find your way easily enough. The Project I’ve been working on a little application to help track spells for my wife’s character in our weekly Pathfinder games (my character might find a use for it as well but that’s just gravy). Since I had already spent a couple months dinking around with acquiring (and normalizing into XML) the...

posted @ Monday, July 18, 2011 6:07 PM | Feedback (0)

Spammers Are Vermin

My apologies if you’ve tried to access my personal blogs recently. I’ve been inundated by comment spammers and it has been a tremendous pain in the buttocks getting them straightened out. For a while, I was getting only a half dozen or so a day. Short comments about what an amazing blog/post it was and that they’d definitely be back and/or bookmark/subscribe. I could manually delete them without too much inconvenience for a while. Lately, though, there’s been a staggering increase in these weasels so I’ve adopted measures a little more… drastic. A Comment Filter BlogEngine.Net Extension...

posted @ Tuesday, July 14, 2009 1:33 AM | Feedback (4)

WCF With GP Web Services

I’m at Convergence this week in New Orleans. If you’re unfamiliar with the conference (and don’t want to follow the nifty link), all you really need to know is that it’s Microsoft’s convention for their business solutions products. For me, that means Dynamics Great Plains. I bring this up because in the last session I attended yesterday, Louis Maresca mentioned a problem I remembered having with GP Web Services. GP WS has a serious problem when you first instantiate the proxy object: it can take seconds (over 30 on our older systems—I put a timer in just to...

posted @ Wednesday, March 11, 2009 9:20 PM | Feedback (0)

Gratuitous Use of Linq

Every now and then I get to doing something just because... well, because I can. These projects usually atrophy before becoming anything usable and serve more as a way to explore and practice than anything else. Usually. My latest tangent actually got to a state where I can let it loose in the wild and it’ll probably actual do what it is supposed to do. BlogEngine.Net Let me be perfectly clear up front: I don’t actually use BlogEngine.Net at all. Anywhere. I’m still a Subtext guy when it comes to blogging software. BlogEngine.Net still lacks critical features and that prevents me...

posted @ Wednesday, March 04, 2009 1:11 PM | Feedback (7)

So You Think You're An Admin?

I had an interesting problem crop up trying to run my own application this week. We have a routine that uses an excel spreadsheet to import orders into Dynamics GP that includes some twists that aren’t handled well by Integration Manager. Since the application runs from the network (using ClickOnce) and because these orders can be substantial and represent a commitment of corporate resources, we want some control over who can run them. Specifically, we use Active Directory group membership with hard-coded/defined groups. One of the groups I want to allow is Domain Admins. And yes, this is...

posted @ Friday, February 13, 2009 1:56 PM | Feedback (3)

Changing Table Names in an OR/M

I spent some quality time googling this and even went and asked the nascent Stack Overflow community and didn’t come up with a satisfactory answer. Being the intrepid sort, I opened up a test project and started poking around, compiling information from a number of sources and playing until I got something that worked. For your amusement and/or edification, I’ll document what I found. What I Want to Do The basic scenario is that many typical “commodity” web applications use databases to store their information. Since most web hosting services come with a single database but charge extra for additional databases,...

posted @ Wednesday, August 27, 2008 6:30 PM | Feedback (3)

Getting at the Details

This should be pretty short, but I could not find this information anywhere so here's something that will save you hours of frustration if you ever run into the same situation. WCF Myopia Windows Communication Foundation is nice and all, but it suffers from a really large myopia: it tends to assume that you control both the service and the client. This is a stupid assumption, but try finding information for a situation where a service throws a FaultException and you want to get at the details of the exception and you'll see what I mean. The Setup Dynamics Great Plains Web Services...

posted @ Monday, January 28, 2008 4:53 PM | Feedback (3)

Custom Dynamics Warehousing

Prior developers and others who should have known better at my company decided many years ago that our warehouse people simply could not do their jobs unless we unleashed the ability for them to use multiple "bin" locations for each item. Now, strictly speaking, this was not really the case, because our needs simply aren’t that complex. We manufacture reading glasses so we don’t need inventory aging and all the warehouse people really needed were different sites to separate receiving from QA from shipping. In other words, we have product staging, but each stage is physically as well as...

posted @ Friday, January 04, 2008 12:25 AM | Feedback (0)

Printing Reporting Services 2005 Reports

About a year ago, I had the "opportunity" to automate batch printing for a couple of reports for my small company. Printing an invoice and a packing slip for 100+ orders at a time practically begs to be automated. Now, because we have specific needs with regards to the order they print in and what gets stapled to what else, this wasn’t something you could build into the reports themselves. Because the reports were originally programmed in Crystal Reports, I descended into the Crystal cesspit and just made it happen. If you’ve ever tried to automate report data access...

posted @ Friday, December 07, 2007 8:21 PM | Feedback (18)

Dependency Injection

Dependency Injection is a design pattern used to abstract a provider from the class using it. Specifically, the calling class assumes responsibility for managing the provider instead of the class being called. Data access is a classic example of a provider that can be injected into classes that use it. If you decide to implement the DI pattern in a data access project, the most common method of doing so is to add an interface parameter on the constructor of each class that needs data access. A C# Example A class that accesses data might look like this (if it were programmed...

posted @ Tuesday, August 07, 2007 11:08 PM | Feedback (6)