Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Fill datagrid from sql query, then save all datagrid including edits back to database with one save button.

$
0
0

Hi everyone,

I have only been programming in WPF for about 8 weeks now and have been trying to create a program at work that would save us around 10 - 15 mins a day.

My problem is that we must create an end of shift log where 95% of the information is the same as the previous day and only 5% of information is different. At the moment we do this on paper so l have been trying to create a program that will help us.

My goal would be to load up the previous days shift log from an SQL database, edit the changes and insert everything back to the database as new information. At the moment my skill set is reverse engineering examples after understanding what they do and customizing the code to suit my own program but l can only find examples that work from changes by datagrid rows rather than a single save.

I have spent the last week looking up bulk inserts, datatables / dataviews and datagrids but l can't find a single example that would do what l want. I did manage to create a program that would read changes by row and insert them as by using roweditending and l have managed to insert them into SQL with adding a system.date to the insert statement to differentiate from the previous day but the rows that aren't changed don't get added as new this way.

Does anyone know of any examples or have any source code that l could see/use that would help me as it would be very much appreciated.

thanks Callum


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>