I have 3 data tables:
User
UserID, UserName
1, Bat
2, John
etc…
Member
MemberID, Member
1, Local
2, Zone
etc…
UserMember
UserID,MemberID
1, 1
1, 2
2, 1
etc…
On the user input XAML Form in WPF
Check list box is bound to the Member table.
My Question:
I want it so that when the user checks the member type, the selected values automatically gets inserted into the UserMember table. And when the the user unchecks member type, the selected values are deleted from the UserMember table.
How can I do this in WPF?
It depends on what kind of software methodology you want to use (I like MVVM with WPF) what kind of ORM(Linq, EF, Castle, etc.).
your could create a ViewModel like so:
in your xaml you could do this:
And finally in the code behind of your xaml you have this
This is just a skeleton, hope this helps. It’s also only one way of a myriad of ways to do it.