What the hell are you doing? Data access code AND UI code in the SAME file? Aggghhhh my eyes are bleeding!
I mean sure, this is fine for a tiny util, but any slightly larger program will buckle under the inflexibility of this code.
I would recommend giving the form a public method for passing in a datatable and then pass that table in from a controller object that both speaks to the form and speaks to the database.
Aggghhhh my eyes are bleeding!
I mean sure, this is fine for a tiny util, but any slightly larger program will buckle under the inflexibility of this code.
I would recommend giving the form a public method for passing in a datatable and then pass that table in from a controller object that both speaks to the form and speaks to the database.