turrican said:
vesuvius said:
*snip*

I know that... but... can it be done? without the join... getting two tables from two selects at once?

If you can get two tables out of it, then you can add those tables to a dataset. But I agree with vesuvius. Modify the SQL to get what you're really after. Doing two select *s is horribly inefficient.

 

Also, there's no point to a Dataset unless the tables are related in some way, or you want to pass them around as one object.

 

For more on MVVM, check out Josh Smith's blog: http://joshsmithonwpf.wordpress.com/ Personally, I think the pattern is overkill since you end up duplicating your model in the viewmodel, but it definitely makes unit testing easier.

 

The biggest change (IMO) is moving from Click event handlers to Commands. It lets you ignore the details of the UI, like enabling/disabling all of the ways to save if there aren't any changes, and just focus on the action.