Click here to Skip to main content
15,910,411 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello All,
I have two tables one is class master and other is stream master.when i will create class it has options select class and select stream(like medical,non-medical,arts,commerce,no stream).I want that when a particular class select any stream and save that class But in next time if somebody wants to select another stream to same class ,it would not allow that class to add another stream.how it will be possible.


Thanks with Regards,
Amit Mehan
Posted

First Save the setting using filestream reader and writer technique and save it in .txt file. Next time when u try to load it. In Form load if text file has a value(a student selected a stream for ex arts ) Then just make the textbox propery ENABLED=False(textBox1.Enabled=false)..

If you have any doubts give me the code i will write and explain you ok MAil me at viswa.teja@ymail.com,viswa.teja@live.in,viswa.teja1991@gmail.com:cool:
 
Share this answer
 
v2
Do one thing auto increment the class id so that no one gets same class id rite
Give the coulmn id class_Id int NOT NULL AUTO_INCREMENT in sql. so that you need not to disable textbox
 
Share this answer
 
v3
Comments
Sandeep Mewara 23-Jul-10 11:49am    
Reason for my vote of 1
Why posting 3 answers? You could have edited the old one. Updated that itself.
Or Do one thing cheak the class_id and if that class id already present in db. just disable the textbox.....
 
Share this answer
 
Comments
Sandeep Mewara 23-Jul-10 11:49am    
Reason for my vote of 1
Why posting 3 answers? You could have edited the old one. Updated that itself.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900