Hello !
I've info in 3 tables of SQL database:
1. Users (user_id, login, private_flag, ...)
2. Private (user_id, name, e_mail, ...)
3. Business (user_id, account_number, bank_name, ...)
If Users.private_flag equals to 1 then attributes of user are in "Private"
table,
if it's 0 - in Business one.
I created a Windows Form where the main table is Users.
And both Private and Business tables are attached to it with a DataRelation-s.
When "+" button is pressed in BindingNavigator for Users table I need to
insert new record into Private or Business automatically when user selects a
value for Users.private_flag.
I tried to use various events of BindingSource, DataTable and etc. and
insert new record to one of child tables but all was helpless.
New record always not inserted.
I also noticed that new record not appears in Users table until anotrher
record of Users is selected with BindingNavigator.
Does anybody know how to realize such a logic ?
Or how to allow user to enter Private/Business data after pressing the "+"
on Users ?
Or where can I read more regarding this ?
Thanks.
|